the test statistic? - West Virginia University
Download
Report
Transcript the test statistic? - West Virginia University
tom.h.wilson
[email protected]
Dept. Geology and Geography
West Virginia University
But first - some review
Making the t-test
using tables of the
critical values of t
for various levels
of confidence.
How do we compute the critical
value of t - the test statistic?
The test statistic
D1 D2
t
se
We have the means of two samples D1 & D2
se
is the standard error,
But its computed differently from the
single sample standard error which is just
sˆ
se
N
Note:
ŝ is the unbiased estimate of
the standard deviation
D1 D2
t
se
In this case se s p
1 1
n1 n2
sˆ
se
N
where
sp is the pooled estimate of the
standard deviation derived as follows
2
2
(
n
1
)
s
(
n
1
)
s
1
2
2
s 2p 1
n1 n2 2
Going through this computation for the samples
of strike at locations A and B yields t ~ 5.2.
Evaluating the statistical significance
of differences in strike at locations A
and B using the t-test
The value of our test
statistic, t = 5.2
Degrees of freedom =
n1+n2-2 = 38
Closest value in
the table is 40
= 0.1 %
=0.001 as a one-tailed
probability
= 1 chance in 1000 that
these two means are
actually equal or were
drawn from the same
parent population.
PsiPlot returns a twotailed probability for a t
5.2. That probability
is 0.000007155 (about
one chance in 140,000).
Note that this is twice
the value returned by
Excel.
The book works through the
differentiation of y = x2, so
let’s try y =x4.
y dy ( x dx ) 4
multiplying that out -- you get ...
y dy x 4 x dx 6 x (dx ) 4 x(dx ) (dx )
4
3
2
2
3
4
y dy x 4 4 x3dx 6 x 2 (dx ) 2 4 x(dx )3 (dx ) 4
Remember this idea of dy and dx is
that the differential changes are
infinitesimal - very small.
So if dx is 0.0001 (that’s 1x10-4) then
(dx)2 = 0.00000001 (or 1x10-8)
(dx)3 = 1x10-12 and
(dx)4 = 1x10-16.
So even though dx is infinitesimally small,
(dx)2 is orders of magnitude smaller
y dy x 4 4 x3dx 6 x 2 (dx ) 2 4 x(dx )3 (dx ) 4
so that we can just ignore all those
terms with (dx)n where n is greater
than 1.
Our equation gets simple fast
y dy x 4 4 x3dx
Also, since y =x4, we have
y dy y 4 x3dx
and then dy 4 x3dx
dy 4 x3dx
Divide both sides of this
equation by dx to get
dy
4x3
dx
This is just another illustration of what
you already know as the power rule,
which - in general for y ax n
is
dy
naxn 1
dx
Just as a footnote, remember that
the constant factors in an expression
carry through the differentiation.
This is obvious when we consider the
derivative y ax 2 b
Examining the effects of differential
increments in y and x we get the following
y dy a( x dx ) b
2
y dy a( x 2 2 xdx dx 2 ) b
y dy (ax b) 2axdx
2
y dy y 2axdx
dy
a(2 x)
dx
Don’t let negative exponents fool you.
If n is -1, for example, we still have
dy
naxn 1
dx
or just
dy
ax 2
dx
Given the function - y( x) f ( x) g ( x)
dy
what is
dx
?
We just differentiate f and g
individually and take their sum, so
that
dy df dg
dx dx dx
Take the simple example
y ( x 2 c) (ax 4 b)
dy
- what is
dx
?
What are the individual
derivatives of ( x 2 c) and (ax 4 b) ?
let
then -
f ( x 2 c)
df d ( x 2 c)
dx
dx
We just apply the power rule and
obtain
df
2x
dx
We know from the forgoing
note that the c disappears.
We use the power rule again to
evaluate the second term, letting
g = (ax4+b)
dg
4ax3
dx
Thus dy
2 x 4ax3
dx
Differences are treated just like sums
so that
dy d
( x 2 c) (ax4 b)
dx dx
is just
dy
2 x 4ax3
dx
Recall how to handle derivatives of
functions like
y ( x) f ( x) g ( x)
or
f ( x)
y ( x)
?
g ( x)
Removing explicit reference to the
independent variable x, we have
y fg
Going back to first principles, we have
y dy ( f df )( g dg)
Evaluating this yields
y dy fg gdf fdg dfdg
Since df x dg is very small and since
y=fg, the above becomes -
dy gdf fdg
Which is a general statement of the
rule used to evaluate the derivative of
a product of functions
The quotient rule is just a variant of
the product rule, which is used to
differentiate functions like
f
y
g
The quotient rule states that
df f dg
g
d f
dx
dx
dx g
g2
And in most texts the proof of this
relationship is a rather tedious one.
The quotient rule is easily demonstrated
however, by rewriting the quotient as a
product and applying the product rule.
Consider
f
y fg 1
g
We could let h=g-1 and then rewrite y as
y fh
Its derivative using the
product rule is just
dy
df
dh
h f
dx
dx
dx
dh = -g-2dg and substitution yields
dy
dx
df
dx
g
f dg
g2
dx
Multiply the first term in the sum by g/g (i.e. 1)
to get >
df
dg
f
dy g dx
dx
dx g g
g2
Which reduces to
df f dg
g
dy
dx
dx
dx
g2
i.e. the quotient rule
Given >
•The derivative of an
exponential functions
In general for y e
If y a
then
ax
dy
ex
dx
dy d (ax) x
e ae ax
dx
dx
express a as
dy d nx
e nenx
dx dx
x
y ex
en
so that y e
n x
enx
Note
n ln( en ) ln( a )
dy d nx
e nenx
dx dx
Since a x e nx and n ln(a)
in general
dy
ln( a) . a x
dx
a can be thought of as a general
base. It could be 10 or 2, etc.
•The derivative of
logarithmic functions
Given >
y ln( x)
dy 1
dx x
We’ll talk more about these
special cases after we talk
about the chain rule.
Differentiating functions of functions Given a function y ( x 2 1) 2 we consider
dy d 2
2
2
( x 1) h( x) write y h compute
h 2h
dh dh
dh d 2
Then compute
x 1 2 x and
dx dx
dy dy dh
.
take the product of the two, yielding
dx dh dx
dy dy dh
. 2( x 2 1).2 x
dx dh dx
4 x( x 2 1)
We can also think of the application of
the chain rule especially when powers are
involved as working form the outside to
inside of a function
y ( x 2 1) 2
Where y ( x 2 1) 2
dy
2( x 2 1)1.2 x
dx
Derivative of the
quantity squared
viewed from the
outside.
Again use power rule
to differentiate the
inside term(s)
Using a trig function such as
y sin( 2ax)
let h 2ax
dy dy dh
.
then
dx dh dx
dy
cos(2ax).2a or just
Which reduces to
dx
dy
2a cos(2ax)
dx
In general if
y f ( g (h(i(...(q( x))...))))
then
dy dy df dg dh dq
. . . .....
dx df dg dh di
dx
Returning to those exponential and natural
log cases - we already implemented the
chain rule when differentiating
ye
ax
dy d (ax) ax
e
dx
dx
ae ax
h in this case would be ax and, from the chain rule,
h
dy dy dh
dy
de
dh
.
becomes
.
dx dh dx
dx dh dx
dy
h dh
e .
dx
dx
dy
ax
ae
and finally
dx
dh
a
since h ax and
dx
or
For functions like
ye
ax 2
we follow the same procedure.
dy dy dh
.
From the chain rule we have
dx dh dx
dh
2
Let h ax and then
2ax
dx
dy d h
e eh
dh dh
dy dy dh
ax 2
. 2axe
hence
dx dh dx
Thus for that porosity depth
relationship we were working with -
( z ) 0 e z /
d ( z ) d 0e z /
?
dz
dz
0
e z /
For logarithmic functions like
y ln( x 2 )
We combine two rules, the special rule for
d (ln x) 1
natural logs and the chain rule.
dx
x
dy dy dh
Let h x 2 then
.
dx dh dx
dy 1
dh
2 and
2x
dh x
dx
d ln( x 2 ) 2 x 2
so
2
dx
x
x
For next Tuesday answer question
8.8 in Waltham (see page 148).
Find the derivatives of
(i ) x 2 .e x
(ii) y 3 2 .sin( )
(iii) z x.cos(x) x . tan( x)
2
(iv) B 3 4 . ln( ) 17 2