252y0122 3/26/01 ECO252 QBA2 Name SECOND HOUR EXAM Hour of Class Registered (Circle) March 20, 2001 MWF 10 11 TR 12:30 2:00 I. (14 points) Do all the following. (Make diagrams!!!) x ~ N 7,9 16 7 3 7 z P 1.11 z 1.00 1. P 3 x 16 P 9 9 P1.11 z 0 P0 z 1.00 .3665 .3413 .7078 67 0 7 z P 0.78 z 0.11 2. P0 x 6 P 9 9 P0.78 z 0 P0.11 z 0 .2823 .0438 .2385 14 7 24 7 z P 3.44 z 0.78 3. P24 x 14 P 9 9 P3.44 z 0 P0 z 0.78 .4997 .2823 .7820 57 2 7 z P 1.00 z 0.22 4. P2 x 5 P 9 9 P1.00 z 0 P0.22 z 0 .3413 .0871 .2542 27 5. F 2 (The Cumulative probability up to 2) . Px 2 P z 9 Pz 0.56 Pz 0 P0.56 z 0 .5 .2123 .2877 6. A symmetrical interval about the mean with 81% probability. We want two points x .905 and x.095 , so that Px.905 x x .095 .8100 . Make a diagram showing 6 in the middle at the center of a 81% region split into two areas with probabilities of .4050. From the diagram, if we replace x by z, P0 z z.095 .4050 . The closest we can come is P0 z 1.31 .4049 . Use z .095 1.31 , and x z.105 7 1.319 7 11.79 , or -4.79 to 18.79. To check this note 18 .795 7 4.79 7 z that P4.79 x 18.79 P 9 9 P 1.31 z 1.31 2P0 z 1.31 2.4049 .8098 .8100 7. x.006 . We want a point x.006 , so that Px x .006 .006 . Make a diagram of z showing zero in the middle, .4940 between 0 and z .006 , and .006 above z .006 . From the diagram, if we replace x by z, P0 z z.006 .4940 . The Normal table says P0 z 2.51 .4940 . So z .006 2.51 , and x z.006 7 2.519 29.59. 29 .59 7 To check this note Px 29 .59 P z Pz 2.51 9 Pz 0 P0 z 2.51 .5 .4940 .006 . 252y0122 3/20/01 II. (6 points-2 point penalty for not trying part a.) Show your work! A test shopper goes to Miller's Supermarkets 8 times and to Albert's Supermarkets 8 times. The amount that was spent using a standardized shopping list is shown below. You can regard these data as two independent random samples from populations with a normal distribution. For Albert's, the sample mean is 115.25 and the sample standard deviation is 1.75255. xm xa Obs Miller's Albert's 1 118 112 2 119 115 3 120 115 4 118 117 5 120 117 6 122 117 7 120 115 8 120 114 a. Compute s m , the standard deviation for Miller's. (3) b. Compute a 99% confidence interval for the difference between the population means 1 and 2 assuming that the variances are equal for the two parent populations. According to your confidence interval, is there a significant difference between the population means (You must tell why!)? (3) c. (Extra Credit) (i) Redo the confidence interval on the assumption that the variances are not equal. (6) (ii) Use an F-test to tell whether you should have assumed that the variances were or were not equal. (2) Solution: a) Use x1 for Miller's and x 2 for Albert's. x 2 115 .25 and s 2 1.75255 , so s 22 3.07143 . Line 1 2 3 4 5 6 7 8 x x1 118 119 120 118 120 122 120 120 957 x12 13924 14161 14400 13924 14400 14884 14400 14400 114493 x12 n1x12 114493 8119 .625 2 11 .875 957 119 .625 s12 1.696429 s1 1.30247 n1 8 n1 1 7 7 b) From Table 3 of the Syllabus Supplement: Interval for Confidence Hypotheses Test Ratio Critical Value Interval Difference H 0: 0 d t 2 sd d cv 0 t 2 sd d 0 t between Two H 1: 0 s 1 1 d Means ( sd s p n 1s12 n2 1s 22 1 2 n n 1 2 unknown, sˆ 2p 1 n1 n2 2 variances DF n1 n2 2 assumed equal) x1 1 2 252y0122 3/20/01 x1 119 .625 , s12 1.696429 , s1 1.30247 x 2 115 .25, s 22 3.0714 , s 2 1.75255 DF n1 n 2 2 8 8 2 14 d x1 x 2 119 .625 115 .25 4.375 sˆ 2p n1 1s12 n2 1s22 = 71.696429 73.0714 1.696429 3.0714 n1 n2 2 sd s p 1 1 n1 n2 14 2 2.38391 1 1 2.38391 .25 8 8 2.38391 .01, 14 t .005 2.977 0.595979 0.77200 Confidence Interval: d t sd 4.375 2.977 0.77200 4.375 2.2982 or 2.076 to 6.673. The 2 interval does not include 0, so there is a significant difference between the means. H 0 : 0 H : 2 H : 2 0 Formally, our hypotheses are H 1 : 0 or 0 1 or 0 1 We reject H 0 . H 1 : 1 2 H 1 : 1 2 0 1 2 c) (i) From the formula table; Interval for Confidence Hypotheses Test Ratio Critical Value Interval d t sd Difference Between Two Means( Unknown, Variances Assumed Unequal) 2 s12 s22 n1 n2 sd DF s12 s22 n 1 n2 2 s12 2 n1 n1 1 s 22 2 n2 n2 1 H 0 : 0 H 1: 0 1 2 t d 0 sd d cv 0 t 2 sd Same as H 0: 1 2 H 1: 1 2 if 0 0 x1 119 .625 , s12 1.696429 , s1 1.30247 x 2 115 .25, s 22 3.0714 , s 2 1.75255 .01 d x1 x 2 119 .625 115 .25 4.375 s12 1.69643 0.212054 n1 8 s 22 3.0714 0.383929 n2 8 sd s12 s 22 0.595982 0.77200 n1 n 2 s12 s 22 0.595982 n1 n 2 DF s12 s 22 n1 n 2 2 2 2 s12 s 22 n1 n2 n1 1 n2 1 .595982 2 0.212054 2 0.383929 2 7 12 .925 , so use 12 degrees of freedom. 7 3 252y0122 3/20/01 12 t .005 3.055 Confidence Interval: The 2-sided interval is d t sd 4.375 3.055 0.77200 4.375 2.359 or 2 2.016 to 6.734. H : 2 s 2 1.6964 c) (ii) F test. 0 1 . To test this at the 1% significance level, test 12 0.5523 and s 2 3.0714 H 1 : 1 2 s 22 s12 1 7,7 . F 7,7 is not on our table but F 7,7 6.99 is and F 7,7 must be 1.811 against F.005 .005 .001 .005 0.5523 7,7 , do not reject H . Conclude that we should have larger than 6.99. Since neither ratio is larger than F.005 0 assumed that the variances were equal. 4 252y0122 3/20/01 III. Do at least 3 of the following 4 Problems (at least 10 each) (or do sections adding to at least 30 points Anything extra you do helps, and grades wrap around) . You must do problem 1a! Show your work! State H 0 and H1 where applicable. Do not answer a question 'yes' or 'no' without citing a statistical test. Use a 95% confidence level unless another level is specified. 1a. Turn in your computer output from computer problem 1 only. (3 - 2 point penalty for not handing this in.) b. (Bowerman et. al.) A researcher knows that last year's average credit card interest rate was 18.3% but believes that, due to increased competition, current rates are better. She checks the interest rates on a random sample of credit cards and comes up with the data given as 'int' on the next page. What does the first test tell us about whether rates have improved? State the null and alternative hypotheses and, using a 5% significance level, tell whether the researcher is right. (3) c. She now wishes to compare these rates with rates she finds in a search of banks that advertise on the net. She assembles another random sample as 'int1' and runs a second test. Again state the hypotheses and conclusion. (2) d. Using the statistics that have been computed for you, verify the value of t in the second test and show graphically how the computer got the p-value. (3) Worksheet size: 100000 cells MTB > RETR 'C:\MINITAB\2X0123-2.MTW'. Retrieving worksheet from file: C:\MINITAB\2X0123-2.MTW Worksheet was saved on 3/13/2001 MTB > print 'int' Data Display int 16.4 16.6 18.6 18.9 15.4 17.4 18.1 17.8 19.5 16.1 17.2 19.2 18.4 14.8 20.0 12.3 14.1 12.9 15.7 11.4 15.3 10.2 15.3 10.5 20.5 17.0 16.5 14.1 18.3 MTB > print 'int1' Data Display int1 18.5 17.3 18.7 15.1 13.6 22.1 First Test MTB > ttest mu=18.3 'int'; SUBC> alt=-1. T-Test of the Mean Test of mu = 18.300 vs mu < 18.300 Variable int N 15 Mean 17.627 StDev 1.538 SE Mean 0.397 T -1.70 P-Value 0.056 H 0 : 18 .3 b) Solution: Since the p-value is above .05, do not reject the null hypothesis of H 1 : 18 .3 equality and do not conclude that now interest rates are better (lower). The researcher has not been proved right. 5 252y0122 3/20/01 Second Test MTB > twosample 'int''int1'; SUBC> alt=1. Two Sample T-Test and Confidence Interval Twosample T for int vs int1 N Mean StDev int 15 17.63 1.54 int1 20 15.47 3.22 SE Mean 0.40 0.72 95% C.I. for mu int - mu int1: ( 0.47, 3.84) T-Test mu int = mu int1 (vs >): T= 2.62 P=0.0070 DF= 28 MTB > c) Solution: If is the mean interest rate from the old population and 1 is the rate from the net H 0 : int int1 H 0 : 1 population, or Since the p-value is below .05, reject the null H 1 : 1 H 1 : int int1 hypothesis of equality. Conclude that now interest rates on the net can be proved to be better (lower). d) Solution: If we are comparing two samples, from the formula table; Interval for Confidence Hypotheses Test Ratio Interval Difference between Two Means( unknown, variances assumed unequal) d t 2 s d 2 1 s s n1 n2 sd DF s12 s22 n 1 n2 s12 s22 n1 n2 2 s12 2 n1 n1 1 sd 2 2 s 22 2 n2 n2 1 .40 2 .72 2 H 0 : 0 H 1: 0 1 2 t d 0 sd Critical Value d cv 0 t 2 sd Same as H 0: 1 2 H 1: 1 2 if 0 0 .82365 t d 0 17 .63 15 .47 0 2.62 Make a sd .82365 diagram showing an almost-normal curve with a mean at zero. The p-value is the probability that t 1.65 , so shade the area above 1.65 and label it 5.5%. 6 252y0122 3/20/01 2. Bowerman, O'Connell and Hand tell us that (i) of 30 investors who invested in a bond fund, 6 were dissatisfied, (ii) of 30 investors who invested in a stock fund, 5 were dissatisfied and (iii) of 40 investors who invested in a tax-deferred annuity, 10 were dissatisfied. You may assume that those who were not dissatisfied were satisfied. Use a 99% confidence level. a. Do a two sided confidence interval for the difference between the proportion satisfied with the bond fund and with the stock fund. (3) b. Test that the proportion of investors who were satisfied with the stock fund was higher than the proportion who invested in the bond fund. (3) c. Test the hypothesis that the proportion satisfied was the same for each investment (6) Solution: To summarize the information in the problem - .01 and Investment Bond Fund Stock Fund Annuity 24 25 30 Satisfied 6 5 10 Dissatisfied 30 30 40 Total .8000 .8333 .7500 Proportion satisfied We are comparing p1 .8000 , n1 30 and p 2 .8333 , n2 30. Interval for Confidence Hypotheses Test Ratio Critical Value Interval pcv p0 z 2 p Difference p p 0 p p z 2 sp H 0 : p p0 z between If p0 0 p H 1 : p p0 p p1 p2 proportions p p0 q 0 1 n 1 n If p 0 p 0 p 01 p 02 p1q1 p2 q 2 q 1 p s p p01q 01 p02 q 02 n p n2 p2 n1 n2 p or p 0 0 p0 1 1 n1 n2 n1 n 2 Or use s p 1 s p 2 p1 q1 p 2 q 2 .800 .200 .8333 .1667 .0053333 .0046297 .009963 .09982 n1 n2 30 30 p p1 p 2 .0333 , p 0 24 25 n1 p1 n 2 p 2 30 .8000 30 .8333 .8167 , 30 30 n1 n 2 30 30 .01, z z.01 2.327, z 2 z.005 2.576. Note that q 1 p and that q and p are between 0 and 1. p p 0 q 0 1 a) p p z 2 .8167 .1833 130 130 .0099815 .099907 s p .0333 2.576 .09982 .033 .257 or -.290 to .224. n1 1 n3 2/3 of you were following the old exam so slavishly that you never realized that I had asked for a confidence interval! H 0 : p 0 H 0 : p1 p 2 H 0 : p1 p 2 0 b) Same as or (Only one of the following methods is H 1 : p 0 H 1 : p1 p 2 H 1 : p1 p 2 0 needed!) p p 0 .0333 0 0.333 Make a Diagram showing a 'reject' region below Test Ratio: z p .099907 -2.327. Since -0.033 is above this, do not reject H 0 . or Critical Value: pcv p0 z p 0 2.327 .099907 .2324 . Make a Diagram showing a 'reject' region below -.2324. Since -0.0333 is above this, do not reject H 0 . or Confidence Interval: p p z s p .0333 2.327 .09982 .1990 p .1990 is an interval that includes 0. In all cases do not reject H 0 . 7 252y0122 3/20/01 b) H 0 : Homogeneousor p1 p 2 p 3 H 1 : Not homogeneousNot all ps are equal O Satisfied Not Total Bond Stock Annuity Total p r 24 25 30 79 .79 6 5 10 21 .21 30 30 40 100 1.00 DF r 1c 1 12 2 .2012 9.2103 E Satisfied Not Total Bond Stock Annuity Total p r 23 .7 23 .7 31 .6 79 .79 6.3 8.4 21 .21 6.3 30 .0 30 .0 40 .0 100 1.00 The proportions in rows, p r , are used with column totals to get the items in E . Note that row and column sums in E are the same as in O . (Note that 2 0.7434 is computed two different ways here - only one way is needed.) O2 O E 2 OE O E 2 O E E E 24 23.7 -0.30000 0.09000 0.003797 24.3038 6 6.3 0.30000 0.09000 0.014286 5.7143 25 23.7 -1.30000 1.69000 0.071308 26.3713 5 6.3 1.30000 1.69000 0.268254 3.9683 30 31.6 1.60000 2.56000 0.081013 28.4810 10 8.4 -1.60000 2.56000 0.304762 11.9048 100 100.0 0.00000 0.743420 100.7435 O E 2 100 .7435 100 0.7435 or .743420 O2 n E E Since this is less than 9.2103, do not reject H 0 . (Diagram!) 8 252y0122 3/20/01 3. You have a sample of earned incomes for 9 couples, both of whom are teachers. You wish to test if the women make more than the men. (Look at problem 4 before you do this problem - the data are identical, what you do with it is different.) a. You decide to compare means. Test to see if the women make more than the men assuming that the data comes from a Normal distribution. (5) b. You are reminded that the income data is usually highly skewed, so you ought to compare medians instead of means. Repeat the test. (5) For your convenience, not only the raw data are provided, but the data is ranked from 1 to 20 in the columns r1 and r2 . If you need the ranks of the differences, r , you will have to do it yourself. Minitab gives us the following results: x1 61.64, s1 12.23 (These are the sample mean and sample standard deviation of x1 ), x 2 55.40, s 2 8.40, d 6.24, s d 17.19. You do not need all this information in every part of the problem. Data is in thousands. Row 1 2 3 4 5 6 7 8 9 women x1 47.5945 58.5687 43.4502 62.3263 60.3484 65.3845 80.1389 78.6558 58.2903 rank r1 4 10 1 13 12 15 18 17 9 men x2 64.0374 57.6019 57.3682 50.1957 44.6027 47.4112 48.4382 58.9646 69.9989 rank difference d r2 14 -16.4428 8 0.9668 7 -13.9180 6 12.1306 2 15.7457 3 17.9734 5 31.7007 11 19.6912 16 -11.7085 rank r Solution: This is paired data. a) Assume .05 . All tests of the mean or median in Problems three and four are one sided. The following table may help you choose a method. Save it for the final exam! Comparing 2 Samples Paired Samples Independent Samples Location - Normal distribution. Method D4 Methods D1- D3 Compare means. Location - Distribution not Normal. Compare medians. Method D5b Proportions Method D5a Method D6 Variability - Normal distribution. Method D7 Compare variances. From the outline, there are three ways of approaching a problem involving two means. We know that s H : 2 16 .57 5.73 . We are testing 0 1 or d x1 x 2 6.24 , 1 2 , s d 17.19, s d d n 9 H 1 : 1 2 H 0 : 1 2 0 H 0 : 0 8 1.860 . or , df n 1 8 , tn 1 t .05 H 1 : 1 2 0 H 1 : 0 (i) . Confidence Interval: d t 2 s d or 1 2 x1 x 2 t 2 s d . This interval becomes d t s d 6.24 - 1.860 5.73 6.24 - 10.66 -4.42 . Since this interval includes zero, we cannot reject H 0 . 9 252y0122 3/20/01 (ii). Test Ratio: t x x 2 10 20 d 0 d 0 6.24 0 or t 1 1.089 . Make . t sd sd sd 5.73 a diagram showing an almost Normal curve with a mean at zero and a 'reject' region above 8 tn 1 t .05 1.860 . Since 0.684 is not in this region, we cannot reject H 0 . (iii). Critical Value: d CV 0 t 2 s d or x1 x 2 CV 10 20 t 2 s d . Because this is a onesided test, we want one critical value above zero. The critical value formula becomes d CV 0 t s d 0 1.860 5.73 10 .658 Make a diagram showing an almost Normal curve with a mean at zero and a 'reject' region above 10.658. Since 6.24 is not in this region, we cannot reject H 0 . Note that only one of the methods used above was expected. b) If the underlying distributions are not Normal and the two samples are paired, we should use a Wilcoxon Signed Rank test. difference rank H : 2 Our hypotheses are 0 1 . The signed d r H 1 : 1 2 -16.4428 -6 ranks of the differences are at right. If we add 0.9668 1 -13.9180 -4 ranks with like signs, we get T 12 and 12.1306 3 T 33 (Check: Their total is the sum of the 15.7457 5 910 17.9734 7 45 . ) numbers 1 through 9, which is 2 31.7007 9 According to the Wilcoxon table for a 1-sided 19.6912 8 5% test, reject the null hypothesis if the smaller -11.7085 -2 of these totals is less than 8. Since neither of the totals is below 8, do not reject H 0 . 10 252y0122 3/20/01 4. You have two independent random samples of 9 incomes from each of two towns. You wish to test if the people in town 1 make more than people in town 2. (The numbers just happen to be the same as in the last problem) a. You decide to compare means. Test to see if the people in town 1 make more than the people in town 2 assuming that the data comes from a Normal distribution. (5) b. You are reminded that the income data is usually highly skewed, so you ought to compare medians instead of means. Repeat the test. (5) For your convenience, not only the raw data are provided, but the data is ranked from 1 to 20 in the columns r1 and r2 . If you need the ranks of the differences, r , you will have to do it yourself. Minitab gives us the following results: x1 61.64, s1 12.23, x 2 55.40, s 2 8.40, d 6.24, s d 17.19. You do not need all this information in every part of the problem. Data is in thousands. c. In part a of this question, what assumption did you make about the variances of x1 and x 2 ? Test it here. (3). d. Using the means and variances given above, but assuming that n1 n 2 150 do a 2-sided 98.8% confidence interval for 1 2 . (4) Row 1 2 3 4 5 6 7 8 9 town 1 x1 47.5945 58.5687 43.4502 62.3263 60.3484 65.3845 80.1389 78.6558 58.2903 rank r1 4 10 1 13 12 15 18 17 9 town 2 x2 64.0374 57.6019 57.3682 50.1957 44.6027 47.4112 48.4382 58.9646 69.9989 rank difference d r2 14 -16.4428 8 0.9668 7 -13.9180 6 12.1306 2 15.7457 3 17.9734 5 31.7007 11 19.6912 16 -11.7085 rank r Solution: a) Assume .05 . All tests of the mean or median in Problems three and four are one sided. From the outline, there are three ways of approaching a problem involving two means. We know that H 0 : 1 2 H 0 : 1 2 0 H 0 : 0 or or . It is most d x1 x 2 6.24 . We are testing H 1 : 1 2 H 1 : 1 2 0 H 1 : 0 convenient to assume that 1 2 , though we really ought to test it in part c). It is not wrong to assume that variances differ, but the solution will only be provided to people who did so. If we assume that 16 1.746 , variances are equal we find n1 n2 9 , df n1 n 2 2 16, t .05 n 1s12 n2 1s 22 812.232 88.40 2 149 .5729 70.5600 s p2 1 110 .06645 and n1 n 2 2 16 2 1 1 1 1 110 .06645 24 .4592 4.9456 . s d s p2 n n 9 9 2 1 Only one of the methods below is expected. (i) . Confidence Interval: d t 2 s d or 1 2 x1 x 2 t 2 s d . This interval becomes d t s d 6.24 - 1.746 4.9456 6.24 - 8.635 -2.3950 . Since this interval includes zero, we cannot reject H 0 . 11 252y0122 3/20/01 (ii). Test Ratio: t x x 2 10 20 d 0 or t 1 . sd sd d 0 6.24 0 1.262 . Make a diagram showing an almost Normal curve with a sd 4.9456 mean at zero and a 'reject' region above t 16 1.746 . Since 0.7436 is not in this region, t .05 we cannot reject H 0 . (iii). Critical Value: d CV 0 t 2 s d or x1 x 2 CV 10 20 t 2 s d . Because this is a one-sided test, we want one critical value above zero. The critical value formula becomes d CV 0 t sd 0 1.7464.9456 8.6350 Make a diagram showing an almost Normal curve with a mean at zero and a 'reject' region above 8.874. Since 6.24 is not in this region we cannot reject H 0 . b) If the underlying distributions are not Normal and the two samples are independent, we should use a H 0 : 1 2 Mann-Whitney-Wilcoxon Rank test. Our hypotheses are . The rank total for Town 1 (gotten H 1 : 1 2 from adding the r1 column) is T1 99 and, for Town 2, T2 72 . (Check: Their total is the sum of the 18 19 171 . ) According to Table 6 (for a 1-sided 5% test), we do not 2 reject the null hypothesis if the smaller of these totals ( W 72 ) is between 54 and 90. Since both of the totals are in that interval, do not reject H 0 . numbers 1 through 18, which is 2 H 0 : 1 2 s 2 12 .23 c) . To test this at the 5% significance level, test 12 2.120 and s 2 8.40 H 1 : 1 2 s 22 s12 1 8,8 4.43 . Since neither ratio is larger than 4.43, do not reject H . 0.4717 against F.025 0 2.120 d) If the confidence level is 98.8%, the significance level is 1 .988 .012 . Since our samples have a total number of degrees of freedom of df n1 n 2 2 160 160 2 318 , we can use z instead of t . s2 s2 12 .23 2 8.40 2 sd 1 2 160 n1 n 2 160 149 .5729 70 .5600 1.21143 . z z.006 , and we found 2 160 that it was 2.51 on page 1. Our confidence interval is d t 2 s d 6.24 2.511.21143 6.24 3.04, or 3.20 to 9.28. 12