252y0562 11/9/05 (Page layout view!) ECO252 QBA2 SECOND HOUR EXAM November 9, 2005 Name KEY Circle Hour of Class Registered MWF2, MWF3, TR12:30, TR3 Show your work! Make Diagrams! Exam is normed on 50 points. Answers without reasons are not usually acceptable. I. (8 points) Do all the following. Make diagrams! x ~ N 23, 6 - If you are not using the supplement table, make sure that I know it. 30 23 1. Px 30 P z Pz 1.17 Pz 0 P0 z 1.17 .5 .3790 .9790 6 Make a diagram: For x draw a Normal curve with a vertical line at 23 in the middle. Shade the entire area below 30. This will cover areas on both sides of 23. Or for z draw a Normal curve with a vertical line at zero in the middle. Shade the area below zero and from zero to 1.17. 30 23 2.00 23 z 2. P2.00 x 30 P P3.50 z 1.17 6 6 P3.50 z 0 P0 z 1.17 .4998 .3790 .8788 Make a diagram: For x draw a Normal curve with a vertical line at 23 in the middle. Shade the entire area between 2 and 30. This will cover areas on both sides of 23. Or for z draw a Normal curve with a vertical line at zero in the middle. Shade the area from -3.50 to zero and from zero to 1.17. 23 23 0 23 z 3. P0 x 23.00 P P3.83 z 0 .4999 6 6 Make a diagram: For x draw a Normal curve with a vertical line at 23 in the middle. Shade the area between 0 and 23. This will be an area to the left of 23. Or for z draw a Normal curve with a vertical line at zero in the middle. Shade the area from -3.83 to zero. x.055 To find z .055 make a Normal diagram for z showing a mean at 0 and 50% above 0, divided into 5.5% above z .055 and 44.5% below z .055 . So P0 z z.055 .4450 The closest we can come is P0 z 1.59 .4441 or P0 z 1.60 .4452 . The second one is closer, so use z.055 1.60 . x.055 z.055 23 1.606 32.60 . Check: 32 .60 23 Px 33.57 P z Pz 1.60 Pz 0 P0 z 1.60 .5 .4452 .0548 5.5% 6 4. 252y0562 11/9/2005 (Page layout view!) II. (24+ points) Do all the following? (2points each unless noted otherwise). Note the following: 1. This test is normed on 50 points, but there are more points possible including the take-home. You are unlikely to finish the exam and might want to skip some questions. 2. A table identifying methods for comparing 2 samples is at the end of the exam. 3. If you answer ‘None of the above’ in any question, you should provide an alternative answer and explain why. You may receive credit for this even if you are wrong. 4. Use a 5% significance level unless the question says otherwise. Computer problem is at the end. Note that some formulas have been squashed by a bug in Word. They should print correctly and will read right if you click on them. Exhibit 1 The director of the MBA program of a state university wanted to know if a one week orientation would change the proportion among potential incoming students who would perceive the program as being good. Given below is the result from 215 students’ view of the program before and after the orientation. After the Orientation Good Not Good 93 37 71 14 164 51 Before the Orientation Good Not Good Total Total 130 85 215 1. Referring to Exhibit 1, which test should she use? 2 a) -test for difference in proportions b) Z-test for difference in proportions c) McNemar test for difference in proportions d) Wilcoxon rank sum test ANSWER: c TYPE: MC DIFFICULTY: Moderate KEYWORDS: McNemar test, assumption In Method D6b, the McNemar Test, we compare two proportions taken from the same sample. Assume that question 2 question 1 yes no two different questions are asked of the same group with the following responses. yes x11 x12 x no 21 x 22 question1 In this case good not question 2 good not H 0 : p1 p 2 If we wish to test ,where p1 is the proportion saying 93 37 H 1 : p1 p 2 71 14 ‘yes’ before and p 2 is the proportion saying ‘yes’ after, let z x12 x 21 x12 x 21 37 71 37 71 34 108 34 3.2717 (The test is valid only if x12 x 21 10 .) 10 .3923 2. Referring to Exhibit 1, what is the null hypothesis? Solution: See above. 3. Referring to Exhibit 1, what is the value of the computed test statistic? 2 252y0562 11/9/2005 (Page layout view!) Solution: See above. ANSWER: 3.37 or 3.37 TYPE: PR DIFFICULTY: Moderate KEYWORD: McNemar test, test statistic Referring to Exhibit 1, what should be the director’s conclusion? .04 a) There is sufficient evidence that the proportion of potential incoming students who perceive the program as being good is the same before and after the orientation. b) There is insufficient evidence that the proportion of potential incoming students who perceive the program as being good is the same before and after the orientation. c) *There is sufficient evidence that the proportion of potential incoming students who perceive the program as being good is not the same before and after the orientation. d) There is insufficient evidence that the proportion of potential incoming students who perceive the program as being good is not the same before and after the orientation. ANSWER: c TYPE: TF DIFFICULTY: Moderate KEYWORD: McNemar test, conclusion pvalue 2Pz 3.37 2.5 .4995 .0010 . Since .0010 is below .04 , we reject the null hypothesis. 4. Exhibit 2 (This was Problem D7) In a study of sleep gotten with a sleeping pill and with a placebo the results were (Keller, Warren, Bartel, 2nd ed. p. 354) d x1 x2 Pill Placebo difference 7.3 6.8 .5 8.5 7.9 .6 6.4 6.0 .4 9.0 8.4 .6 6.9 6.5 .4 x1 7.620 x 2 7.120 d 0.500 s12 1.197 s 22 0.997 s d2 0.010 We want to see if the means or medians, as appropriate, are different. Assume these are paired samples from a Normal distribution. 5. Referring to Exhibit 2, what should be the degrees of freedom for this test? a) * DF 4 b) DF 8 c) DF 9 2 s12 s 22 n1 n 2 0.4388 2 7.9341 (Rounded to 7.) d) DF 2 2 0.2394 2 0.1994 2 s12 s 22 4 4 n1 n2 n1 1 n 1 e) Degrees of freedom2 are irrelevant because we are using a (Mann-Whitney-) Wilcoxon rank sum test. f) Degrees of freedom are irrelevant because we are using a Wilcoxon signed rank test. g) We do not have enough information to answer this question. (You must explain what information is missing) 3 252y0562 11/9/2005 (Page layout view!) 6. Referring to Exhibit 2, in the formula a) , we should use the following. * b) c) , which is used to compute d) The standard error is irrelevant because we are using a (Mann-Whitney-) Wilcoxon signed rank test. The standard error is irrelevant because we are using a (Mann-Whitney-) Wilcoxon signed rank test. We do not have enough information to answer this question. (You must explain what information is missing) e) f) 7. Referring to Exhibit 2, assume that the correct alternate hypothesis is 1 2 , that use of the formula t d D0 x1 x 2 1 2 is correct, that t 1.877 and that there are 27 sd sd degrees of freedom (Assume that all of these are correct, even though it is very unlikely!), we should do the following. a) Reject the null hypothesis only if the significance level is a value below .025 b) Reject the null hypothesis if the significance level is any value below .025 c) Reject the null hypothesis if the significance level is any value above .025 d) Reject the null hypothesis if the significance is any value above .05 e) *Reject the null hypothesis if the significance level is any value above .10 f) None of the above. 27 27 2.052 so that, for a 2-sided test, the p-value is 1.703 and t .025 Explanation: Note t .05 between .05 and .10. If the p-value is below the significance level, reject the null hypothesis. 4 252y0562 11/9/2005 (Page layout view!) 8. You are having a part produced in two different machines. x1 is 101 randomly selected data points that represent the length of parts from machine one, x 2 is 126 randomly selected data points that represent the length of parts from machine two. You want to test your suspicion that parts from machine one are more variable in length than parts from machine two (This is the same as saying that machine 2 is more reliable than machine 1). Test this suspicion after stating your hypotheses. Your sample means are 25.593 inches for machine 1 and 25.592 for machine 2. Sample standard deviations are 8.379 for machine 1 and 6.964 for machine 2. Solution: H 0 : H 0 : 22 12 2 2 2 1 or . In terms of the variance ratio 12 or 22 , the alternate 2 1 H 1 : 22 12 H 1 : 2 1 hypothesis rules, so H 0 : 12 22 1 and H 1 : 12 22 1. Since you are comparing variances, use Method D7. Compare the ratio s 22 s12 against F . 2 s12 8.379 1.453 . This has the F distribution with 100 and 125 degrees of freedom. From s22 6.964 the table F 100,125 1.36 . Since the computed F is larger than the table F, reject the null .05 hypothesis. 9. (Extra credit) compute a confidence interval for the ratio of the two variances in the previous problem. Solution: From the outline s12 s 22 12 s12 ( n2 1, n1 1) s12 8.379 F . 2 1.453 s2 6.964 F n1 1, n2 1 22 s 22 2 1 2 2 has the F distribution with 100 and 125 degrees of freedom. 2 (125, 100) 100,125 1.45 . F 125,100 must be between 1.453 1001,125 12 1.453 F.025 F.025 . .025 2 F.025 100,100 1.48 and F 200,100 1.42 , probably about 1.46. The interval thus becomes F.025 .025 1.453 2 2 1 12 1.453 1.46 or 1.00 12 2.12 . 1.45 2 2 5 252y0562 11/9/2005 (Page layout view!) 10. The following problem is an easier version of a problem in the text. A pet food canning factory produces 8 oz cans of cat food. The manager suspects that the amount of cat food put into the cans by machine 2 is significantly larger than that put in by machine 1. A sample of output is taken with the results below. x1 8.012 x 2 8.020 s1 0.048 s 2 0.015 n1 176 n 2 144 a) What are the manager’s null and alternate hypotheses? (1) b) You will use a test ratio of the form d D0 to test the hypothesis. Find s d . (3) sd Warning: Be accurate! s d2 is roughly the size of .0000175. If you start rounding excessively, your answers will be completely wrong. If you absolutely cannot do this section, say so and use .000175, which is very wrong. c) Compute the test ratio and find a p-value for your result. (2) d) If the manager had, instead, suspected that a larger amount was going into cans filled by machine 1, what would the p-value be? (1) e) Find an 89% two-sided confidence interval for the difference between the average amounts of food put in the cans by the two methods. (2) [25] Solution: a) H 1 : 1 2 , so H 1 : 1 2 Note: d 8.012 8.020 0.008 b) 0.048 2 .0000131 176 0.015 2 .00000156 s d 144 s12 s 22 n1 n1 0.048 2 0.015 2 .0000131 .00000156 .0000147 .003828 176 144 8.012 8.020 2.0899 pvalue Pz 2.09 .5 .4817 .0183 .003828 d) 1-.0183 = .9817. e) From page 1 z.055 1.60 , so D 1 2 d z .055 s d z c) z 0.008 1.60.003828 0.008 0.006 or -0.002 to -0.014. 6 252y0562 11/9/2005 (Page layout view!) 11. Over 105 weeks, the following numbers of mortgages were approved by a bank. Do the results below follow a Poisson distribution? O Number Approved 0 23 a) Find the average number of mortgages 1 24 approved per week? Hint: The original 2 30 version of the problem came up with a mean 3 16 of 2.1058 approvals per week. You will 4 6 come out with something closer to a mean 5 4 that you actually can find in your tables. (1) 6 1 7 1 8 or more 0 Total 105 b) If the data followed an appropriate Poisson distribution exactly, what would the numbers of weeks be with 0, 1, 2, 3, 4, 5, 6, 7 and 8 or more approvals be? (3) c) Use a statistical test to compare the number of actual approvals with the distribution you found in the last section. (3) d) If all this sounds like too much work, guess the mean and compare the observed data with a Poisson distribution with the mean that you guessed. Do not use a Chi-squared method in d. (5) [37] Solution: (a O xO Number Approved x 0 1 2 3 4 5 6 7 8 or more Total 23 24 30 16 6 4 1 1 0 105 0 24 60 48 24 25 6 7 0 189 b) The f column below was copied from the Poisson table for a parameter of 1.8. It actually included the following probabilities: for 6, .007809; for 7, .002008; for 8, .000452; for 9, .000090; for 10, .000016 and for 11, .000003 . If you multiply these numbers by 105, you will get values of E that are less than 5. They were lumped together in a single class for 5 and over. I took a chance on the 5+ group, since its expected value is still below 5. Note that, if you are rounding these quantities, the easiest way to get mean 189 1.80 105 the last probability is Px 5 1 Px 4 1 .96359 .03641 So E fn f 105 x 1 2 3 4 5 6 0 1 2 3 4 5+ E 17.3564 31.2415 28.1173 16.8705 7.5917 3.8226 f 0.165299 0.297538 0.267784 0.160671 0.072302 0.036406 c) The Chi-squared computations are below. Both the traditional and short-cut method are shown. Row 1 2 3 4 5 6 O E 23 17.3564 24 31.2415 30 28.1173 16 16.8705 6 7.5917 6 3.8229 105 105.0000 D E O D2 -5.64361 7.24149 -1.88268 0.87045 1.59171 -2.17737 0.00000 31.8503 52.4392 3.5445 0.7577 2.5335 4.7409 D2 E O2 E 1.83507 30.4787 1.67851 18.4370 0.12606 32.0087 0.04491 15.1745 0.33372 4.7420 1.24023 9.4176 5.25851 110.2585 7 252y0562 11/9/2005 (Page layout view!) 4 The table chi-square for 6 – 1 – 1 = 4 degrees of freedom is 2 .05 9.4877 . (We lost a degree of freedom because we estimated a parameter from the data.) Our computed chi-square is 110 .2585 105 5.2585 . Our null hypothesis is that the distribution is Poisson, and since our computed chi-square is less than the table value we cannot reject the null hypothesis. 12. A real estate company is comparing the amount of time people live in Smallville (Sample 1) with the amount of time they live in Metropolis (Sample 2). The figures here indicate duration in months. The Minitab command used here is a pull-down command that is equivalent to the twosample command that you used. MTB > TwoT 100 35 30 150 50 32.4037; SUBC> Alternative -1. Two-Sample T-Test and CI Sample 1 2 N 100 150 Mean 35.0 50.0 StDev 30.0 32.4 SE Mean 3.0 2.6 Difference = mu (1) - mu (2) Estimate for difference: -15.0000 95% upper bound for difference: -8.3931 T-Test of difference = 0 (vs <): T-Value = -3.75 DF = 223 P-Value = 0.000 a) Turn in your first computer assignment only. (2) b) For this assignment make 3 curves with centers at zero and with the t ratio marked by a vertical line. Indicate, using the three diagrams and information from the printout, what the p-value would be if the null hypothesis was (i) H 0 : 1 2 (ii) H 0 : 1 2 (iii) H 0 : 1 2 Give me a number for the p-value. (1.5) c) Using the style that I use for null hypotheses, which of the three hypotheses in b) is the null hypothesis used here and would it be would be rejected if the confidence level was .05?. (1) d) Nothing in the command told Minitab which method to use. Of the four methods you learned to compare two means, which one did Minitab use? Solution: b) (i) H 0 : 1 2 pvalue 1 0 1 (ii) H 0 : 1 2 pvalue 0 (iii) H 0 : 1 2 pvalue 20 0 Diagram: It says T-Value = -3.75 so make three diagrams with an almost Normal curve and a mean at zero. (i) 1 is the area above -3.75, (ii) 0 is the area below -3.75, (iii) 0 is the area above +3.75 and the area below -3.75. (1.5) c) It says T-Test of difference = 0 (vs <). This says H 1 : 1 2 , so the null hypothesis is H 0 : 1 2 . P-value is below .05, so reject the null hypothesis. d) Of the four methods you learned to compare two means, Minitab uses D3 when there are independent samples and no explicit directions that say to use a pooled or equal variance method. . 8 252y0562 11/9/2005 (Page layout view!) ECO252 QBA2 SECOND EXAM Nov 8-9, 2005 TAKE HOME SECTION Name: _________________________ Student Number: _________________________ III. Do sections adding to at least 20 points - Anything extra you do helps, and grades wrap around) . Show your work! State H 0 and H 1 where appropriate. You have not done a hypothesis test unless you have stated your hypotheses, run the numbers and stated your conclusion. (Use a 95% confidence level unless another level is specified.) Answers without reasons are not usually acceptable. Neatness counts! Check the website regularly for hints or corrections. 1) A state is trying to figure out whether the background on highway signs makes a difference. In order to do this two samples of 15 individuals are shown a number of slides rapidly. The slides have either a green or a red background. You are trying to find out whether there is a difference between the number of slides correctly read between those with a red or a green background. To do so you will compare the mean or median as appropriate to the distribution. To personalize the data, look at the third digit from the end to decide what red data you will use. Call the column that you pick rj and compute a column called dj with the formula dj = green – rj. (Example: Seymour Butz’s student number is 976512, so he picks column 5 and used d5 = green – r5.) Tell me what column you are using! If you compare means state your hypotheses both in terms of 1 and 2 and in terms of D 1 2 . Row 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 green 8 10 6 5 9 7 3 7 7 3 6 6 8 3 10 r0 9 10 9 4 9 9 8 7 5 6 10 8 8 9 9 r1 5 9 5 7 6 7 9 8 7 5 7 5 8 7 7 r2 7 10 11 9 8 8 8 7 9 9 7 7 10 7 6 r3 6 12 7 10 12 10 9 11 9 8 7 6 11 13 8 r4 5 6 5 6 5 11 8 8 7 9 10 7 7 6 5 r5 8 9 6 10 7 7 5 6 11 9 10 7 7 8 8 r6 9 7 6 7 8 7 6 6 7 7 5 7 10 7 6 r7 7 9 10 11 11 6 11 6 9 7 7 7 9 8 8 r8 10 9 7 10 6 6 7 8 8 7 9 11 6 8 7 r9 5 6 6 7 10 10 10 13 9 6 8 6 7 8 10 Minitab computed some basic statistics from the data which will help you in some parts of this problem. Variable green r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 N 15 15 15 15 15 15 15 15 15 15 15 Mean 6.533 8.000 6.800 8.200 9.267 7.000 7.867 7.000 8.400 7.933 8.067 SE Mean 0.601 0.458 0.355 0.368 0.581 0.488 0.435 0.324 0.456 0.408 0.573 StDev 2.326 1.773 1.373 1.424 2.251 1.890 1.685 1.254 1.765 1.580 2.219 Minimum 3.000 4.000 5.000 6.000 6.000 5.000 5.000 5.000 6.000 6.000 5.000 Q1 5.000 7.000 5.000 7.000 7.000 5.000 7.000 6.000 7.000 7.000 6.000 Median 7.000 9.000 7.000 8.000 9.000 7.000 8.000 7.000 8.000 8.000 8.000 Q3 Maximum 8.000 10.000 9.000 10.000 8.000 9.000 9.000 11.000 11.000 13.000 8.000 11.000 9.000 11.000 7.000 10.000 10.000 11.000 9.000 11.000 10.000 13.000 a) Display the numbers that you are using in columns and compute a sample mean and sample standard deviation for the d column. (1) 9 252y0562 11/9/2005 (Page layout view!) In this problem assume that the red and green data are two independent samples. Use a confidence level of 95%. b) Assume that you believe that the normal distribution does not apply to the data and compare the means or medians as appropriate. (4) c) You suspect that the data has the Normal distribution. Test to see if the Normal distribution applies. Use a test that I taught you. (3) d) You decide that the Normal distribution applies to the data, but do not know if the variances are equal. Test them for equality. (1) e) You conclude that the underlying distributions are Normal and that the population variances are equal. Compare the means or medians as appropriate. Use a test ratio, critical value or a confidence interval (4) or all three (6). [15] f) (Extra credit) You conclude that the underlying distributions are Normal and that the population variances are not equal. Compare the means or medians as appropriate. Use a test ratio, critical value or a confidence interval (5) or all three (7) 2) In fact the data on the previous page applies to a single sample of 15 individuals. That is the first line of your worksheet tells you how the first person in the sample did when showed the same slides with red or green backgrounds. This applies to a) and b) in this question. Use a confidence level of 95%. a) Assume that you believe that the normal distribution does not apply to the data and compare the means or medians as appropriate. (3) b) You assume that the data has the Normal distribution. Compare the means or medians as appropriate. (3) c) For any part of one of these problems (tell me which one!), compute a confidence interval that you would use to compare means if your alternate hypothesis was H 1 : 2 1 . (2) [23] d) For the same part as you used in c), find a p-value for the null hypothesis. (2) [25] These results are all supposed to look to me as you did them by hand. But what I don’t know won’t hurt me. If you want to check your results by computer, you might try to use the following Minitab routine. If you put green in C1 and label columns with headings like rj, dj and dsqj (Seymour called his green, r5, d5 and dsq5.) The routine below with appropriate changes to rj, dj and dsqj, will compute much of the stuff above, though not in the right order. Note that to do a Wilcoxon signed rank test by hand, you will have to drop all zeroes from the d column. Computations for comparing c1 and rj MTB > MTB > MTB > MTB > MTB > MTB > MTB > SUBC> MTB > MTB > MTB > SUBC> MTB > SUBC> MTB > SUBC> let dj = c1 – rj let dsqj = dj *dj print c1 rj dj dsqj describe c1 rj dj sum dj ssq dj TwoSample c1 rj; Pooled. TwoSample c1 rj. Paired c1 'rj'. VarTest c1 'rj'; Unstacked. WTest 0.0 'dj'; Alternative 0. Mann-Whitney 95.0 c1 'rj'; Alternative 0. 10 252y0562 11/9/2005 (Page layout view!) If you want to fake the calculations for the Mann-Whitney test, try this. Procedure for setting up Mann-Whitney Test #c1 is green, c2 is rj, c3 is difference. # Mann Whitney Test MTB > Stack c1 c2 c5; SUBC> Subscripts c6. MTB > Rank c5 c7. MTB > Unstack (c7); SUBC> Subscripts c6; SUBC> After; SUBC> VarNames. MTB > sum c8 MTB > sum c9 MTB > print c1 c8 c2 c9 #The rest is up to you. If you want to fake the calculations for the Wilcoxon signed rank test, try this. Unfortunately, I know no good way to remove the zeros or change the signs except by hand. Procedure for setting up Wilcoxon Signed Rank Test #c1 is green, c2 is rj, c3 is difference. MTB > Let c3 = c1-c2 #Maybe you already did this. MTB > # Wilcoxon signed rank test MTB > let c10 = c3 MTB > #Remove zeroes from c10. (Just use delete on the cells with zeros.) MTB > #Notice that n has gotten smaller. MTB > let c11 = abs(c10) MTB > rank c11 c12 MTB > let c13 = c12 MTB > #Change signs in c13 to agree with signs in c10. MTB > let c14 = c13 *c10 #Check on signs. All should be positive. # Aside from this,consider c14 garbage. MTB > print c10 c11 c12 c13 #You now have the four columns that I computed in MTB > #the examples. The totals are up to you. 3) The results of a Gallup phone survey appear below. Consumers were asked if they objected to having their medical records shared with different types of organizations. Results follow. The proportion in a sample of 1000 who objected to sharing with insurance companies was p1 .820 . The proportion in a sample of 1000 who objected to sharing with pharmacies was p 2 .590 The proportion in a sample of 1000 who objected to sharing with medical researchers was p3 .670 Personalize the data by using the second to last digit of your student number, call it d . Multiply it by .001. Call the result .00d – If the second to last number is zero, use .00d = .010. Add .00d to .820 and subtract .00d from .670. . (Example: Seymour Butz’s student number is 976532, so he adds .003 to .820 and gets .823 and subtracts .003 from .670, getting .667. He leaves .590 alone. a) Is the proportion of people who object different for different institutions? .01 . (4) b) If appropriate, use the Marascuilo procedure to determine which organizations are different. Discuss. (3) [32] 11