252solnB1 4/40/01 (Open this document in 'Page Layout' view!) B. HYPOTHESIS TESTS FOR ONE SAMPLE 1. The Meaning of Hypothesis Testing 8.1, 8.6 2. Steps for Testing a Hypothesis Applied to testing for a Population Mean 8.17† (Assume that 60 is a population standard deviation ), 8.18†, 8.44†, 8.52† 3. The Use of p-value instead of Significance Levels. p-value for 8.17†, 8.29†*, 8.30†, 8.40†( 5.10 ) , 8.39†, 8.48†, B6 Graded Assignment 2 (Will be posted) 4. Type One and Type Two Errors 8.12†, 8.13†, 8.14* 5. Hypotheses about a Proportion 8.58†, 8.61†, 8.66† 6. The Sign Test B1, B2, 15.1†, 15.2*, 15.4†, 15.7†, 15.8†* 7. Hypothesis Test for Means - Rare Events B3, B4 8. Hypothesis Tests for a Variance. B5 Sections 1-3 are in this document. Hypothesis Testing Exercise 8.1: The Null Hypothesis H 0 often can be thought of as the status-quo hypothesis, while H 1 , the Alternative Hypothesis, is often called the research hypothesis. Exercise 8.6: We can say that we reject the null hypothesis, given our confidence level, because the confidence level was set in advance and we thus know the value of (the significance level), our chance of rejecting H 0 when H 0 is true. However, we do not know what the chance is of 'accepting ' H 0 when H 0 is false, because there are so many different possibilities included in H 1 . We may find that the probability if not rejecting H 0 when some version of H 1 is true is close to 100%. The study of the probability of the probability of failing to reject H 0 when H 0 is false is called analysis of the power of tests and will be discussed later in this section and in part C of this course. Tests for a Population Mean Exercise 8.17†: (Assume that 60 is a population standard deviation.) The initial facts stated in the problem are n 100 , 60 and x is 110. The confidence level in both parts is 95% so that .05 . H 0 : 0 a) According to Table 3, If we wish to test , and is known, we can use one of three H 1 : 0 x 0 methods: (i) A test ratio z ; (ii) a critical value xcv 0 z x ; or (iii) a confidence interval x 2 x z 2 x . Each of these is done below. Each one should give the same conclusion. In both parts of the problem, x 60 6 . However in part a) we have H 0 : 100 and H1 : 100 . This n 100 means that we have one-sided tests in this part of the problem. Our alternate hypothesis will probably be true if x is significantly larger than 100, this will result in a right-side test. (i) Test Ratio: z x 0 x x 100 . The larger the sample mean is, the larger will be this ratio. We will 6 reject the null hypothesis if the ratio is larger than z z.05 1.645 . Make a diagram showing a Normal curve with a mean at 0 and a shaded 'reject' zone above 1.645. Since z 110 100 1.667 is above 1.645, 6 we reject the Null hypothesis. (ii) Critical value: xcv 0 z x is the formula for the two sided case, but we need a number above 2 100 to be a critical value above which we reject H 0 . So we use xcv 0 z x 100 1.645 6 109 .87 Make a diagram showing a Normal curve with a mean at 100 and a shaded 'reject' zone above 109.87. Since x 110 is above 109.87, we reject H 0 . (iii) Confidence interval: x z x is the formula for a two sided interval. The rule for a one-sided 2 confidence interval is that it should always go in the same direction as the alternate hypothesis. Since the alternative hypothesis is H1 : 100 , the confidence interval is x z x 110 1.645 6 100 .13 Make a diagram showing a Normal curve with a mean at x 110 and, to represent the confidence interval, shade the area above 100.13 in one direction. Then, on the same diagram, to represent the null hypothesis shade the area below 100 in the opposite direction. Notice that these do not overlap. What the diagram is telling you is that it is impossible for 100.13 and H 0 : 100 to both be true. So we reject H0 . b) H 0 : 100 and H1 : 100 . This means that we have two-sided tests in this part of the problem. Our alternate hypothesis will probably be true if x is significantly larger than 100 or significantly smaller than 100. x 0 x 100 (i) Test Ratio: z . This time we will reject the null hypothesis if the ratio is too large or x 6 too small. Since 95% of the time z is between z z .025 1.960 and z z .025 1.960 , we reject 2 2 H 0 if z is below -1.960 or above 1.960. Make a diagram showing a Normal curve with a mean at 0 and shaded 'reject' zones below -1.96 and above 1.96. Since z 110 100 1.667 is between these values, we 6 do not reject the Null hypothesis. (ii) Critical value: xcv 0 z x is the formula for the two sided case.. So we use 2 xcv 100 1.960 6 100 11.76. Make a diagram showing a Normal curve with a mean at 100 and shaded 'reject' zones below 88.24 and above 111.76. Since x 110 is a not in either of these 'reject' zones, we do not reject H 0 . (iii) Confidence interval: x z x is the formula for a two sided interval.. The confidence interval is 2 thus x z x 110 1.6456 100.13 . Make a diagram showing a Normal curve with a mean at 2 x 110 and, to represent the confidence interval, shade the area between 98.44 and 121.76. Since the null hypothesis says H 0 : 100 , and 100 falls in the shaded area that represents the confidence interval, we do not reject H 0 . c) Generally, the more specific the alternate hypothesis is, the easier it is to reject the null hypothesis. Exercise 8.18†: n 64 , x 0.323 , s 2 0.034 and .10 . Because we are given s instead of , we must use t instead of z . s x n 1 63 . s n s2 n 0.034 0.02305 . The number of degrees of freedom is 64 a) H 0 : 0.36 and H1 : 0.36 . This means that we have one-sided tests in this part of the problem. Our alternate hypothesis will probably be true if x is significantly smaller than 0.36. This will result in a 63 left-side test. t .10 1.295 . (i) Test Ratio: t x 0 0.323 0.36 1.604 . The smaller the sample mean is, the more negative sx 0.02305 63 will be this ratio. We will reject the null hypothesis if the ratio is smaller than tn 1 t .10 1.295 . Make a diagram showing a Normal curve with a mean at 0 and a shaded 'reject' zone below -1.295. Since the test ratio is below -1.295, we reject H 0 . (ii) Critical value: We need a critical value for x below 0.36, so use x t n1 s cv 0 x 0.36 1.295 0.02305 0.330 . Make a diagram showing an almost Normal curve with a mean at 0.36 and a shaded 'reject' zone below 0.330. Since x 0.323 is below 0.330, we reject H 0 . (iii) Confidence interval: x z x is the formula for a two sided interval. The rule for a one-sided 2 confidence interval is that it should always go in the same direction as the alternate hypothesis. Since the alternative hypothesis is H1 : 0.36 , the confidence interval is x tn1 x 0.323 1.295 0.02305 0.353 . Make a diagram showing an almost Normal curve with a mean at x 0.323 and, to represent the confidence interval, shade the area below 0.353 in one direction. Then, on the same diagram, to represent the null hypothesis, H 0 : 0.36 shade the area above 0.36 in the opposite direction. Notice that these do not overlap. What the diagram is telling you is that it is impossible for 0.353 and H 0 : 0.36 to both be true. So we reject H 0 . b) H 0 : 0.36 and H1 : 0.36 . This means that we have two-sided tests in this part of the problem. Our alternate hypothesis will probably be true if x is significantly smaller or larger than 0.36. 63 t .05 1.669 . s x s s2 .034 0.02305 . n 64 n x 0 0.323 0.36 1.604 . We will reject the null hypothesis if the ratio is not sx 0.02305 63 between tn1 t.05 1.669 . Make a diagram showing a Normal curve with a mean at 0 and (i) Test Ratio: t 2 shaded 'reject' zones below -1.669 and above 1.669. Since the test ratio is between -1.669 and 1.669, we do not reject H 0 . (ii) Critical value: x t n1 s 0.36 1.6690.02305 0.36 0.038 or 0.322 to 0.398. Make a cv 0 2 x diagram showing an almost Normal curve with a mean at 0.36 and shaded 'reject' zones below 0.322 and above 0.398. Since x 0.323 is between these critical values, we do not reject H 0 . (iii) Confidence interval: x tn 1 s x is the formula for a two sided interval. 2 x tn1 s x 0.323 1.6690.02305 0.323 0.038 or 0.285 to 0.361. Since the null hypothesis is 2 H 0 : 0.36 and 0.36 is between the top and the bottom of the confidence interval, we do not reject H 0 . Make a diagram showing a Normal curve with a mean at x 0.323 and, to represent the confidence interval, shade the area between 0.285 and 0.361. Show that 0 0.36 falls between these values. Exercise 8.44†: E z E t 0 But z2 1 and z2 DF DF 2 1. Exercise 8.52†: Exercises of this type are usually easier to do if we move the decimal point 3 places to the left. We were supposed to test the hypothesis that the mean was 2550 degrees at the .01 significance level. x 2 65 .47411 x 25 .587 , 1 2 3 4 5 6 7 8 9 10 x 2.543 2.541 2.544 2.620 2.560 2.559 2.562 2.553 2.552 2.553 25.587 x2 6.46685 6.45668 6.47194 6.86440 6.55360 6.54848 6.56384 6.51781 6.51270 6.51781 65.47411 x s x2 x 25.587 2.5587 n x 10 2 nx 2 65 .47411 10 2.5587 2 9 n 1 0.0046531 0.00051701 9 s x 00051701 0.0227379 . s x2 .00051701 .00719 n 10 Note: If you did not move the decimal point you should have x 2558 .7 , s x 22 .7379 and s x 7.190 . 9 .005 H 0 : 2.550 and H1 : 2.550 tn1 t.005 3.250 2 sx 2 x 0 2.5587 2.550 1.210 . We will reject the null hypothesis if the ratio is not (i) Test Ratio: t sx 0.00719 between t n1 t 9 3.250 . Make a diagram showing a Normal curve with a mean at 0 and shaded 2 .005 'reject' zones below -3.250 and above 3.250. Since the test ratio is between these two numbers, we do not reject H 0 . (ii) Critical value: x t n1 s 2.550 3.2500.00719 2.550 0.0234 or 2.527 to 2.573. cv 0 2 x Make a diagram showing an almost Normal curve with a mean at 2.55 and shaded 'reject' zones below 2.527 and above 2.573. Since x 2.558 is between these critical values, we do not reject H 0 . (iii) Confidence interval: x tn 1 s x is the formula for a two sided interval. 2 x tn1 s x 2.558 3.32500.00719 2.558 0.0234 or 2.535 to 2.581. Since the null hypothesis 2 is H 0 : 2.550 and 2.250 is between the top and the bottom of the confidence interval, we do not reject H0 . p-value for Exercise 8.17†: A p-value is a measure of the credibility of the null hypothesis and is defined lower low as the probability that a test statistic or ratio as extreme as or more extreme than the observed statistic high higher or ratio could occur, assuming that the null hypothesis is true. 110 100 z 1.667 a) Since this is a right sided test, the p-value tells us the probability of getting a 6 value of z that is as large or larger than the one we actually got. pval Pz 1.667 .5 .4525 .0475 . b) The usual way to do two-sided problems is to double the p-value (if it is below .5), so we get .0950. Exercise 8.29†*: The rule on p-value: If the p-value is less than the significance level (alpha) reject the null hypothesis. If the p-value is greater than or equal to the significance level, do not reject the null hypothesis. a) .05 , p value .10 do not reject H 0 . b) .10 , p value .05 reject H 0 . c) .01 , p value .001 reject H 0 . d) .025 , p value .05 do not reject H 0 . e) .10 , p value .45 do not reject H 0 . Exercise 8.30†: p value .06 . For any value of above .06, reject H 0 Exercise 8.40† ( 5.10 ) : From the printout, we are testing H 0 : 10 against H1 : 10 . It also says 5.10 , x 10 .94 and n 49 . The output says x 0.73 and we can confirm that x n 5.10 0.72857 . According to the alternate hypothesis we are worried about the sample mean 49 being too large, which will make the test ratio too large. a) Calculate z x 0 x 10 .94 10 1.29 and 0.72857 note that pval Pz 1.29 .5 .4015 .0985 . So the probability that the sample mean is greater than or equal to 10.94 is 8.85%. b) If our significance level is less than or equal to 5%, we cannot reject the null hypothesis. Exercise 8.39†: The data in the problem says n 797 , x 3.39 and s 0.80 . Because we are given s s 0.80 0.028337 . The number of degrees of instead of , we should use t instead of z . s x n 797 freedom is n 1 796 , which means that the distribution is approximately normal. a) Since the problem says that values of exceeding 2.5 represents a perception of risk, we are testing to see if 2.5 . Because this is a strict inequality, it must be the alternate hypothesis. So our hypotheses are H 0 : 2.5 H1 : 2.5 . x 0 b) If we use the t ratio t , the large values of the sample mean necessary to put the null sx hypothesis in jeopardy will also result in large values of t. The p-value can now be calculated. x 0 3.39 2.5 P t pval Px 3.39 P t Pt 31 .41 Pz 31 .41 .5 .5 0 . s 0.028337 x c) Since the p-value is approximately zero, it is smaller than any significance level we might use, and implies a very certain rejection of the null hypothesis. Exercise 8.48†: From the problem statement n 5 , x 4.8 and s 1.3 . Because we are given s instead s 1.3 of , we should use t instead of z . s x 0.5814 . In parts a) and b) .05 . n 5 x 0 a) H 0 : 6 H 1 : 6 . If we use the test ratio method, we will compute t . Our diagram will sx 4 show that our reject region is the area below tn 1 t .05 2.132 . Make a diagram. 4.8 6 2.064 . Since t is not in the rejection region, do not reject H 0 . 0.5814 4 b) H 0 : 6 H 1 : 6 . This is a two-sided test and tn1 t.025 2.776 . Our diagram should show t 2 a reject region above 2.776 and below -2.776. Make a diagram. Since our t-ratio is between these values, we do not reject H 0 . c) For part a), the p-value is pval Px 4.8 Pt 2.064 . Since we do not have an appropriate t table, we can not find this exactly. But we can look on the appropriate line of our t table and find that 4 4 t .10 1.533 and t .05 2.132 . This means that Pt 1.533 .10 and Pt 2.132 .05 . Since -2.064 lies between these numbers, we can say that pval Px 4.8 Pt 2.064 is between .05 and .10, or .05 pval .10 . For part b), since the test is two-sided, double the p-value to get .10 pval .20 . Problem B6: Test the following using (i) a test ratio with a p-value, (ii) a confidence interval for the sample mean and (iii) a critical value for the sample mean. .05 . a. H 0 : 5, H 1 : 5 when n 49 , x 8.40 and x 5.92 . b. H 0 : 5, H 1 : 5 when n 49 , x 8.40 and x 5.92 . c. H 0 : 5, H 1 : 5 when n 49 , x 8.40 and x 5.92 . d. H 0 : 5, H 1 : 5 when n 49 , s x 8.40 and x 5.92 . e. H 0 : 5, H 1 : 5 when n 49 , s x 8.40 and x 5.92 . f. H 0 : 5, H 1 : 5 when n 49 , s x 8.40 and x 5.92 . Solution: From the formula table. Interval for Confidence Hypotheses Test Ratio Interval x 0 x z 2 x Mean ( H0 : 0 z Known) x H1 : 0 Mean ( Unknown) x t 2 s x H0 : 0 t x 0 sx Critical Value xcv 0 z 2 x xcv 0 t 2 s x H1 : 0 DF n 1 A p-value is a measure of the credibility of the null hypothesis and is defined as the probability that a test lower low statistic or ratio as extreme as or more extreme than the observed statistic or ratio could occur, high higher assuming that the null hypothesis is true. The rule on p-value: If the p-value is less than the significance level (alpha) reject the null hypothesis. If the p-value is greater than or equal to the significance level, do not reject the null hypothesis. For the following 3 sections x x n 8.40 49 1.20 , z x 0 x 5.92 5 0.7667 1.20 a) H 0 : 5, H 1 : 5 when n 49 , x 8.40 and x 5.92 . Solution: This is a one-sided problem where the 'reject' zone is to the right. (i) Test ratio: We already know that z 0.7667 , In this right-sided problem pval Px 5.92 Pz 0.77 Pz 0 P0 z 0.77 .5 .2794 .2206 . Make diagrams. A diagram for the standardized Normal distribution has zero in the middle. For the pvalue shade the area above 0.77. We already know that is .2206. Since .2206 is above .05, do not reject the null hypothesis. A diagram for the conventional test would show a shaded 'reject' zone above z z .05 1.645 . Since 0.7667 does not fall in this region, do not reject the null hypothesis. (ii) The confidence interval has the same direction as the alternate hypothesis, so it has the form x z x 5.92 1.645 1.20 3.946 . Make a diagram. Put x 5.92 in the middle and shade the area above 3.946. Since 0 5 is in the confidence interval, do not reject the null hypothesis (iii) Since we are afraid that the mean may be above 5, the critical value for the sample mean must be above 5. The formula we use is xcv 0 z x 5 1.645 1.20 6.974 . Make a diagram. Shade the area above 6.974. Since x 5.92 does not fall in this 'reject region, do not reject the null hypothesis. b) H 0 : 5, H 1 : 5 when n 49 , x 8.40 and x 5.92 . Solution: This is a one-sided problem where the 'reject' zone is to the left. (i) Test ratio: We already know that z 0.7667 , In this left-sided problem pval Px 5.92 Pz 0.77 Pz 0 P0 z 0.77 .5 .2794 .7206 . Make diagrams. A diagram for the standardized Normal distribution has zero in the middle. For the pvalue shade the area below 0.77. We already know that is .7206. Since .7206 is above .05, do not reject the null hypothesis. A diagram for the conventional test would show a shaded 'reject' zone below z z.05 1.645 . Since 0.7667 does not fall in this region, do not reject the null hypothesis. (ii) The confidence interval has the same direction as the alternate hypothesis, so it has the form x z x 5.92 1.645 1.20 7.894 . Make a diagram. Put x 5.92 in the middle and shade the area below 7.894. Since 0 5 is in the confidence interval, do not reject the null hypothesis (iii) Since we are afraid that the mean may be below 5, the critical value for the sample mean must be below 5. The formula we use is xcv 0 z x 5 1.645 1.20 3.026 . Make a diagram. Shade the area below 3.026. Since x 5.92 does not fall in this 'reject region, do not reject the null hypothesis. c) H 0 : 5, H 1 : 5 when n 49 , x 8.40 and x 5.92 . Solution: This is a two-sided problem where the 'reject' zone is in both tails of the distribution. (i) Test ratio: We already know that z 0.7667 , In this two-sided problem, take the probability to the nearest corner and double it. pval 2Px 5.92 2Pz 0.77 2Pz 0 P0 z 0.77 2.5 .2794 2.2206 .4412 . Make diagrams. A diagram for the standardized Normal distribution has zero in the middle. For the pvalue shade the area above 0.77 and the area below -.77. We already know that is .4412. Since .4412 is above .05, do not reject the null hypothesis. A diagram for the conventional test (also with zero in the middle) would show a shaded 'reject' zone above z z.025 1.960 and a second 'reject region below z z.025 1.960 Since 0.7667 does not fall in 2 2 these regions, do not reject the null hypothesis. (ii) The confidence interval has the form x z x 5.92 1.96 1.20 5.92 2.352 , or 3.568 to 2 8.272.. Make a diagram. Put x 5.92 in the middle and shade the area between 3.568 and 8.272. Since 0 5 is in the confidence interval, do not reject the null hypothesis (iii) The critical value for the sample mean has the formula xcv 0 z x . So the two critical values 2 are xcv 5 1.960 1.20 5 2.352 or 2.648 to 7.352. Make a diagram. Put 0 5 in the middle. Shade the areas below 2.648 and above 7.352 to show two 'reject regions. Since x 5.92 does not fall in either 'reject region, do not reject the null hypothesis. For the following 3 sections s x sx 8.40 1.20 , df n 1 48 , t n 49 n 1 48 n 1 48 note that t t.025 2.011 . t.05 1.677 and t x 0 5.92 5 0.7667 , and sx 1.20 2 d) H 0 : 5, H 1 : 5 when n 49 , s x 8.40 and x 5.92 . Solution: This is a one-sided problem where the 'reject' zone is to the right. (i) Test ratio: We already know that t 0.7667 , In this right-sided problem 48 48 pval Px 5.92 Pt 0.77 . If we look on the t table, we find that t.25 0.680 and t.20 0.849 . This means that Pt 0.680 0.25 and Pt 0.849 0.20 . So the probability that t is above 0.77 is between .20 and .25. We can say that .20 p val .25. Make diagrams. A diagram for the t distribution has zero in the middle. For the p-value shade the area above 0.77. We already know that is between .20 and .25. Since these numbers are both .05, do not reject the null hypothesis. A diagram for the conventional test would show a shaded 'reject' zone above t t.05 1.677 . Since 0.7667 does not fall in this region, do not reject the null hypothesis. (ii) The confidence interval has the same direction as the alternate hypothesis, so it has the form x t x 5.92 1.677 1.20 3.908 . Make a diagram. Put x 5.92 in the middle and shade the area above 3.908. Since 0 5 is in the confidence interval, do not reject the null hypothesis (iii) Since we are afraid that the mean may be above 5, the critical value for the sample mean must be above 5. The formula we use is xcv 0 t x 5 1.677 1.20 7.012 . Make a diagram. Shade the area above 7.012. Since x 5.92 does not fall in this 'reject region, do not reject the null hypothesis. e) H 0 : 5, H 1 : 5 when n 49 , s x 8.40 and x 5.92 . Solution: This is a one-sided problem where the 'reject' zone is to the left. (i) Test ratio: We already know that t 0.7667 , In this left-sided problem pval Px 5.92 Pt 0.77 . . We already know that the probability that t is above 0.77 is between .20 and .25. So the probability below t must be between .75 and .80. Make diagrams. A diagram for the t distribution has zero in the middle. For the p-value shade the area below 0.77. We already know that it is between .75 and .80. Since both probabilities are above .05, do not reject the null hypothesis. A diagram for the conventional test would show a shaded 'reject' zone below t t.05 1.677 . Since 0.7667 does not fall in this region, do not reject the null hypothesis. (ii) The confidence interval has the same direction as the alternate hypothesis, so it has the form x t x 5.92 1.677 1.20 7.932 . Make a diagram. Put x 5.92 in the middle and shade the area below 7.932. Since 0 5 is in the confidence interval, do not reject the null hypothesis (iii) Since we are afraid that the mean may be below 5, the critical value for the sample mean must be below 5. The formula we use is xcv 0 t x 5 1.677 1.20 2.988 . Make a diagram. Shade the area below 2.988. Since x 5.92 does not fall in this 'reject region, do not reject the null hypothesis. f.) H 0 : 5, H 1 : 5 when n 49 , s x 8.40 and x 5.92 . Solution: This is a two-sided problem where the 'reject' zone is in both tails of the distribution. (i) Test ratio: We already know that t 0.7667 , In this two-sided problem, take the probability to the nearest corner and double it. pval 2Px 5.92 2Pz 0.77 . We already know that the probability that t is above 0.77 is between .20 and .25. If we double the probability, we can say that .40 p val .50. Make diagrams. A diagram for the t distribution has zero in the middle. For the p-value shade the area above 0.77 and the area below -.77. We already know that the total area is between .40 and .50.. Since these probabilities are above .05, do not reject the null hypothesis. A diagram for the conventional test would show a shaded 'reject' zone above t n 1 t 48 2.011 and a 2 .025 48 second 'reject region below tn1 t.025 2.011 Since 0.7667 does not fall in these regions, do not 2 reject the null hypothesis. (ii) The confidence interval has the form x t x 5.92 2.0111.20 5.92 2.413 , or 3.507 to 2 8.333. Make a diagram. Put x 5.92 in the middle and shade the area between 3.507 and 8.333 Since 0 5 is in the confidence interval, do not reject the null hypothesis (iii) The critical value for the sample mean has the formula xcv 0 z x . So the two critical values 2 are xcv 5 2.0111.20 5 2.413 or 2.587 to 7.413. Make a diagram. Shade the areas below 2.587 and above 7.413 to show two 'reject regions. Since x 5.92 does not fall in either 'reject region, do not reject the null hypothesis.