252solngr2-06 10/3/06 (Open this document in 'Page Layout' view!) Solution to ECO 252 Second Graded Assignment R. E. Bove Problem 1: Which of the following could be a null hypothesis? Which could be an alternative hypothesis? Which could be neither? Why? (i) 3 , (ii) 3 , (iii) 3 , (iv) 3 , (v) x 3 , (vi) x 3 , (vii) x 3 , (viii) x 3 , (ix) s 5 , (x) p 5 , (xi) 3 , (xii) 3 ,(xiii) p .5. Solution: Remember the following: α) Only numbers like , p, 2 , and (the population mean, proportion, variance, standard deviation and median) that are parameters of the population can be in a hypothesis; x , p, s 2 , s and x.50 (the sample mean, proportion, variance, standard deviation and median) are statistics computed from sample data and cannot be in a hypothesis because a hypothesis is a statement about a population; β) The null hypothesis must contain an equality; γ) p must be between zero and one; δ) A variance or standard deviation cannot be negative. (i) 3 could be H 0 since it contains a parameter and an equality. H 1 would be 3 . (ii) 3 could be H 1 since it contains a parameter but no equality. H 1 would be 3 . (iii) 3 could be H 1 since it contains a parameter but no equality. H 1 would be 3 . (iv) 3 , could be H 0 since it contains a parameter and an equality. H 1 would be 3 . (v) x 3 can’t be either H 0 or H 1 since the sample mean is not a parameter. (vi) x 3 can’t be either H 0 or H 1 since the sample mean is not a parameter. (vii) x 3 can’t be either H 0 or H 1 since the sample mean is not a parameter. (viii) x 3 can’t be either H 0 or H 1 since the sample mean is not a parameter. (ix) s 5 can’t be either H 0 or H 1 since the sample standard deviation is not a parameter. (x) p 5 could not be H 0 or H 1 since p, a parameter, cannot take values below zero or above 1. (xi) 3 could not be H 0 or H 1 since , a parameter, cannot take values below zero. (xii) 3 could be H 0 since it contains a parameter and an equality. H 1 would be 3 . (xiii) p .5 can’t be either H 0 or H 1 since the sample proportion is not a parameter. Learn to make and call it ‘mu.’ It’s not a ‘u’ and you are too young to be unable to adjust to using a Greek letter! Problem 2: A man walks into a bar. He drinks 15 bottles of beer. These bottles are supposed to contain 12 ounces of beer with a population standard deviation of 0.2 ounces. On the basis of the man's condition when he leaves the bar, we conclude that the sample mean for the bottles was 11.80 ounces. Test the hypothesis that the population mean for these bottles was 12 ounces. Assume that the confidence level is 95%. a) State your null and alternative hypotheses. b) Find critical values for the sample mean and test the hypothesis. c) Find a confidence interval for the sample mean and test the hypothesis. d) Use a test ratio for a test of the sample mean e) Find a p-value for the null hypothesis using the Normal table and use the p-value to test the hypothesis. 1 252solngr2-06 10/3/06 (Open this document in 'Page Layout' view!) Solution: a) Since the problem mentions a sample mean and the population standard deviation is given, we go to table 3 and find the following. Interval for Confidence Hypotheses Test Ratio Critical Value Interval x z 2 x Mean ( known) x H0 : 0 z H1 : 0 xcv 0 z 2 x x 0 x n Never use z with s unless degrees of freedom are high! Never use t with or p ! H : 12 a) What the problem asks is in the following hypotheses: 0 . From the problem H 1 : 12 statement 0 12, x 11 .80 , 0.2, n 15 and .05 . This is a two-sided test of a mean, so we need x 0.2 0.05164 and z z.025 1.960 . 2 n 15 b) xcv 0 z x 12 1.9600.05164 12 0.101 or 11.899 to 12.101. 2 Make a diagram. Make a Normal curve with a mean at 12. Shade the rejection zones below 11.899 and above 12.101. Show that x 11 .80 is in the rejection zone, so reject H 0 . c) x z x 11.80 1.9600.05164 11.80 0.101 or 11.699 to 11.901. 2 Make a diagram. Make a Normal curve with a mean at 11.80. Shade the confidence interval between 11.899 and 12.101. Since 0 12 is not on this interval, reject H 0 . d) Make a diagram. Make a Normal curve with a mean at 0. Shade the rejection zones below x 0 11 .80 12 z 2 z.025 1.960 and above z 2 z.025 1.960 . Compute z 3.873 . x 0.05164 Show that -3.87 is in the lower rejection zone. reject H 0 . e) Since this is a two-sided test and the value of z is below zero, p value 2Px 11.80 2Pz 3.87 2.5 P 3.87 z 0 2.5 .4999 .0002 . Since p value .05 , reject H 0 . Problem 3: A psychiatrist is treating a group of aborigines who are suffering from depression. Whether justifiably or not, she considers this group a random sample of 15 taken from a very large number of depressed individuals. The numbers below represent the measurement of the sample’s level of depression an hour after taking the pill using a commonly used (Coolidge Axis II) scale for measuring depression. Personalize the data as follows: add the digits of your student number to the last six numbers. Example: Ima Badrisk has the student number 123456; so the last six numbers become {51, 52, 53, 54, 55, 56}. 52 53 58 50 53 58 55 66 53 50 50 50 50 50 50 Compute the sample standard deviation using the computational formula. (If you did this correctly on the last assignment, just copy your work.) The doctor believes that subjects fed a sugar pill will have an average score on the same scale of 58.73. a) Test the validity of the doctor’s hypothesis using a confidence level of 95% and a critical value for the sample mean. (You cannot test the validity of a hypothesis that you haven’t stated!) b) Find an approximate p-value for the statement. c) Will we reject the doctor’s hypothesis at a confidence level of (i) .001? (ii) .01? (iii) .10? Using the p-value explain why. 2 252solngr2-06 10/3/06 (Open this document in 'Page Layout' view!) Ima Badrisk did the following on the last assignment. x index x2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 52 53 58 50 53 58 55 66 53 51 52 53 54 55 56 819 x 819 , x 44931 , x 819 54.60 x 2 2704 2809 3364 2500 2809 3364 3025 4356 2809 2601 2704 2809 2916 3025 3136 44931 n s x2 x n 15 15 2 nx 2 n 1 44931 1554 .62 14 213 .6 15 .2571 14 The formula for the sample standard deviation is in Table 20 of the Supplement. s x 15 .2571 3.9060 . s x2 15 .2571 1.0171 1.0085 n 15 n a) Since the problem mentions a sample mean and the population standard deviation is not given, we go to table 3 and find the following. Interval for Confidence Hypotheses Test Ratio Critical Value Interval sx sx x t 2 s x Mean ( unknown) H0 : 0 H1 : 0 DF n 1 t xcv 0 t 2 s x x 0 sx sx s n H 0 : 58 .73 The hypotheses are xcv 0 t 2 s x and we have found that n 15, x 54.60 and H 1 : 58 .73 s 1.0085 . .05, DF n 1 14 and t n1 t 14 2.145 . x 58.73 2.145 1.0085 x 2 cv .025 58.73 2.16 . Our critical values are 56.57 and 60.89. Make a diagram. Make an almost Normal curve with a mean at 58.73. Shade the rejection zones below 56.57 and above 60.89. Since x 54.60 is in the lower rejection zone, reject H 0 . b) Compute the test ratio t x 0 54 .60 58 .73 4.095 . This is on the low side of zero, so sx 1.0085 p value 2Px 54.60 2Pt 4.095 . Remember that DF n 1 14 . An excerpt from the t table is shown below. Confidence level df .45 .40 .35 .30 .25 .20 .15 .10 .05 .025 .01 .005 .001 14 0.128 0.258 0.393 0.537 0.692 0.868 1.076 1.345 1.761 2.145 2.624 2.977 3.787 Because of Symmetry, this tells us that P t 14 2.624 .01 , P t 14 2.977 .005 and P t 14 3.787 .001. From this we can guess that P t 14 4.095 .001 . If we double this probability, we can say p value 2Pt 4.095 .002 . c) Remember the rule on p-value: If the p-value is below the significance level, reject the null hypothesis. We will reject the doctor’s hypothesis at confidence levels of (ii) .01 and (iii) .10 because the p-value is below these confidence levels. For (i) .001, we cannot really be sure, so we have to say not to reject. 3 252gras1-06 9/26/06 Problem 4 (Moore): 40% of Americans claim that they attend church weekly. You believe that the proportion is below 40%. Your henchpersons follow around a random sample of 200 people for a week. They find that x people attend church. (To calculate the number x , add the 2nd to last digit of your student number to 60. If the second to last digit of your student number is 0, add 10. Example: Ima Badrisk has the student number 123456; so she says that x 65 .) a) State your null and alternative hypotheses. b) Find a test ratio for a test of the proportion. c) Find a p-value for this ratio and use it to test the hypothesis at a 5% significance level. Solution: a) Since the problem mentions a proportion, we go to table 3 and find the following. Interval for Confidence Hypotheses Test Ratio Critical Value Interval Proportion p p z 2 s p pq n q 1 p H 0 : p p0 H1 : p p0 z p p0 p pcv p0 z 2 p p0 q0 n q0 1 p0 a) Since we believe that the proportion is below 40 and this statement does not include an equality, H : p .40 we consider this an alternate hypothesis. Thus our hypotheses are 0 . H 1 : p .40 sp b), c) z p p0 and p p p0 q0 .40 .60 . n 200 and p0 .40 . p .0012 .034641 . 200 n p This is a left-sided test since we are worrying about the number of people in the sample who attend church being too small for the null hypothesis to be true. Thus, if our actual value of z is z1 , the p-value will be the probability of being below z1 . 61 .305 .40 (i) x 61, p .305 , z 2.74 . pvalue Px 61 P p .305 200 .034641 Pz 2.74 .5 .4969 .0031 . Since .0031 is below .05 , reject H 0 . .310 .40 62 (ii) 2.60 . pvalue Px 62 P p .310 x 62, p .310 , z .034641 200 Pz 2.60 .5 .4953 .0047 . Since .0047 is below .05 , reject H 0 . .315 .40 63 (iii) x 63, p 2.45 . pvalue Px 63 P p .315 .315 , z .034641 200 Pz 2.45 .5 .4929 .0071 . Since .0071 is below .05 , reject H 0 . .320 .40 64 (iv) x 64, p 2.31 . pvalue Px 64 P p .320 .320 , z .034641 200 Pz 2.31 .5 .4896 .0104 . Since .0104 is below .05 , reject H 0 . 65 .325 .40 (v) 2.17 . pvalue Px 65 P p .325 x 65, p .325 , z .034641 200 Pz 2.17 .5 .4850 .0150 . Since .0150 is below .05 , reject H 0 . .330 .40 66 (vi) x 66, p 2.02 . pvalue Px 66 P p .330 .330 , z .034641 200 Pz 2.02 .5 .4783 .0217 . Since .0217 is below .05 , reject H 0 . 67 .335 .40 (vii) x 67, p 1.88 . pvalue Px 67 P p .335 .335 , z .034641 200 Pz 1.88 .5 .4699 .0301 . Since .0301 is below .05 , reject H 0 . 4 252gras1-06 9/26/06 68 .340 .40 1.73 . pvalue Px 68 P p .340 .340 , z .034641 200 Pz 1.73 .5 .4582 .0418 . Since .0418 is below .05 , reject H 0 . 69 .345 .40 (ix) x 69, p 1.59 . pvalue Px 69 P p .345 .345 , z .034641 200 Pz 1.59 .5 .4441 .0559 . Since .0559 is not below .05 , do not reject H 0 . 70 .350 40 (x) 1.44 . pvalue Px 70 P p .350 x 70, p .350 , z .034641 200 Pz 1.44 .5 .4251 .0749 . Since .0749 is not below .05 , do not reject H 0 . (viii) x 68, p Extra Credit Problem 5: a) Finish problem 4 by finding an appropriate confidence interval for the proportion and showing whether it contradicts the null hypothesis. H : p .40 Solution: Our hypotheses are 0 and the two-sided confidence interval formula is H 1 : p .40 pq . If the confidence interval is to go in the same direction as the alternate n hypothesis, it would read p p z s p . Since .05 and this is a one-sided test, use z.05 1.645 . To p p z 2 s p where s p show your evidence, make a diagram of a normal curve centered at p . Shade the area below the upper limit in your confidence interval and show that .40 either is or is not in the interval. Even better, represent the confidence interval by shading the area below the upper bound and the null hypothesis by shading the area above .40. If these areas overlap, you cannot reject H 0 . The work below was computer assisted. .305 .695 61 0.0010599 0.0325557 . .305 , s p 200 200 p .305 1.645 .0325557 .358554 . Since p .358554 and p .40 cannot both be true, reject H 0 . (i) x 61, p 62 .310 .690 0.0010695 0.0327032 . .310 , s p 200 200 p .310 1.645 .0327032 .363797 . Since p .363797 and p .40 cannot both be true, reject H0 . (ii) x 62, p 63 .315 .685 0.0010789 0.0328462 . .315 , s p 200 200 p .315 1.645 .0328462 .369032 . Since p .358554 and p .40 cannot both be true, reject H0 . (iii) x 63, p 64 .320 .680 0.010880 0.0329848 . .320 , s p 200 200 p .320 1.645 .0329848 .374160 . Since p .374160 and p .40 cannot both be true, reject H0 . (iv) x 64, p 65 .325 .675 0.0010969 0.0331191 . .325 , s p 200 200 p .325 1.645 .0331191 .379481 . Since p .379481 and p .40 cannot both be true, reject H0 . (v) x 65, p 5 252gras1-06 9/26/06 .330 .670 66 0.0011055 0.0332491 . .330 , s p 200 200 p .330 1.645 .0332491 .384695 . Since p .384695 and p .40 cannot both be true, reject H0 . (vi) x 66, p .335 .665 67 0.0011139 0.0333748 . .335 , s p 200 200 p .305 1.645 .0333748 .389901 . Since p .389901 and p .40 cannot both be true, reject H0 . (vii) x 67, p .340 .660 68 0.0011220 0.0334963 . .340 , s p 200 200 p .340 1.645 .0334963 .395101 . Since p .395101 and p .40 cannot both be true, reject H0 . (viii) x 68, p .345 .655 69 0.0011299 0.0336136 . .345 , s p 200 200 p .345 1.645 .0336136 .400294 . Since p .400294 and p .40 can both be true (ix) x 69, p (because any value of p between .400000 and .400294 would satisfy both inequalities), do not reject H 0 . .350 .650 70 0.0011375 0.0337268 . .350 , s p 200 200 p .350 1.645 .0337268 .405481 . Since p .405481 and p .40 can both be true (x) x 70, p (because any value of p between .400000 and .405481 would satisfy both inequalities), do not reject H 0 . b) Use the data in problem 3 to test the hypothesis 50. Solution: Interval for Confidence Hypotheses Test Ratio Interval VarianceSmall Sample 2 VarianceLarge Sample n 1s 2 H 0 : 2 02 .25 .5 2 H1: : 2 02 s 2DF H 0 : 2 02 z 2 2DF H1 : 2 02 2 n 1s 2 02 z 2 2 2DF 1 Critical Value 2 s cv s cv .25 .5 2 02 n 1 2 DF z 2 2 DF Ima Badrisk has already told us that n 15 , x 54.60 , s x2 15.2571 and s x 3.9060 . Since the degrees of freedom are below 31, we can use the small sample formula above. We have used .05, DF n 1 14 . This is a two-sided test of H 0 : 50 and H 0 : 50 . The usual way to do this is with a Test Ratio. n 1s 2 14 15 .2571 0.0854 . To be in the central 95% of values, this ratio should fall between 2 02 50 2 14 14 2.025 26.1190 and 2 .975 5.6287 . Since the chi-squared ratio does not fall between these values, reject H 0 . 6 252gras1-06 9/26/06 If we want a critical value, the formula above is interpreted as 2 s cv 22 02 12 2 02 . From n 1 14 the null hypothesis, we have 02 50 2 2500. . We already know that s x2 15.2571 , 2 .025 26.1190 14 2 and 2 .975 5.6287 , so that our critical values are scv n 1 and 2 s cv 5.6287 50 2 1005 .125 and 14 26 .1190 50 2 4664 .107 . Since s x2 15.2571 does not fall between these values, reject H 0 . 14 n 1s 2 , which is interpreted as If we want to use a Confidence Interval, use the formula 2 2 .5 .5 2 2 s cv n 1s 2 2 2 2 n 1s 2 12 2 with the two values of chi-squared used with the test ratio. This means 1415.2571 1415.2571 . This gives us 8.1179 2 37 .9483 or 2.8597 6.1602 , a 2 26.1190 5.6287 comparatively gigantic confidence interval which still does not include H 0 : 50 . c) Use Minitab to check your answer to problem 4. Do this three ways First: Enter Minitab. Use the Editor pull-down menu to enable commands. Then enter the commands below. Pone 200 x ; (Replace x with the number you used.) Test 0.4; Alter -1; (Makes H1 ‘less than.’) useZ. (Uses normal approx. to binomial) Second: Use the Stat pull-down menu. Choose ‘Basic Stat’ and then ‘1 proportion.’ Check ‘summarized data’ and enter your n and x . Press Options. Set ‘test proportion’ as 0.4, alternative hypothesis as ‘less than’ and check ‘Normal distribution.’ Go. Third: Use the pull-down menu again. But before you start put x yeses and n x noes in column 1. Uncheck ‘summarized data’ and let Minitab know that the data are in column 1 (C1). Other options are unchanged. Solution: See the appendix 252solngr2_06s. 7