Chapter 12 Testing Hypotheses About Proportions

Chapter 12 Testing Hypotheses About Proportions Copyright ©2011 Brooks/Cole, Cengage Learning Hypothesis testing method: uses data from a sample to...
Author: Guest
0 downloads 1 Views 249KB Size
Chapter 12

Testing Hypotheses About Proportions Copyright ©2011 Brooks/Cole, Cengage Learning

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

12.1 An Overview of Hypothesis Testing Steps in Any Hypothesis Test 1. 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. Copyright ©2011 Brooks/Cole, Cengage Learning

2

Lesson 1: Formulating Hypothesis 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. Copyright ©2011 Brooks/Cole, Cengage Learning

3

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.

Copyright ©2011 Brooks/Cole, Cengage Learning

4

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. In most situations, 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.

Copyright ©2011 Brooks/Cole, Cengage Learning

5

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 hypotheses examples: • There is extrasensory perception. • Men have lower mean pulse rates than women do. • Increasing exercise intensity increases the resulting aerobic benefit. Copyright ©2011 Brooks/Cole, Cengage Learning

6

Example 12.2 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.

H0: p = .20 (or p ≥ .20) Ha: p < .20 Copyright ©2011 Brooks/Cole, Cengage Learning

7

One-Sided and Two-Sided Hypothesis Tests • A one-sided hypothesis test is one for which the alternative hypothesis specifies parameter values in a single direction from a specified “null” value. A one-sided test may also be called a one-tailed hypothesis test. • A two-sided hypothesis test is one for which the alternative hypothesis specifies parameter values in both directions from the specified null value. A two-sided test may also be called a two-tailed hypothesis test. Copyright ©2011 Brooks/Cole, Cengage Learning

8

Notation and Null Value H0: population parameter = null value where the null value is the specific number the parameter equals if the null hypothesis is true. Alternative hypothesis written in one of the three ways: Two-sided alternative hypothesis: • Ha: population parameter ≠ null value One-sided alternative hypothesis (choose one): • Ha: population parameter > null value • Ha: population parameter < null value

Copyright ©2011 Brooks/Cole, Cengage Learning

9

Lesson 2: Test Statistic, p-value, and Deciding between the Hypotheses 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? Copyright ©2011 Brooks/Cole, Cengage Learning

10

Example 12.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). “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.” 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. Copyright ©2011 Brooks/Cole, Cengage Learning

11

Test Statistic and p-Value • The test statistic for a hypothesis test is the data summary used to evaluate the null and alternative hypotheses. • The p-value is computed by assuming that the null hypothesis is true and then determining the probability of a test statistic as extreme as or more extreme than the observed test statistic in the direction of the alternative hypothesis.

Copyright ©2011 Brooks/Cole, Cengage Learning

12

Using p-Value to Reach a Conclusion • The level of significance, denoted by α (alpha), is a value chosen by the researcher to be the borderline between when a p-value is small enough to choose the alternative hypothesis over the null hypothesis, and when it is not. • When the p-value is less than or equal to α, we reject the null hypothesis. When the p-value is larger than α, we cannot reject the null hypothesis. The level of significance may also be called the α-level of the test. • Decision: reject H0 if the p-value is smaller than α (usually 0.05, sometimes 0.10 or 0.01). In this case the result is statistically significant.

Copyright ©2011 Brooks/Cole, Cengage Learning

13

Stating the Two Possible Conclusions • When the p-value is small, we reject the null 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).

Copyright ©2011 Brooks/Cole, Cengage Learning

14

Lesson 3: What Can Go Wrong? Example 12.7 Medical Analogy 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. Copyright ©2011 Brooks/Cole, Cengage Learning

15

Type 1 and Type 2 Errors 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. Copyright ©2011 Brooks/Cole, Cengage Learning

16

Probability of a Type 1 Error and the Level of Significance When the null hypothesis is true, the probability of a type 1 error, the level of significance, and the α-level are all equivalent. When the null hypothesis is not true, a type 1 error cannot be made.

Copyright ©2011 Brooks/Cole, Cengage Learning

17

Type 2 Errors Two factors that affect probability of a type 2 error 1. Sample size; larger n reduces the probability of a type 2 error without affecting the probability of a type 1 error. 2. Level of significance; larger α reduces probability of a type 2 error by increasing the probability of a type 1 error.

Copyright ©2011 Brooks/Cole, Cengage Learning

18

12.2 Testing Hypotheses about a Proportion

Example 12.10 Does a Majority Favor a Lower BAC Limit? Legislator wants to know if there a majority of her constituents favor the lower limit. H0: p ≤ .5

(not a majority)

Ha: p > .5

(a majority)

Note: p =

the proportion of her constituents that favors the lower limit. The alternative is one-sided.

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

19

Null and Alternative Hypotheses for a Population 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. Remember a p-value is computed assuming H0 is true, and p0 is the value used for that computation. Copyright ©2011 Brooks/Cole, Cengage Learning

20

Details for Calculating the z-Statistic The z-statistic for the significance test is sample estimate − null value z= = null standard error

pˆ − p0 p0 (1 − p0 ) n

• pˆ represents the sample estimate of the proportion • p0 represents the specific value in null hypothesis • n is the sample size

Copyright ©2011 Brooks/Cole, Cengage Learning

21

Computing the p-value for the z-Test • 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.

Copyright ©2011 Brooks/Cole, Cengage Learning

22

Conditions for Conducting the z-Test 1. The sample should be a random sample from the population.

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.

Copyright ©2011 Brooks/Cole, Cengage Learning

23

Example 12.11 The Importance of Order Survey 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 = .5 versus Ha: p > .5 (one-sided) Copyright ©2011 Brooks/Cole, Cengage Learning

24

Example 12.11 The Importance of Order 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.

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.

Copyright ©2011 Brooks/Cole, Cengage Learning

25

Example 12.11 The Importance of Order 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.

z=

pˆ − p0 = p0 (1 − p0 ) n

Copyright ©2011 Brooks/Cole, Cengage Learning

.6 − .5 = 2.76 .5(1 − .5) 190 26

Example 12.11 The Importance of Order Step 3: Assuming null hypothesis true, find 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 equivalently If the null hypothesis is true, what is the probability that the z-statistic could be as large as 2.76? p-value = 1 – 0.997 = 0.003.

Copyright ©2011 Brooks/Cole, Cengage Learning

27

Example 12.11 The Importance of Order Step 4: Decide whether or not the result is statistically 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.0003 so the results are statistically significant and we can reject the null hypothesis.

Copyright ©2011 Brooks/Cole, Cengage Learning

28

Example 12.11 The Importance of Order 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.

Copyright ©2011 Brooks/Cole, Cengage Learning

29

Example 12.12 Fewer than 20%? 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 ≥ .20 (company’s claim is not true) Ha: p < .20 (company’s claim is true)

Copyright ©2011 Brooks/Cole, Cengage Learning

30

Example 12.12 Fewer than 20%? 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.

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

z=

pˆ − p0 = p0 (1 − p0 ) n

Copyright ©2011 Brooks/Cole, Cengage Learning

.17 − .20 = −1.5 .20(1 − .20 ) 400 31

Example 12.12 Fewer than 20%? Step 3: Assuming the null hypothesis is true, find the p-value.

The area to the left of z = -1.5 is 0.067. So p-value = 0.067

Copyright ©2011 Brooks/Cole, Cengage Learning

32

Example 12.12 Fewer than 20%? Step 4: Decide whether or not the result is statistically significant based on the p-value. The p-value = 0.067 so the results are not statistically significant and we cannot reject the null hypothesis.

Step 5: Report the conclusion in the context of the problem. There is not sufficient evidence to conclude that the population proportion who would experience side effects is less than .20 Copyright ©2011 Brooks/Cole, Cengage Learning

33

Example 12.13 If Your Feet Don’t Match… 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 1: Determine the null and alternative hypotheses.

H0: p = .5 versus Ha: p ≠ .5

Step 2: Verify necessary data conditions, and if met, summarize the data into an appropriate test statistic. Sample proportion with longer right foot = 63/112 = .5625 pˆ − p0 .5625 − .5 z= = = 1.32 p0 (1 − p0 ) .5(1 − .5) 112 n Copyright ©2011 Brooks/Cole, Cengage Learning

34

Example 12.13 If Your Feet Don’t Match… Step 3: Assuming the null hypothesis is true, find the p-value. The area to the left of z = -1.32 is 0.093. So p-value = 2(0.093) = 0.186

Copyright ©2011 Brooks/Cole, Cengage Learning

35

Example 12.13 If Your Feet Don’t Match… Step 4: Decide whether or not the result is statistically significant based on the p-value. The p-value = 0.186 so the results are not statistically significant and we cannot reject the null hypothesis.

Step 5: Report the conclusion in the context of the problem. 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. Copyright ©2011 Brooks/Cole, Cengage Learning

36