Errors in Hypothesis Testing

Post on 06-Jan-2016

61 views 0 download

description

Errors in Hypothesis Testing. 2 TYPES OF ERRORS. TRUE CASE H A is true H A is false WE Accept H A SAY Do not Accept H A. TYPE I ERROR. CORRECT. PROB = α. TYPE II ERROR. CORRECT. PROB = β. α is set by the decision maker. β varies and depends on: - PowerPoint PPT Presentation

Transcript of Errors in Hypothesis Testing

Errors inErrors in

Hypothesis TestingHypothesis Testing

TRUE CASETRUE CASE

HAis true HAis false

WEWE Accept HA

SAYSAY Do not Accept HA

2 TYPES OF ERRORS

CORRECT

CORRECT

TYPE I

ERROR

TYPE II

ERROR

PROB = α

PROB = β

α is set by the decision maker

β varies and depends on:

(1) α; (2) n; (3) the true value of

Relationship Between and is the Probability of making a Type II error

– i.e. the probability of not concluding HA is true when it is

depends on the true value of • The closer the true value of is to its hypothesized value,

the more likely we are of not concluding that HA is true -- i.e. is large (closer to 1)

is calculated BEFOREBEFORE a sample is taken– We do not use the results of a sample to calculate

• Example: If we take a sample of n = 49, with = 4.2, “What is the probability we will get a sample from which we would not conclude > 25 when really = 25.5?” (Use = .05)

REWRITE REJECTION REGION IN TERMS OF

CALCULATING

x

The Hypothesis Test The Hypothesis Test

987.2549

2.4645.125x

645.1

494.2

25xz if HAccept A

or if

CALCULATING (cont’d)

• So when = 25.5,– If we get an > 25.987, we will correctly conclude

that > 25– If we get an < 25.987 we will not conclude that

> 25 even though really = 25.5

x

x

That’s aTYPE II ERROR!!

P(Making this error) =

CALCULATING (cont’d)

x

49

x

ββ

• So what is P(not getting an > 25.987 when really = 25.5? That is P(getting an < 25.987)?Calculate z = (25.987 - 25.5)/(4.2/ ) .81

• is the area to the leftleft of .81 for a “>” test• P(Z < .81) = .7910.7910

“>” TestDetermining When = 25.5

0 .81 Z

X25.5 25.987

ACCEPT HA

RIGHT!

DO NOTACCEPT HA

WRONGProb = =.7910

.7910.7910

What is When = 27?

x

49

x

ββ

This shows that the further the true value of is from the

hypothesized value of , the smallersmaller the value of β; that is we

are less likely to NOT conclude that HA is true (and it is!)

• So what is P(not getting an > 25.987 when really = 27? That is P(getting an < 25.987)?Calculate z = (25.987 - 27)/(4.2/ ) -1.69

• is the area to the leftleft of -1.69 for a “>” test• P(Z < -1.69) = .0455.0455

“>” TestDetermining When = 27

-1.69 0 Z

X25.987 27

ACCEPT HA

RIGHT!

DO NOTACCEPT HA

WRONGProb = =.0455

.0455.0455

for “<” Tests

• For n = 49, = 4.2, “What is the probability of not concluding that < 27, when really is 25.5? (With = .05)

• This time is the area to the rightright of x

013.2649

2.4645.127x

645.1

494.2

27xz if HAccept A

or if

The Hypothesis Test The Hypothesis Test

What is When = 25.5?

x

49

x

ββ

• So what is P(not getting an < 26.013 when really = 25.5? That is P(getting an > 26.013)?Calculate z = (26.013 – 25.5)/(4.2/ ) .86

• is the area to the rightright of .86 for a “<” test• P(Z > .86) = 1 - .8051 = .1949.1949

“<” TESTDetermining When = 25.5

0 .86 Z

X25.5 26.013

ACCEPT HA

RIGHT!

.8051.8051

.1949.1949

DO NOTACCEPT HA

WRONGProb = =.1949

for “” Tests• For n = 49, = 4.2, “What is the probability of not

concluding that 26, when really is 25.5? (With = .05)

• This time is the area in the middlein the middle between the two critical values of

x

176.2749

2.496.126x

or 824.2449

2.496.126x

1.96or 1.96

494.2

26xz if HAccept A

or if

The Hypothesis TestThe Hypothesis Test

What is When = 25.5?

x

x

49

ββ

49

• So what is P(not getting an < 24.824 or > 27.176 when really = 25.5? That is P(24.824 < < 27.176)?Calculate z’s = (24.824 – 25.5)/(4.2/ ) -1.13

and = (27.176 – 25.5)/(4.2/ ) 2.79

• is the area in betweenin between -1.13 and 2.79 for a “” test

• P(Z < 2.79) = .9974.9974 • P(Z < -1.13) = .1292.1292

P(-1.13 < Z < 2.79 = .9974.9974 - .1292.1292 = .8682.8682

“” TESTDetermining When = 25.5

-1.13 0 2.79 Z

X24.824 25.5 27.176

DO NOTACCEPT HA

WRONGProb = =.9974 –

.1292 =.8682

ACCEPT HA

RIGHT!

.9974.1292

.8682

The Power of a Test = 1 -

is the Probability of making a Type II error– i.e. the probability of not concluding HA is true when

it is depends on the true value of and sample

size, n• The Power of the test for a particular value of

is defined to be the probability of concluding HA is true when it is -- i.e. 1 - 1 -

Power Curve Characteristics

• The power increases with:– Sample Size, n– The distance the true value of μ is from the

hypothesized value of μ

Power Curves For HA: μ 26With n = 25 and n = 49

n = 49

n = 25

α = .05

Calculating Using Excel“> Tests”

Suppose H0 is = 25; = 4.2, n = 49, = .05

““>” TESTS>” TESTS: HA: > 25 and we want when the true value of = 25.5

1) Calculate the criticalcritical x-bar x-bar value = 25 + NORMSINV(.95)*(4.2/SQRT(49))

2) Calculate z = (criticalcritical x-bar x-bar -25.5)/ (4.2/SQRT(49))

3) Calculate the the probability of getting a z- value < than this critical z value: -- this is this is =NORMSDIST(z)NORMSDIST(z)

Calculating Using Excel“< Tests”

Suppose H0 is = 27; = 4.2, n = 49, = .05

““< TESTS”:< TESTS”: HA: < 27 and we want when the true value of = 25.5

1) Calculate the critical x-barcritical x-bar value = 27 - NORMSINV(.95)*(4.2/SQRT(49))

2) Calculate z = (criticalcritical x-bar x-bar -25.5)/ (4.2/SQRT(49))

3) Calculate the the probability of getting a z- value > than the critical value: -- this is this is

=1-NORMSDIST(z)

Calculating Using Excel“ Tests”

Suppose H0 is = 26; = 4.2, n = 49, = .05

TESTS:TESTS: HA: 26 and we want when the true value of = 25.5

1) Calculate the critical uppercritical upper x-barx-barUU value and the

lower criticallower critical x-barx-barLL value

= 26 - NORMSINV(.975)*(4.2/SQRT(49)) (x-barx-barLL)

= 26 + NORMSINV(.975)*(4.2/SQRT(49)) (x-barx-barUU)

2) Calculate zU = (x-barx-barUU -25.5)/ (4.2/SQRT(49)) and zL = (x-x-

barbarLL -25.5)/ (4.2/SQRT(49))

3) Calculate the the probability of getting an z- value in between zL and zU - this is this is =NORMSDIST(zU) - NORMSDIST(zL)

β for “>” Tests

=B3+NORMSINV(1-B2)*(B5/SQRT(B6))

=(B8-B7)/(B5/SQRT(B6))

=NORMSDIST(B9)

=1-B10

β for “<” Tests

=B3-NORMSINV(1-B2)*(B5/SQRT(B6))

=(B8-B7)/(B5/SQRT(B6))

=1-NORMSDIST(B9)

=1-B10

β for “” Tests =B3-NORMSINV(1-B2/2)*(B5/SQRT(B6))

=B3+NORMSINV(1-B2/2)*(B5/SQRT(B6))

=(B8-B7)/(B5/SQRT(B6))

=(B9-B7)/(B5/SQRT(B6))

=NORMSDIST(B11)-NORMSDIST(B10)

=1-B12

REVIEW

• Type I and Type II Errors = Prob (Type I error) = Prob (Type II error) -- depends on , n and α

• How to calculate for:– “>” Tests– “<” Tests– “” Tests

• Power of a Test at = 1- • How to calculate using EXCEL