41
Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing 7-3 Testing a Claim about a Mean: Large Samples 7-4 Testing a Claim about a Mean: Small Samples 7-5 Testing a Claim about a Proportion 7-6 Testing a Claim about a Standard Deviation or Variance

Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Embed Size (px)

Citation preview

Page 1: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 1

Chapter 7Hypothesis Testing

7-1 Overview

7-2 Fundamentals of Hypothesis Testing

7-3 Testing a Claim about a Mean: Large Samples

7-4 Testing a Claim about a Mean: Small Samples

7-5 Testing a Claim about a Proportion

7-6 Testing a Claim about a Standard Deviation or Variance

Page 2: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 2

Hypothesis

in statistics, is a claim or statement about a property of a population

Hypothesis Testing is to test the claim or statement

Example: A conjecture is made that “the average starting salary for computer science gradate is $30,000 per year”.

Page 3: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 3

Question: How can we justify/test this conjecture?

A. What do we need to know to justify this conjecture?

B. Based on what we know, how should we justify this conjecture?

Page 4: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 4

Answer to A: Randomly select, say 100, computer

science graduates and find out their annual salaries

---- We need to have some sample observations, i.e., a sample set!

Page 5: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 5

Answer to B: That is what we will learn in this

chapter

---- Make conclusions based on the sample observations

Page 6: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 6

Statistical Reasoning

Analyze the sample set in an attempt to distinguish between results that can easily occur and results that are highly unlikely.

Page 7: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 7

Figure 7-1 Central Limit Theorem:

Page 8: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 8

Figure 7-1 Central Limit Theorem:

Distribution of Sample Means

µx = 30k

Likely sample means

Assume the conjecture is true!

Page 9: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 9

Figure 7-1 Central Limit Theorem:

Distribution of Sample Means

z = –1.96

x = 20.2k

or

z = 1.96

x = 39.8k

or

µx = 30k

Likely sample means

Assume the conjecture is true!

Page 10: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 10

Figure 7-1 Central Limit Theorem:

Distribution of Sample Means

z = –1.96

x = 20.2k

or

z = 1.96

x = 39.8k

or

Sample data: z = 2.62

x = 43.1k or

µx = 30k

Likely sample meansAssume the conjecture is true!

Page 11: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 11

Components of aFormal Hypothesis

Test

Page 12: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 12

Definitions Null Hypothesis (denoted H 0):

is the statement being tested in a

test of hypothesis.

Alternative Hypothesis (H 1):

is what is believe to be true if the

null hypothesis is false.

Page 13: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 13

Null Hypothesis: H0

Must contain condition of equality

=, , or

Test the Null Hypothesis directly

Reject H 0 or fail to reject H 0

Page 14: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 14

Alternative Hypothesis: H1

Must be true if H0 is false

, <, >

‘opposite’ of Null

Example:

H0 : µ = 30 versus H1 : µ > 30

Page 15: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 15

Stating Your Own HypothesisIf you wish to support your claim, the

claim must be stated so that it becomes the alternative hypothesis.

Page 16: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 16

Important Notes:

H0 must always contain equality; however some claims are not stated using equality. Therefore sometimes the claim and H0 will not be the same.

Ideally all claims should be stated that they are Null Hypothesis so that the most serious error would be a Type I error.

Page 17: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 17

Type I ErrorThe mistake of rejecting the null hypothesis when

it is true.

The probability of doing this is called the significance level, denoted by (alpha).

Common choices for : 0.05 and 0.01

Example: rejecting a perfectly good parachute and refusing to jump

Page 18: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 18

Type II Errorthe mistake of failing to reject the null

hypothesis when it is false.

denoted by ß (beta)

Example: failing to reject a defective parachute and jumping out of a plane with it.

Page 19: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 19

Table 7-2 Type I and Type II Errors

True State of Nature

We decide to

reject the

null hypothesis

We fail to

reject the

null hypothesis

The null

hypothesis is

true

The null

hypothesis is

false

Type I error

(rejecting a true

null hypothesis)

Type II error

(failing to reject

a false null

hypothesis)

Correct

decision

Correct

decision

Decision

Page 20: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 20

DefinitionTest Statistic: is a sample statistic or value based on sample

data Example:

z = x – µx

n

Page 21: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 21

Definition Critical Region : is the set of all values of the test statistic

that would cause a rejection of the null hypothesis

Page 22: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 22

Critical Region• Set of all values of the test statistic that

would cause a rejection of thenull hypothesis

CriticalRegion

Page 23: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 23

Critical Region• Set of all values of the test statistic that

would cause a rejection of the • null hypothesis

CriticalRegion

Page 24: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 24

Critical Region• Set of all values of the test statistic that

would cause a rejection of the null hypothesis

CriticalRegions

Page 25: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 25

Definition

Critical Value: is the value (s) that separates the critical

region from the values that would not lead to a rejection of H 0

Page 26: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 26

Critical ValueValue (s) that separates the critical region

from the values that would not lead to a rejection of H 0

Critical Value( z score )

Page 27: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 27

Critical ValueValue (s) that separates the critical region

from the values that would not lead to a rejection of H 0

Critical Value( z score )

Fail to reject H0Reject H0

Page 28: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 28

Controlling Type I and Type II Errors

, ß, and n are related

when two of the three are chosen, the third is determined

and n are usually chosen

try to use the largest you can tolerate

if Type I error is serious, select a smaller value and a larger n value

Page 29: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 29

Conclusions in Hypothesis Testing

always test the null hypothesis

1. Fail to reject the H 0

2. Reject the H 0

need to formulate correct wording of final conclusion

See Figure 7-2

Page 30: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 30

Original

claim is H0

FIGURE 7-2 Wording of Conclusions in Hypothesis Tests

Doyou reject

H0?.

Yes

(Reject H0)

“There is sufficientevidence to warrantrejection of the claimthat. . . (original claim).”

“There is not sufficientevidence to warrantrejection of the claimthat. . . (original claim).”

“The sample datasupports the claim that . . . (original claim).”

“There is not sufficientevidence to support the claim that. . . (original claim).”

Doyou reject

H0?

Yes

(Reject H0)

No(Fail to

reject H0)

No(Fail to

reject H0)

(This is theonly case inwhich theoriginal claimis rejected).

(This is theonly case inwhich theoriginal claimis supported).

Original

claim is H1

Page 31: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 31

Two-tailed,Left-tailed,Right-tailed

Tests

Page 32: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 32

Left-tailed Test

H0: µ 200

H1: µ < 200

Page 33: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 33

Left-tailed Test

H0: µ 200

H1: µ < 200Points Left

Page 34: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 34

Left-tailed Test

H0: µ 200

H1: µ < 200

200

Values that differ significantly

from 200

Fail to reject H0Reject H0

Points Left

Page 35: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 35

Right-tailed TestH0: µ 200

H1: µ > 200

Page 36: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 36

Right-tailed TestH0: µ 200

H1: µ > 200

Points Right

Page 37: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 37

Right-tailed TestH0: µ 200

H1: µ > 200

Values that differ significantly

from 200200

Fail to reject H0Reject H0

Points Right

Page 38: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 38

Two-tailed TestH0: µ = 200

H1: µ 200

Page 39: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 39

Two-tailed TestH0: µ = 200

H1: µ 200 is divided equally between

the two tails of the critical region

Page 40: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 40

Two-tailed TestH0: µ = 200

H1: µ 200

Means less than or greater than

is divided equally between the two tails of the critical

region

Page 41: Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Chapter 7 Hypothesis Testing 7-1 Overview 7-2 Fundamentals of Hypothesis Testing

Copyright © 1998, Triola, Elementary Statistics

Addison Wesley Longman 41

Two-tailed TestH0: µ = 200

H1: µ 200

Means less than or greater than

Fail to reject H0Reject H0Reject H0

200

Values that differ significantly from 200

is divided equally between the two tails of the critical

region