Tom.h.wilson wilson@geo.wvu.edu Dept. Geology and Geography West Virginia University

Preview:

Citation preview

tom.h.wilsonwilson@geo.wvu.e

du

Dept. Geology and Geography

West Virginia University

Making the t-test using tables of the critical values of t for various levels of confidence.

But first - some review

es

DDt 21

The test statistic

We have the means of two samples

1D 2D&

es is the standard error,But its computed differently from the

single sample standard error which is just

N

sse

ˆ s is the unbiased estimate of

the standard deviation

Note:

How do we compute the critical value of t - the test

statistic?

es

DDt 21

In this case 21

11

nnss pe wher

e

2

)1()1(

21

222

2112

nn

snsnsp

sp is the pooled estimate of the standard deviation derived as

follows

N

sse

ˆ

Sim

ilar fo

rm

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 two-tailed 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.

4)( dxxdyy

multiplying that out -- you get ... 432234 )()(4)(64 dxdxxdxxdxxxdyy

432234 )()(4)(64 dxdxxdxxdxxxdyy

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

432234 )()(4)(64 dxdxxdxxdxxxdyy

so that we can just ignore all those terms with (dx)n where n is greater than 1.

dxxxdyy 34 4

Our equation gets simple fast

Also, since y =x4, we have dxxydyy 34

dxxdy 34

and then -

34xdx

dy

Divide both sides of this equation by dx to get

dxxdy 34

This is just another illustration of what you already know as the power rule,

1 nnaxdx

dyis

Just as a footnote, remember that the constant factors in an expression carry through the differentiation.This is obvious when we consider the derivative -

baxy 2

which - in general for

naxy

bdxxadyy 2)(

bdxxdxxadyy )2( 22

axdxbaxdyy 2)( 2 axdxydyy 2

)2( xadx

dy

Examining the effects of differential increments in y and x we get the

following

Don’t let negative exponents fool you. If n is -1, for example, we still have

1 nnaxdx

dy

2 axdx

dy

or just

)()()( xgxfxy Given the function -

what is dx

dy?

dx

dg

dx

df

dx

dy

We just differentiate f and g individually and take their sum, so that

Take the simple example )()( 42 baxcxy

- what is

dx

dy?

What are the individual derivatives of )( 2 cx )( 4 bax and ?

)( 2 cxf let

then - dx

cxd

dx

df )( 2

We just apply the power rule and obtain

xdx

df2

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)34ax

dx

dg

Thus - 342 axx

dx

dy

)()( 42 baxcxdx

d

dx

dy

Differences are treated just like sums

so that

is just

342 axxdx

dy

Recall how to handle derivatives of functions like

)()()( xgxfxy

?

or

)(

)()(

xg

xfxy

fgy

Removing explicit reference to the independent variable x, we have

))(( dggdffdyy Going back to first principles, we have

Evaluating this yields dfdgfdggdffgdyy

Since df x dg is very small and since y=fg, the above becomes -

fdggdfdy

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

g

fy

2gdx

dgfdxdfg

g

f

dx

d

The quotient rule states that

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

1 fgg

fy

fhy

We could let h=g-1 and then rewrite y as

Its derivative using the product rule is just

dx

dhf

dx

dfh

dx

dy

dh = -g-2dg and substitution yields

2gdx

dgf

gdx

df

dx

dy

2gdx

dgf

gdx

df

g

g

dx

dy

Multiply the first term in the sum by g/g (i.e. 1) to get >

Which reduces to

2gdx

dgfdxdfg

dx

dy

i.e. the quotient rule

•The derivative of an exponential functions

xey

xedx

dy

Given >

In general for axey xedx

axd

dx

dy )( axae

xay If express a as en so that nxxn eey

then nxnx needx

d

dx

dy

)ln()ln( aen n Note

nxnx needx

d

dx

dy

Since nxx ea and

)ln(an

xaadx

dy . )ln(

in general

a can be thought of as a general base. It could be 10 or 2, etc.

•The derivative of logarithmic functions

Given >

)ln(xy

xdx

dy 1

We’ll talk more about these special cases after we talk about the chain

rule.

Differentiating functions of functions -

Given a function

22 )1( xy we consider

)()1( 2 xhx write 2hy compute

hhdh

d

dh

dy22

Then compute

xxdx

d

dx

dh212 an

d

take the product of the two, yielding dx

dh

dh

dy

dx

dy.

xxdx

dh

dh

dy

dx

dy2).1(2. 2

)1(4 2 xx

22 )1( xy

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

22 )1( xyWhere

xxdx

dy2.)1(2 12

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 )2sin( axy

let axh 2

then dx

dh

dh

dy

dx

dy.

Which reduces to aaxdx

dy2).2cos( or just

)2cos(2 axadx

dy

In general if

))...))))((...(((( xqihgfy

then

dx

dq

di

dh

dh

dg

dg

df

df

dy

dx

dy........

axey ( ) axdy d axe

dx dx axae

Returning to those exponential and natural log cases - we already implemented the chain rule when differentiating

h in this case would be ax and, from the chain rule,

dx

dh

dh

dy

dx

dy. become

s dx

dh

dh

de

dx

dy h

. or

dx

dhe

dx

dy h. and finally

axaedx

dy

since

axh and

adx

dh

For functions like 2axey

we follow the same procedure.

Let 2axh and then

From the chain rule we have dx

dh

dh

dy

dx

dy.

axdx

dh2

hh eedh

d

dh

dy

22. axaxe

dx

dh

dh

dy

dx

dyhence

Thus for that porosity depth relationship we were working with

- /

0)( zez

?

)( /0

dz

ed

dz

zd z

/0 ze

For logarithmic functions like )ln( 2xy

We combine two rules, the special rule for natural logs and the chain rule.

Let 2xhdx

dh

dh

dy

dx

dy.Chain

rule

Log

rule xdx

xd 1)(ln

then

2

1

xdh

dy an

dx

dx

dh2

soxx

x

dx

xd 22)ln(2

2

For next Tuesday answer question 8.8 in Waltham (see page 148).

xexi . )( 2

)sin(.3 )( 2 yii

)tan(.xx.cos(x) )( 2 xziii 24 17)ln(.3 )( Biv

Find the derivatives of

Recommended