Hypothesis Testing – Proportion and One Mean - Solutions P-value Guidelines when using Standard Normal Table (i.e. the Z-table): Keep this in mind: The method for finding the p-value is based on the alternative hypothesis. Minitab will provide the p-value but if doing by hand using Table A1 observe the following: For Ha: p ≠ po then the p-value = 2P(Z ≥ |z|) That is, find 1 – P(Z < |z|) and then multiply this p-value by 2. For Ha: p > po then the p-value = P( Z ≥ z) For Ha: p < po then the p-value = P( Z ≤ z) 1 The present success rate in the treatment of a particular psychiatric disorder is 0.65 (65%). A research group creates a new treatment for this disorder. Their null hypothesis is that the success rate for the new treatment is 0.65 (no different from the standard). The alternative hypothesis is that the success rate is better than 0.65 for the new treatment. a. Let p = true success rate of the new treatment. Using mathematical notation, write null and alternative hypotheses about p. H0: p = .65 versus Ha: p > .65. b. A clinical trial is done in which 144 of 200 patients who use the new treatment are successfully treated. What is the value of p̂ = success rate for the sample? How does it compare to 0.65 (the old standard)? 144/200 = .72. Sample value is greater than .65. c. In Minitab use Stat>Basic Stats>1 proportion, click Summarized Data, enter 200 for number of trials and 144 for Number of events. Click on Options, AND enter .65 where it says “Test proportion” AND select the alternative hypothesis as “greater than” AND also click on “Use test and interval based on normal distribution.” What value is given for the test statistic Z in the output? 2.08 What is the p-value? 0.019 d. Decide between the null hypothesis and the alternative hypothesis. Explain your decision. Decide on alternative hypothesis because p-value is less than .05. e. Write a conclusion about how the new treatment compares to previous treatment(s). The new treatment appears to have a better success rate. The sample result was a “statistically significant” departure from p = .65. 1 f. Suppose the data had been that 50 patients used the new treatment, with 36 successes. What is the value of p̂ = success rate for this sample? How does it compare to the success rate for the sample used in parts b-e? Sample result is still .72 (same as before). g. With the data given in part f, use Minitab to do a hypothesis test of whether the “true” success rate for the new treatment is not or is greater than .65. That is, repeat part c but change the number of trials and events to 50 and 36 respectively. What value is given for the test statistic Z in the output? 1.04 What is the p-value? 0.150 Choose the null because the p-value is not less than .05. h. Refer to the previous two parts. Decide between the null hypothesis and the alternative hypothesis. Explain your decision. Choose the null because the p-value is not less than .05. We are not able to say that the new treatment is better than the previous treatment(s). i. For the trial with only 50 patients (and 36 success), write a conclusion about how the new treatment compares to previous treatment(s). We are not able to say that the new treatment is better than the previous treatment(s). j. Briefly explain what this activity illustrates about how sample size affects the statistical significance of an observed result. As a starting points, note that the observed success rate was .72 for both samples, and we wish to determine if this is “significant” evidence that the true proportion is greater than .65. A specific amount of difference between a sample result and a null hypothesis becomes more significant as the sample size increases. 2 In a marketing survey for an automobile manufacturer, 90 randomly selected adults are asked which car color they would choose, if a particular car were available in either blue or red body colors. Of the 90 respondents, 53 said “blue.” a. Let p = population proportion that would say “blue.” The manufacturer wants to learn if a majority of buyers would pick blue. Keeping in mind that a majority is p>0.5, write a null and alternative hypothesis about p in this situation. (Hint: What somebody wants to “prove” is usually the alternative.) H0: p = .5 (or less) H s: p> .5 b. What is the value of p̂ =sample proportion that picked blue? 53/90 = .59 2 c. Test the hypotheses stated in part a above. By hand, calculate the test statistic by using (Notice that this statistic is sensitive to the difference between the sample result and the null hypothesis value): z sample p - null hyp. p null std. error p̂ p 0 p 0 (1 p 0 ) n = .59 .50 = 1.71 .50*(1 .50) 90 (round your final value to two decimal places) d. Use Standard Normal Table to find the p-value associated with this test statistic. Use the p-value guidelines found at the beginning of this activity. From standard normal table, P(Z > 1.71) = 1 – 0.9564 = 0.0436 e. In Minitab use Stat>Basic Stats>1 proportion, click Summarized Data, enter 90 for number of trials and 53 for Number of events. Click on Perform Hypothesis Test and enter 0.50 where it says “Hypothesized proportion” AND click Options to select the alternative hypothesis as “greater than” AND also click on “Use test and interval based on normal distribution.” What value is given for Z in the output? 1.69 What is the p-value? 0.046 i. Do the Z test statistic you found by hand in part c and the p-value from part d approximately equal to the Z statistic found in part e when using Minitab? Yes ii. Decide whether the result is significant based on the p-value from Minitab and report a conclusion in the context of this situation. With a p-value of 0.046 which is less than 0.05 we would reject the null hypothesis and conclude that our result is significant. The manufacturer would be correct in saying that a majority of buyers would pick blue M&Ms. iii What would the p-value have been if manufacturer wanted to test if a equal proportion of red and blue cars would be purchased? That is, test Ho: p = 0.5 versus Ha: p ≠ 0.5 For a two-sided test we would double the p-value found from a one-sided test resulting in a p-value of 0.092 which would be greater than 0.05 meaning we would not reject Ho for the two sided test. This helps (hopefully!) to illustrate the importance of selecting the correct alternative hypothesis, Ha. Depending on the selected Ha you can reach different decisions and conclusions. (NOTE: conversely, for a one-sided test we would use half of the p-value from a two-sided test.) 3 Use the T-Table to estimate the p-value for each of the following hypothesis testing situations. Then use the p-value to make a conclusion about the hypotheses. (Note: The value given for t is the calculated value of the test statistic). a. H0: = 72, Ha: >72, n=20, t=2.10 DF = 19 p-value 0.010 < p < 0.025 Conclusion : Reject Ho b. H0: = 0, Ha: 0, n=40, t=2.41 DF = 39 (use 30 in table) p-value 2*(0.010 < p < 0.025) = 0.020 < p < 0.050 We double the p-value since the alternative is 2-sided Conclusion : Reject Ho c. H0: = 98.6, Ha: < 98.6, n=10, t= 1.33 3 DF = 9 p-value p > 0.100 Conclusion : Do Not Reject Ho d. H0: = 100, Ha: > 100, n=16, t= 4.26 DF = 15 p-value p < 0.001 Conclusion : Reject Ho 4 PSU claims that the average SATM score for the incoming fall 2005 class at University Park was approximately 610. Use the Class Survey to test whether the current population of PSU undergrads at UP campus differs from this claim. Again first by hand and then with Minitab. The descriptive statistics are: sample size is 216; sample mean is 599; and the sample standard deviation is 85.3 a. Write the null and alternative hypotheses using appropriate statistical notation. Ha: u ≠ 610 H0: u = 610 b. Calculate DF and the t-statistic: DF = 215 t= x - 0 599 - 610 = = -1.89 (Note this is a negative!) s 85.34 n 216 c. From T-Table what is the range of the p-value based on you t-statistic? NOTE: if you selected a two-sided Ha (i.e. used ≠) then you need to double the p-values found in the table. Two-sided alternative so p-value range is 2*(0.025 < p < 0.050) = 0.050 < p < 0.100 d. Based on your p-value what is your decision and conclusion? Does this conclusion make sense based on your confidence interval calculated above? That is, does your confidence interval contain/not contain 610? If you rejected Ho then your interval should not contain 610 and viceversa. Based on our p-value we would not reject Ho since the range of values contains our usual alpha value of 0.05. This agrees with our confidence interval as the interval contains 610 (even though just barely). e. Now use Minitab to verify your results. Go to Stat > Basic Statistics > 1-Sample t and select SATM (column C16). Click the box for “Perform Hypothesis Test” and enter the value from your hypotheses statements (i.e. uo). Click on Options and select the correct alternative. Click OK twice and copy and paste your Minitab results. Do your results by hand and those from Minitab roughly match? One-Sample T: SATM Test of mu = 610 vs not = 610 Variable N Mean StDev SE Mean 95% CI T P SATM 216 599.005 85.335 5.806 (587.560, 610.449) -1.89 0.060 The t-statistic matches and the p-value from Minitab is in our interval. Notice that if you just calculated by hand the one sided p-value range that this interval would not have contained the pvalue from Minitab. 4