Download presentation
Presentation is loading. Please wait.
Published byAudrey Hodges Modified over 9 years ago
1
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses About Proportions Chapter 12
2
Copyright ©2011 Brooks/Cole, Cengage Learning 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 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. 12.1HT Module 0: An Overview of Hypothesis Testing
3
Copyright ©2011 Brooks/Cole, Cengage Learning 3 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.
4
Copyright ©2011 Brooks/Cole, Cengage Learning 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.
5
Copyright ©2011 Brooks/Cole, Cengage Learning 5 Terminology for the Two Choices Null hypothesis: Represented by H 0, 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 H a, 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.
6
Copyright ©2011 Brooks/Cole, Cengage Learning 6 Examples of H 0 and H a 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.
7
Copyright ©2011 Brooks/Cole, Cengage Learning 7 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. H 0 : p =.20 (or p ≥.20) H a : p <.20
8
Copyright ©2011 Brooks/Cole, Cengage Learning 8 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.
9
Copyright ©2011 Brooks/Cole, Cengage Learning 9 Notation and Null Value H 0 : 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: H a : population parameter B null value One-sided alternative hypothesis (choose one): H a : population parameter > null value H a : population parameter < null value
10
Copyright ©2011 Brooks/Cole, Cengage Learning 10 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?
11
Copyright ©2011 Brooks/Cole, Cengage Learning 11 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). 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.”
12
Copyright ©2011 Brooks/Cole, Cengage Learning 12 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.
13
Copyright ©2011 Brooks/Cole, Cengage Learning 13 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 H 0 if the p-value is smaller than (usually 0.05, sometimes 0.10 or 0.01). In this case the result is statistically significant.
14
Copyright ©2011 Brooks/Cole, Cengage Learning 14 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).
15
Copyright ©2011 Brooks/Cole, Cengage Learning 15 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 12.7 Medical Analogy Lesson 3: What Can Go Wrong?
16
Copyright ©2011 Brooks/Cole, Cengage Learning 16 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.
17
Copyright ©2011 Brooks/Cole, Cengage Learning 17 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.
18
Copyright ©2011 Brooks/Cole, Cengage Learning 18 Type 2 Errors and Power Three 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. 3. Actual value of the population parameter; (not in researcher’s control. Farther truth falls from null value (in H a direction), the lower the probability of a type 2 error. When the alternative hypothesis is true, the probability of making the correct decision is called the power of a test.
19
Copyright ©2011 Brooks/Cole, Cengage Learning 19 Tree Diagram of possible errors and their probabilities
20
Copyright ©2004 Brooks/Cole, a division of Thomson Learning, Inc. 20 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. H 0 : p .5 (not a majority) H a : p >.5 (a majority) Note: p = the proportion of her constituents that favors the lower limit. The alternative is one-sided. 12.2 HT Module 1: Testing Hypotheses about a Proportion
21
Copyright ©2011 Brooks/Cole, Cengage Learning 21 Null and Alternative Hypotheses for a Population Proportion Possible null and alternative hypotheses: 1. H 0 : p = p 0 versus H a : p p 0 (two-sided) 2. H 0 : p = p 0 versus H a : p < p 0 (one-sided) 3. H 0 : p = p 0 versus H a : p > p 0 (one-sided) p 0 = specific value called the null value. Remember a p-value is computed assuming H 0 is true, and p 0 is the value used for that computation.
22
Copyright ©2011 Brooks/Cole, Cengage Learning 22 Determine the sampling distribution of possible sample proportions when the true population proportion is p 0 (called the null value), the value specified in H 0. 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 p 0 is true, and reject the null hypothesis. The z-Test for a Proportion
23
Copyright ©2011 Brooks/Cole, Cengage Learning 23 The z-statistic for the significance test is represents the sample estimate of the proportion p 0 represents the specific value in null hypothesis n is the sample size Details for Calculating the z-Statistic
24
Copyright ©2011 Brooks/Cole, Cengage Learning 24 For H a less than, find probability the test statistic z could have been equal to or less than what it is. For H a greater than, find probability the test statistic z could have been equal to or greater than what it is. For H a 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
25
Copyright ©2011 Brooks/Cole, Cengage Learning 25 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 np 0 and n(1 – p 0 ) 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
26
Copyright ©2011 Brooks/Cole, Cengage Learning 26 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. H 0 : p =.5 versus H a : p >.5 (one-sided)
27
Copyright ©2011 Brooks/Cole, Cengage Learning 27 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. 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 np 0 and n(1 – p 0 ) should both be at least 10. With n = 190 and p 0 =.5, both n p 0 and n(1 – p 0 ) equal 95, a quantity larger than 10, so the sample size condition is met.
28
Copyright ©2011 Brooks/Cole, Cengage Learning 28 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, the standardized score for measuring the difference between the =.60, and the null hypothesis value, p 0 =.50.
29
Copyright ©2011 Brooks/Cole, Cengage Learning 29 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 (or larger)? p-value = 1 – 0.997 = 0.003.
30
Copyright ©2011 Brooks/Cole, Cengage Learning 30 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.
31
Copyright ©2011 Brooks/Cole, Cengage Learning 31 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.
32
Copyright ©2011 Brooks/Cole, Cengage Learning 32 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. H 0 : p .20 (company’s claim is not true) H a : p <.20 (company’s claim is true)
33
Copyright ©2011 Brooks/Cole, Cengage Learning 33 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 np 0 and n(1 – p 0 ) should both be at least 10. With n = 400 and p 0 =.2, the sample size condition is met. Out of 400 patients, 68 experienced side effects. Sample proportion = 68/400 =.17.
34
Copyright ©2011 Brooks/Cole, Cengage Learning 34 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
35
Copyright ©2011 Brooks/Cole, Cengage Learning 35 Example 12.12 Fewer than 20%? Step 4: Decide whether or not the result is statistically 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).
36
Copyright ©2011 Brooks/Cole, Cengage Learning 36 Example 12.13 If Your Feet Don’t Match… Step 1: Determine the null and alternative hypotheses. H 0 : p =.5 versus H a : p .5 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. Sample proportion with longer right foot = 63/112 =.5625
37
Copyright ©2011 Brooks/Cole, Cengage Learning 37 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 Example 12.13 If Your Feet Don’t Match…
38
Copyright ©2011 Brooks/Cole, Cengage Learning 38 Step 4: Decide whether or not the result is statistically 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. Example 12.13 If Your Feet Don’t Match…
39
Copyright ©2011 Brooks/Cole, Cengage Learning 39 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
40
Copyright ©2011 Brooks/Cole, Cengage Learning 40 Step 1: Determine null and alternative hypotheses H 0 : p 1 – p 2 = versus H a : p 1 – p 2 or H a : p 1 – p 2 Watch how Population 1 and 2 are defined. Samples are independent. Sample sizes are large enough so that – – are at least 5 and preferably at least 10. Step 2: Verify data conditions … 12.3 HT Module 2: Hypotheses Testing about Difference in Two Proportions
41
Copyright ©2011 Brooks/Cole, Cengage Learning 41 Under the null hypothesis, there is a common population proportion p. This common value is estimated using all the data as: Continuing Step 2: The Test Statistic This z-statistic has (approx) a standard normal distribution. The standardized test statistic is:
42
Copyright ©2011 Brooks/Cole, Cengage Learning 42 For H a less than, the p-value is the area below z, even if z is positive. For H a greater than, the p-value is the area above z, even if z is negative. For H a two-sided, p-value is 2 area above |z|. Step 3: Assuming H 0 true, Find the p-value Steps 4 and 5: Decide Whether or Not the Result is Statistically Significant based on p-value and Make a Conclusion in Context Choose a level of significance , and reject H 0 if the p-value is less than (or equal to) .
43
Copyright ©2011 Brooks/Cole, Cengage Learning 43 Example 12.17 Prevention of Ear Infections Question:Does the use of sweetener xylitol reduce the incidence of ear infections? Step 1: State the null and alternative hypotheses H 0 : p 1 – p 2 = versus H a : p 1 – p 2 > where p 1 = population proportion with ear infections on placebo p 2 = population proportion with ear infections on xylitol Randomized Experiment Results: Of 165 children on placebo, 68 got ear infection. Of 159 children on xylitol, 46 got ear infection.
44
Copyright ©2011 Brooks/Cole, Cengage Learning 44 Step 2: Verify conditions and compute z statistic There are at least 10 children in each sample who did and did not get ear infections, so conditions are met. Example 12.17 Prevention of Ear Infections
45
Copyright ©2011 Brooks/Cole, Cengage Learning 45 Steps 3, 4 and 5: Determine the p-value and make a conclusion in context. The p-value is the area above z = 2.32 using Table A.1. We have p-value = 0.0102. So we reject the null hypothesis, the results are “statistically significant”. We can conclude that taking xylitol would reduce the proportion of ear infections in the population of similar preschool children in comparison to taking a placebo. Example 12.17 Prevention of Ear Infections
46
Copyright ©2011 Brooks/Cole, Cengage Learning 46 12.4 Sample Size, Statistical Significance and Practical Importance 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.
47
Copyright ©2011 Brooks/Cole, Cengage Learning 47 Example 12.18 Same Sample Proportion Can Produce Different Conclusions Let p = proportion in population that would prefer Drink A. H 0 : p =.5 (no preference) H a : 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.
48
Copyright ©2011 Brooks/Cole, Cengage Learning 48 Example 12.18 Different Conclusions Results when n = 60 33 of the 60 preferred Drink A; = 0.55 95% CI: (0.42, 0.68) wider Test statistic z = 0.77 and p-value = 0.439 Not statistically significant Results when n = 960 528 or the 960 preferred Drink A; = 0.55 95% CI: (0.52, 0.58) narrower Test statistic z = 3.10 and p-value = 0.002 Statistically significant
49
Copyright ©2011 Brooks/Cole, Cengage Learning 49 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
50
Copyright ©2011 Brooks/Cole, Cengage Learning 50 Practical 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.
51
Copyright ©2011 Brooks/Cole, Cengage Learning 51 Example 12.19 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
52
Copyright ©2011 Brooks/Cole, Cengage Learning 52 Example 12.20 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)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.