Chapter 8 Slides

Download Report

Transcript Chapter 8 Slides

Chapter 8

Hypothesis Testing

8-1 Review and Preview 8-2 Basics of Hypothesis Testing 8-3 Testing a Claim about a Proportion 8-4 Testing a Claim About a Mean: σ Known 8-5 Testing a Claim About a Mean: σ Not Known 8-6 Testing a Claim About a Standard Deviation or Variance

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 1

Section 8-1 Review and Preview

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 2

Review

In Chapters 2 and 3 we used “descriptive statistics” when we summarized data using tools such as graphs, and statistics such as the mean and standard deviation. Methods of inferential statistics use sample data to make an inference or conclusion about a population. The two main activities of inferential statistics are using sample data to (1) estimate a population parameter (such as estimating a population parameter with a confidence interval), and (2) test a hypothesis or claim about a population parameter. In Chapter 7 we presented methods for estimating a population parameter with a confidence interval, and in this chapter we present the method of hypothesis testing.

8.1 - 3

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Definitions

In statistics, a hypothesis is a claim or statement about a property of a population.

A hypothesis test (or test of significance ) is a standard procedure for testing a claim about a property of a population.

8.1 - 4

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Main Objective

The main objective of this chapter is to develop the ability to conduct hypothesis tests for claims made about a population proportion p, a population mean

, or a population standard deviation

. 8.1 - 5

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Examples of Hypotheses that can be Tested

Genetics:

The Genetics & IVF Institute claims that its XSORT method allows couples to increase the probability of having a baby girl.

Business:

A newspaper headline makes the claim that most workers get their jobs through networking.

Medicine:

Medical researchers claim that when people with colds are treated with echinacea, the treatment has no effect.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 6

Examples of Hypotheses that can be Tested

Aircraft Safety:

The Federal Aviation Administration claims that the mean weight of an airline passenger (including carry-on baggage) is greater than 185 lb, which it was 20 years ago.

Quality Control:

When new equipment is used to manufacture aircraft altimeters, the new altimeters are better because the variation in the errors is reduced so that the readings are more consistent. (In many industries, the quality of goods and services can often be improved by reducing variation.) Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 7

Section 8-2 Basics of Hypothesis Testing

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 8

Key Concept

• • • • •

This section presents individual components of a hypothesis test. We should know and understand the following: How to identify the null hypothesis and alternative hypothesis from a given claim, and how to express both in symbolic form How to calculate the value of the test statistic, given a claim and sample data How to identify the critical value(s), given a significance level How to identify the P-value, given a value of the test statistic How to state the conclusion about a claim in simple and nontechnical terms

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 9

Part 1: The Basics of Hypothesis Testing

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 10

Rare Event Rule for Inferential Statistics

If, under a given assumption, the probability of a particular observed event is exceptionally small, we conclude that the assumption is probably not correct.

8.1 - 11

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Components of a Formal Hypothesis Test

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 12

Null Hypothesis:

H

0

• •

The null hypothesis (denoted by H 0 ) is a statement that the value of a population parameter (such as proportion, mean, or standard deviation) is equal to some claimed value.

We test the null hypothesis directly.

Either reject H 0 or fail to reject H 0 .

8.1 - 13

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Alternative Hypothesis:

H

1 The alternative hypothesis (denoted by H 1 or H a or H A ) is the statement that the parameter has a value that somehow differs from the null hypothesis.

The symbolic form of the alternative hypothesis must use one of these symbols:

, <, >.

8.1 - 14

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Note about Forming Your Own Claims (Hypotheses) If you are conducting a study and want to use a hypothesis test to support your claim, the claim must be worded so that it becomes the alternative hypothesis.

8.1 - 15

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Note about Identifying

H

0

and H

1 Figure 8-2

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 16

Example: Consider the claim that the mean weight of airline passengers (including carry-on baggage) is at most 195 lb (the current value used by the Federal Aviation Administration). Follow the three-step procedure outlined in Figure 8-2 to identify the null hypothesis and the alternative hypothesis.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 17

Example: Step 1: Express the given claim in symbolic form. The claim that the mean is at most 195 lb is expressed in symbolic form as

≤ 195 lb.

Step 2: If

≤ 195 lb is false, then must be true.

> 195 lb

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 18

Example: Step 3: Of the two symbolic expressions

 

≤ 195 lb and

> 195 lb, we see that > 195 lb does not contain equality, so we let the alternative hypothesis

H

1 be

> 195 lb. Also, the null hypothesis must be a statement that the mean equals 195 lb, so we let H 0 be

= 195 lb.

Note that the original claim that the mean is at most 195 lb is neither the alternative hypothesis nor the null hypothesis. (However, we would be able to address the original claim upon completion of a hypothesis test.)

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 19

Example

Page 397-398, problems 9-16

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 20

Example

Page 397-398, problem 10

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 21

Example

Page 397-398, problem 10

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 22

Example

Page 397-398, problem 12 The majority of college students have credit cards.

8.1 - 23

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Example

Page 397-398, problem 12

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 24

Hypothesis Testing

We always test the null hypothesis. The initial conclusion will always be one of the following: 1. Reject the null hypothesis.

2. Fail to reject the null hypothesis.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 25

Wording of Final Conclusion

Figure 8-7

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 26

Caution

Never conclude a hypothesis test with a statement of “reject the null hypothesis” or “fail to reject the null hypothesis.” Always make sense of the conclusion with a statement that uses simple nontechnical wording that addresses the original claim.

8.1 - 27

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Accept Versus Fail to Reject

Some texts use “accept the null hypothesis.”

We are not proving the null hypothesis. Fail to reject is more accurate

The available evidence is not strong enough to warrant rejection of the null hypothesis (such as not enough evidence to convict a suspect).

8.1 - 28

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Example

Page 398-399, problem 38 State the final conclusion in nontechnical terms. See Figure 8-7 on page 391

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 29

Example

Page 398-399, problem 38

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 30

Example

Page 398-399, problem 40 State the final conclusion in nontechnical terms. See Figure 8-7 on page 391

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 31

Example

Page 398-399, problem 40 State the final conclusion in nontechnical terms. See Figure 8-7 on page 391

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 32

Reject or Fail To Reject?

There are various decision criteria we will use to decide to reject or fail to reject the null hypothesis:

Traditional method

P-value method

Confidence intervals

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 33

Test Statistic

The test statistic is a value used in making a decision about the null hypothesis, and is found by converting the sample statistic to a score with the assumption that the null hypothesis is true.

8.1 - 34

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Test Statistic - Formulas

Test statistic for

z

 

p

proportion

pq n

Test statistic for mean Test statistic for standard deviation

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

z

x

   or

t

n x

s

n

 2  

n

 1 

s

2  2

8.1 - 35

Example

Page 398, problems 28

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 36

Example

Page 398, problems 28

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 37

P-Value

The P-value (or p-value or probability value ) is the probability of getting a value of the test statistic that is at least as extreme as the one representing the sample data, assuming that the null hypothesis is true.

Critical region in the left tail: P-value = area to the the test statistic left of Critical region in the right tail: P-value = area to the right of the test statistic Critical region in two tails: P-value = twice the area in the tail beyond the test statistic

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 38

Procedure for Finding P-Values

Figure 8-5

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 39

Type of Test and P-Value

(Left-tailed) H

1 : < P-value =

P

(

z

 test statistic)

(Right-tailed) H

1 : > P-value =

P

(

z

 test statistic)

(Two-tailed) H

1 :

test statistic negative test statistic positive

2 

P

(

z

 test statistic) Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 40

Type of Test and P-Value

The formulas on the previous slide will be given on the final exam.

8.1 - 41

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Example

Page 398, problem 30 NOTE: we will just find the P-value for now

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 42

Example

Page 398, problem 30

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 43

Example

Page 398, problem 32

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 44

Example

Page 398, problem 32

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 45

Example

Page 398, problems 34

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 46

Example

Page 398, problems 34 NOTE: this is a two-tailed test because the alternative hypothesis is the “not equal” case

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 47

Example

Page 398, problems 36

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 48

Example

Page 398, problems 36 NOTE: this is a left-tailed test because the alternative hypothesis is the “less than” case

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 49

Critical Region

The critical region (or rejection region ) is the set of all values of the test statistic that cause us to reject the null hypothesis 8.1 - 50

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Significance Level

The significance level (denoted by

) is the probability that the test statistic will fall in the critical region when the null hypothesis is actually true. This is the same

introduced in Section 7-2. Common choices for

are 0.05, 0.01, and 0.10.

8.1 - 51

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Decision Criterion Comparing P Value and Significance Level If P-value

 

, reject H

0

.

If P-value >

, fail to reject H

0

.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 52

Decision Criterion Comparing P Value and Significance Level If P-value

 

, reject H

0 IN WORDS: If we assume the null hypothesis is true and if the probability of getting a value of the test statistic that is at least as extreme as the one representing the sample data is less than or equal to the probability that the test statistic will fall in the critical region when the null hypothesis is actually true, then we reject the null hypothesis.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 53

P-Value

Here is a memory tool useful for interpreting the P-value: If the P is low, the null must go.

If the P is high, the null will fly.

8.1 - 54

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Example

Page 398, problems 30

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 55

Example

Page 398, problems 30

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 56

Example

Page 398, problems 32

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 57

Example

Page 398, problems 32

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 58

Example

Further examples using P-value method will be presented in section 8-3, pages 409-411, problems 9-30

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 59

Recap

In this section we have discussed:

Null and alternative hypotheses.

Test statistics.

Significance levels.

P-values.

Decision criteria.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 60

Section 8-3 Testing a Claim About a Proportion

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 61

Basic Methods of Testing Claims about a Population Proportion p

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 62

Notation

n

= number of trials

p x n

sample proportion)

p

= population proportion (used in the null hypothesis)

q

= 1 –

p

8.1 - 63

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Requirements for Testing Claims About a Population Proportion p

1) The sample observations are a simple random sample.

2) The conditions for a binomial distribution are satisfied.

3) The conditions np

5 and nq

5 are both satisfied, so the binomial distribution of sample proportions can be approximated by a normal distribution with

µ

= np and

= npq . Note: p is the assumed proportion not the sample proportion.

8.1 - 64

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Test Statistic for Testing a Claim About a Proportion

p

p

z

=

pq n

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 65

Caution

Don ’t confuse a P-value with a proportion p.

P-value = probability of getting a test statistic at least as extreme as the one representing sample data p = population proportion

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 66

Obtaining P

p

sometimes is given directly “10% of the observed sports cars are red” is expressed as

p

= 0.10

p

sometimes must be calculated “96 surveyed households have cable TV and 54 do not” is calculated using

p

96 = = = 0.64

(96+54) (determining the sample proportion of households with cable TV) 8.1 - 67

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

P-Value Method

1.

Formulate the null and alternative hypotheses 2. Find the sample proportion p 3. Calculate the test statistic z 4. Calculate the P-value using a left-tailed, right-tailed, or two-tailed test (depends on the alternative hypothesis H 1 ) and the standard normal distribution (Table) using the test statistic z 5. Compare the P-value with the given significance level and choose to reject H 0 or fail to reject H 0 (remember: if the P is low, the null must go) 6. Write a properly worded conclusion based on your result from step 5.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 68

Example: The text refers to a study in which 57 out of 104 pregnant women correctly guessed the sex of their babies. Use these sample data to test the claim that the success rate of such guesses is no different from the 50% success rate expected with random chance guesses. Use a 0.05 significance level.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 69

Example: Step 1: original claim is that the success rate is no different from 50%: p = 0.50

original claim is false when p ≠ 0.50

p

≠ 0.50 does not contain equality so it is H 1 .

H

0 : p = 0.50 null hypothesis and original claim

H

1 : p ≠ 0.50 alternative hypothesis

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 70

Example: Step 3: calculate z:

 57 104  0 .

55

z

 

p pq

/

n

 0 .

55  0 .

50 ( 0 .

5 )( 0 .

5 ) / 104  0 .

98 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 71

Example: Step 4: two-tailed test and z is positive, so P value is twice the area to the right of test statistic Table A-2: z = 0.98 has an area of 0.8365 to its left, so area to the right is 1 – 0.8365 = 0.1635, double this to get P-value of 0.3270

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 72

Example: Step 5: the P-value of 0.3270 is greater than the significance level of 0.05, so fail to reject the null hypothesis Step 6: Here is the correct conclusion: There is not sufficient evidence to warrant rejection of the claim that women who guess the sex of their babies have a success rate equal to 50%.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 73

Example: Step 6 (alternative interpretation): A 0.55 proportion of correct guesses would happen 32.70% of the time when a simple random sample of guesses is taken 104 times. Since 32.70% is larger than 5%, these results do not show that 50% is not the true proportion.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 74

Example

pages 409, problem 16

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 75

Example

pages 409, problem 16 Formulate the null and alternative hypotheses

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 76

Example

pages 409, problem 16 Calculate the sample proportion using the given x and n

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 77

Example

pages 409, problem 16 Calculate the test statistic

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 78

Example

pages 409, problem 16 Calculate the P-value using the fact that the Alternative hypothesis

H

1 is “greater than” case, we use a right-tailed test

P

value 

P

(

z

 2 .

83 )  1  0 .

9977  0 .

0023 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 79

Example

pages 409, problem 16 Compare the P-value with the given significance level of 0.01

0.0023 < 0.01

so we reject the null hypothesis H 0 since the P-value is less than our significance level 8.1 - 80

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Example

pages 409, problem 16 Write a properly worded conclusion

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 81

Rare Event Rule for Inferential Statistics

Previous example can be understood in terms of the rare event rule for inferential statistics:

If, under a given assumption, the probability of a particular observed event is exceptionally small, we conclude that the assumption is probably not correct.

8.1 - 82

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Example: A 0.711 proportion of correct guesses would happen 0.23% of the time when a simple random sample of guesses is taken 45 times. Since 0.23% is smaller than 1%, this is a rare event. Our null-hypothesis assumption of 50% must be incorrect and the actual proportion of correct guesses by pregnant women with more than 12 years of education is larger than 50%.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 83

Example

pages 409, problem 24

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 84

Example

pages 409, problem 24 Formulate the null and alternative hypotheses

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 85

Example

pages 409, problem 24 The sample proportion who smoke is given as

 18 .

3 %  0 .

183 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 86

Example

pages 409, problem 24 Calculate the test statistic

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 87

Example

pages 409, problem 24 Calculate the P-value using the fact that the alternative hypothesis

H

1 is “less than” case, we use a left-tailed test

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 88

Example

pages 409, problem 24 Compare the P-value with the given significance level of 0.01

0.0001 < 0.01

so we reject the null hypothesis H 0 since the P-value is less than our significance level 8.1 - 89

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

Example

pages 409, problem 24 Write a properly worded conclusion

Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.

8.1 - 90