42
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Embed Size (px)

Citation preview

Page 1: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc.

Testing Hypotheses

About Proportions

Chapter 11

Page 2: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 2

Hypothesis testing method: uses data from a sample to judge whether or not a statement about a population may be true.

Steps in Any Hypothesis Test1. Determine the null and alternative hypotheses.

2. Verify necessary data conditions, and if met, summarize the data into an appropriate test statistic.

3. Assuming the null hypothesis is true, find the p-value.

4. Decide whether or not the result is statistically significant based on the p-value.

5. Report the conclusion in the context of the situation.

Page 3: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 3

11.1 FormulatingHypothesis Statements

• Does a majority of the population favor a new legal standard for the blood alcohol level that constitutes drunk driving?

Hypothesis 1: The population proportion favoring the new standard is not a majority.

Hypothesis 2: The population proportion favoring the new standard is a majority.

Page 4: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 4

More on Formulating Hypotheses

• Do female students study, on average, more than male students do?

Hypothesis 1: On average, women do not study more than men do.

Hypothesis 2: On average, women do study more than men do.

Page 5: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 5

Terminology for the Two Choices

Null hypothesis: Represented by H0, is a statement that there is nothing happening. Generally thought of as the status quo, or no relationship, or no difference. Usually the researcher hopes to disprove or reject the null hypothesis.

Alternative hypothesis: Represented by Ha, is a statement that something is happening. Generally it is what the researcher hopes to prove. It may be a statement that the assumed status quo is false, or that there is a relationship, or that there is a difference.

Page 6: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 6

Examples of H0 and Ha

Null hypothesis examples:

• There is no extrasensory perception.

• There is no difference between the mean pulse rates of men and women.

• There is no relationship between exercise intensity and the resulting aerobic benefit.

Alternative hypothesis examples:

• There is extrasensory perception.

• Men have lower mean pulse rates than women do.

• Increasing exercise intensity increases the resulting aerobic benefit.

Page 7: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 7

Example 11.1 Are Side Effects Experienced by Fewer than 20% of Patients?

Pharmaceutical company wants to claim that the proportion of patients who experience side effects is less than 20%.

Null: 20% (or more) of users will experience side effects.

Alternative: Fewer than 20% of users will experience side effects.

Notice that the claim that the company hopes to prove is used as the alternative hypothesis.

The alternative is one-sided.

Page 8: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 8

Example 11.2 Does a Majority Favor the Proposed Blood Alcohol Limit?

Legislator’s plan is to vote for the proposal if there is conclusive evidence that a majority of her constituents favor the proposal.

H0: p .5 (not a majority)

Ha: p > .5 (a majority)

Note: p = the proportion of her constituents that favors the proposal.

The alternative is one-sided.

Page 9: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 9

11.2 Logic of Hypothesis Testing What if the Null is True?

Similar to “presumed innocent until proven guilty” logic.

We assume the null hypothesis is a possible truth until the sample data conclusively demonstrate otherwise.

The Probability Question on Which Hypothesis Testing is Based

If the null hypothesis is true about the population, what is the probability of observing sample data like that observed?

Page 10: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 10

Example 11.3 Psychic Powers Cartoon: Two characters playing a coin-flipping game.

Character 1: correctly guesses outcome of 100 flips.Character 2: “just a coincidence”

Null: Character 1 does not have Psychic Powers (is just guessing) Alternative: Character 1 has Psychic Powers

Q: If character only guessing, how likely is correctly guessing 100 consecutive fair coin tosses?

A: (½)100 => extraordinarily small.

We reject the null hypothesis because the sample results are extremely inconsistent with it.

We conclude character was using psychic powers.

Page 11: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 11

Example 11.4 Stop Pain before It Starts

Painkiller Study: Men randomly assigned to “experimental” group (began taking painkillers before operation) or to “control” group (began taking painkillers after the operation).

Null: Effectiveness of Painkillers is the same whether taken before or after surgery.

If null hypothesis is true, probability is only 1 in 500 that the observed difference could have been as large as it was or larger. Reasonable to reject the null hypothesis of equal effectiveness.

“But 9 1/2 weeks later . . . only 12 members of the 60 men in the experimental group were still feeling pain. Among the 30 control group members, 18 were still feeling pain. … the likelihood of this difference being due to chance was only 1 in 500.”

Page 12: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 12

11.3 Reaching a Conclusion About the Two Hypotheses

• Data summary used to evaluate the two hypotheses is called the test statistic.

• Likelihood of observing a test statistic as extreme as what we did, or something even more extreme, if the null hypothesis is true is called the p-value.

• Decision: reject H0 if the p-value is smaller than a designated level of significance, denoted by (usually 0.05, sometimes 0.10 or 0.01). In this case the result is statistically significant.

Page 13: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 13

Stating the Two Possible Conclusions

• When the p-value is small, we reject the null hypothesis or, equivalently, we accept the alternative hypothesis. “Small” is defined as a p-value , where level of significance (usually 0.05).

• When the p-value is not small, we conclude that we cannot reject the null hypothesis or, equivalently, there is not enough evidence to reject the null hypothesis. “Not small” is defined as a p-value > ,where = level of significance (usually 0.05).

Page 14: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 14

11.4 Testing Hypotheses About a Proportion

Possible null and alternative hypotheses:

1. H0: p = p0 versus Ha: p p0 (two-sided)

2. H0: p p0 versus Ha: p < p0 (one-sided)

3. H0: p p0 versus Ha: p > p0 (one-sided)

p0 = specific value called the null value. Often H0 for a one-sided test is written as H0: p = p0. Remember a p-value is computed assuming H0 is true, and p0 is the value used for that computation.

Page 15: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 15

• Determine the sampling distribution of possible sample proportions when the true population proportion is p0 (called the null value), the value specified in H0.

• Using properties of this sampling distribution, calculate a standardized score (z-score) for the observed sample proportion .

• If the standardized score has a large magnitude, conclude that the sample proportion would be unlikely if the null value p0 is true, and reject the null hypothesis.

The z-Test for a Proportion

Page 16: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 16

1. The sample should be a random sample from the population.

Not always practical – most use test procedure as long as sample is representative of the population for the question of interest.

2. The quantities np0 and n(1 – p0) should both be at least 10.

A sample size requirement. Some authors say at least 5 instead of our conservative 10.

Conditions for Conducting the z-Test

Page 17: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 17

Example 11.6 The Importance of OrderSurvey of n = 190 college students. About half (92) asked: “Randomly pick a letter - S or Q.”Other half (98) asked: “Randomly pick a letter - Q or S.”Is there a preference for picking the first?

Step 1: Determine the null and alternative hypotheses.

Let p = proportion of population that would pick first letter.

Null hypothesis: statement of “nothing happening.” If no general preference for either first or second letter, p = .5

Alternative hypothesis: researcher’s belief or speculation. A preference for first letter => p is greater than .5.

H0: p = p0 versus Ha: p > p0 (one-sided)

Page 18: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 18

Example 11.6 Importance of Order (cont)

Step 2: Verify necessary data conditions, and if met, summarize the data into an appropriate test statistic.

1. The sample should be a random sample from the population.

The sample is a convenience sample of students who were enrolled for a class. Does not seem this will bias results for this question, so will view the sample as a random sample.

2. The quantities np0 and n(1 – p0) should both be at least 10.

With n = 190 and p0 = .5, both n p0 and n(1 – p0) equal 95, a quantity larger than 10, so the sample size condition is met.

Page 19: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 19

Example 11.6 Importance of Order (cont)

Step 2: Verify necessary data conditions, and if met, summarize the data into an appropriate test statistic.

Of 92 students asked “S or Q,” 61 picked S, the first choice. Of 98 students asked “Q or S,” 53 picked Q, the first choice. Overall: 114 students picked first choice => 114/190 = .60.

The sample proportion, .60, is used to compute the z-test statistic, the standardized score for measuring the difference between the = .60, and the null hypothesis value, p0 = .50.p̂

The z-statistic = 2.76 (formula comes later).

Page 20: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 20

Example 11.6 Importance of Order (cont)

Step 3: Assuming the null hypothesis is true, find the p-value.

If the true p is .5, what is the probability that, for a sample of 190 people, the sample proportion could be as large as .60 (or larger)?

or equivalentlyIf the null hypothesis is true, what is the probability that the z-statistic could be as large as 2.76 (or larger)?

Using computer, calculator, or standard normal table:p-value = 0.003

Page 21: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 21

Example 11.6 Importance of Order (cont)

Step 4: Decide whether or not the result isstatistically significant based on the p-value.

Convention used by most researchers is to declare statistical significance when the

p-value is smaller than 0.05.

The p-value = 0.003 so the results are statistically significantand we can reject the null hypothesis.

Page 22: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 22

Example 11.6 Importance of Order (cont)

Step 5: Report the conclusion in the context of the problem.

Statistical Conclusion = Reject the null hypothesis that p = 0.50

Context Conclusion = there is statistically significant evidence that the first letter presented is preferred.

Page 23: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 23

The z-statistic for the significance test is

• represents the sample estimate of the proportion

• p0 represents the specific value in null hypothesis

• n is the sample size

Details for Calculating the z-Statistic

n

pp

ppz

00

0

1

ˆ

error standard null

valuenullestimate sample

Page 24: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 24

• For Ha less than, find probability the test statistic z could have been equal to or less than what it is.

• For Ha greater than, find probability the test statistic z could have been equal to or greater than what it is.

• For Ha two-sided, p-value includes the probability areas in both extremes of the distribution of the test statistic z.

Computing the p-value for the z-Test

Page 25: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 25

Example 11.6 Importance of Order (cont)

Calculating z-Statistic and Finding the p-value

From Table A.1, the area to the left of z = 2.76 is 0.997.So the p-value = 1 – 0.997 = 0.003.

76.2

1905.15.

5.6.

1

ˆ

00

0

npp

ppz

Page 26: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 26

Example 11.1 Fewer than 20%? (cont)

Clinical Trial of n = 400 patients. 68 patients experienced side effects.

Can the company claim that fewer than 20% will experience side effects?

Step 1: Determine the null and alternative hypotheses.

H0: p .2 (company’s claim is not true)

Ha: p < .2 (company’s claim is true)

Page 27: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 27

Example 11.1 Fewer than 20%? (cont)

Step 2: Verify necessary data conditions, and if met, summarize the data into an appropriate test statistic.

1. A random sample from the population – reasonable.

2. The quantities np0 and n(1 – p0) should both be at least 10. With n = 400 and p0 = .2, the sample size condition is met.

5.1

40020.120.

20.17.

1

ˆ

00

0

n

pp

ppz

Out of 400 patients, 68 experienced side effects. Sample proportion = 68/400 = .17.

Page 28: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 28

Example 11.1 Fewer than 20%? (cont)

Step 3: Assuming the null hypothesis is true,

find the p-value.

From Table A.1, the area to the left of z = -1.5 is 0.067.So p-value = 0.067

Page 29: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 29

Example 11.1 Fewer than 20%? (cont)

Step 4: Decide whether or not the result isstatistically significant based on the p-value.

Step 5: Report the conclusion in the context of the problem.

The p-value = 0.067 so the results are not statistically significant and we cannot reject the null hypothesis.

Company cannot reject idea that the population proportion who would experience side effects is .20 (or more).

Page 30: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 30

Example 11.7 Left and Right Foot Lengths

Step 1: Determine the null and alternative hypotheses.H0: p = .2 versus Ha: p .2

Sample: n = 112 college students with unequal right and left foot measurements. Let p = population proportion with a longer right foot.Are Left and Right Foot Lengths Equal or Different?

Step 2: Verify necessary data conditions, and if met, summarize the data into an appropriate test statistic.

32.1

1125.15.

5.5625.

1

ˆ

00

0

npp

ppz

Sample proportion with longer right foot = 63/112 = .5625

Page 31: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 31

Example 11.7 Left and Right Foot Lengths

Step 3: Assuming the null hypothesis is true,

find the p-value.

From Table A.1, the area to the left of z = -1.32 is 0.093.So p-value = 2(0.093) = 0.186

Page 32: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 32

Example 11.7 Left and Right Foot Lengths

Step 4: Decide whether or not the result isstatistically significant based on the p-value.

Step 5: Report the conclusion in the context of the problem.

The p-value = 0.186 so the results are not statistically significant and we cannot reject the null hypothesis.

Although was a tendency toward a longer right foot in sample, there is insufficient evidence to conclude the proportion in the population with a longer right foot is different from the proportion with a longer left foot.

Page 33: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 33

Rejection region: the region of possible values for the test statistic that would lead to rejection of the null hypothesis. If the null hypothesis is true, the probability that the computed test statistic will fall in the rejection region is , the desired level of significance.

Rejection Region Approach

Page 34: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 34

11.5 Role of Sample Size in Statistical Significance

Cautions about Sample Size and Statistical Significance

• If a small to moderate effect in the population, a small sample has little chance of being statistically significant.

• With a large sample, even a small and unimportant effect in the population may be statistically significance.

Page 35: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 35

Example 11.8 Same Sample Proportion Can Produce Different Conclusions

Let p = proportion in population that would prefer Drink A.

H0: p = .5 (no preference)

Ha: p .5 (preference for one or other)

Taste Test: Sample of people taste both drinks and record how many like taste of Drink A better than B.

Results based on two sample sizes: n = 60 and n = 960 and the sample proportion for both is 0.55.

Page 36: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 36

Example 11.8 Different Conclusions (cont)

Results when n = 60 33 of the 60 preferred Drink A; = 0.55 95% CI: (0.42, 0.68) widerTest statistic z = 0.77 and p-value = 0.439

Not statistically significant

Results when n = 960528 or the 960 preferred Drink A; = 0.55 95% CI: (0.52, 0.58) narrowerTest statistic z = 3.10 and p-value = 0.002

Statistically significant

Page 37: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 37

The z-value changes because the sample size affects the standard error.

Why more significant for larger n?

• When n =60, the null standard error = .065.

• When n = 960, the null standard error = .016.

Increasing n decreases null standard error => an absolute difference between the sample proportion and null value is more significant

Page 38: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 38

11.6 Real Importance versus Statistical Significance

The p-value does not provide information about the magnitude of the effect.

The magnitude of a statistically significant effect can be so small that the practical effect is not important.

If sample size large enough, almost any null hypothesis can be rejected.

Page 39: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 39

Example 11.9 Birth Month and Height

Austrian study of heights of 507,125 military recruits.

Men born in spring were, on average, about 0.6 cm taller than men born in fall (Weber et al., Nature, 1998, 391:754–755).

A small difference: 0.6 cm = about 1/4 inch.

Sample size so large that even a very small difference was statistically significant.

Headline: Spring Birthday Confers Height Advantage

Page 40: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 40

Case Study 11.1 Internet and Loneliness

A closer look: actual effects were quite small.

“one hour a week on the Internet was associated, on average, with an increase of 0.03, or 1 percent on the depression scale” (Harman, 30 August 1998, p. A3).

“greater use of the Internet was associated with declines in participants’ communication with family members in the household, declines in size of their social circle, and increases in their depression and loneliness” (Kraut et al., 1998, p. 1017)

Page 41: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 41

11.7 What Can Go Wrong?

A type 1 error can only occur when the null hypothesis is actually true. The error occurs by concluding that the alternative hypothesis is true.

A type 2 error can only occur when the alternative hypothesis is actually true. The error occurs by concluding that the null hypothesis cannot be rejected.

Page 42: Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Testing Hypotheses About Proportions Chapter 11

Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. 42

Null hypothesis: You do not have the disease.Alternative hypothesis: You do have the disease.

Type 1 Error: You are told you have the disease, but you actually don’t. The test result was a false positive.

Consequence: You will be unnecessarily concerned about your health and you may receive unnecessary treatment.

Type 2 Error : You are told that you do not have the disease, but you actually do. The test result was a false negative.

Consequence: You do not receive treatment for a disease that you have. If this is a contagious disease, you may infect others.

Example 11.10 Medical Analogy