Stat 1060 Practice for Chapters 23-25 Ammar M. Sarhan Department of Mathematics and Statistics, Faculty of Science, Dalhousie University, Fall 2010 E-mail: asarhan@mathstat.dal.ca Contents 1 Inference for a Mean 2 1.1 Practice 1................................. 2 1.2 Practice 2................................. 3 2 Comparing two means: Two independent Sample 4 2.1 Practice 3................................. 4 2.2 Practice 4................................. 6 2.3 Practice 5................................. 7 3 Comparing two means: Paired Samples 7 3.1 Practice 6................................. 7 3.2 Practice 7................................. 8 1
1 Inference for a Mean 1.1 Practice 1 In 1960, census results indicated that the age at which American men first married had a mean of 23.3 years. It is widely suspected that young people today are waiting longer to get married. To find out if the men age of first marriage has increased during the past 50 years, a random sample of 40 men who married for the first time last year is randomly selected and the sample average marriage is 24.2 years with a standard deviation of 5.3 years. Test whether the men age of first marriage has increased at 0.05 level. 1. We need to test H 0 vs H A, where H 0 : µ = 23.3 (the average age of first marriage is 23.3 years) H A : µ > 23.3 (the average age has increased the mean of 23.3 years) 2. Test statistic: From the sample information: n = 40, x = 24.2 and s = 5.3. Then the standard error is SE = s n = 5.3 40 = 0.8380036 the test statistic value is t = X µ 0 24.2 23.3 = SE( X) = 1.073981 0.8380036 3. P-value: the degrees of freedom df = n 1 = 40 1 = 39. But in the t-table, you will not have df = 39, then you can use df = 40. P-Value = P (T 40 > t) = P (T 40 > 1.073981) > P (T 40 > 1.303) = 0.10. That is, P-value> 0.10. 4. Conclusion: Because α = 0.05 is not higher than P- value, then we cannot reject H 0 at 0.05-level. Equivalently, we could conclude that there is no evidence that the average age at first marriage has increased from the mean of 23.3 years. 2
1.2 Practice 2 Students investigating the packaging of potato chips purchased 6 bags of Lay s Ruffles marked with a net weight of 28.3 grams. They carefully weighted the contents of each bag, recording the following weights (in grams): 29.3, 28.2, 29.1, 28.7, 28.9, 28.5. a) Create a 90% confidence interval for the mean weight of such bags of chips. b) Comment on the company s stated net weight of 28.3 grams. Use α = 0.1. Round your calculations to hundredthes. a) The 90% CI for µ: The formula for a (1 α)100% CI for µ is X ± t SE( X) where t is critical value computed from the t-table at confidence level 90% and df =n 1. 1) From the sample: sample size: n = 6 sample mean x = 29.3+28.2+29.1+28.7+28.9+28.5 6 = 28.78 sample variance: s 2 = (29.3 28.78)2 +(28.2 28.78) 2 + +(28.5 28.78) 2 6 1 = 0.16 sample standard deviation: s = 0.16 = 0.4 2) The standard error is SE = s n = 0.4 6 = 0.16 3) t : df = n 1 = 6 1 = 5 and confidence level is 90% then from the t-table, t = 2.015 3
4) 90% CI: (28.78 2.015 0.16, 28.78 + 2.015 0.16) = (28.46, 29.10) b) Comment on the company s stated net weight of 28.3 grams: 1) We need to test the following hypotheses at α = 0.1 H 0 : µ = 28.3 H A : µ 28.3 Since H A is two tailed-test, then we can use the 90% CI for µ obtained in part (a). 2) Conclusion: Since the null value µ 0 = 28.3 does not belong to the 90% CI for µ, then we could conclude that H 0 is rejected at 0.1-level. This means that the company is earning on the safe side, as it appears that, on average, it is putting in slightly more chips than stated. 2 Comparing two means: Two independent Sample 2.1 Practice 3 The weight gains (in ounces) of infants over a six-week period were recorded for each of two diets. The following table summarizes the data. Is there reason to believe that the second diet leads to greater weight gains than the first? Use α = 0.05. Diet Sample size Sample mean Sample variance 1 15 21 94 2 9 29 108 1. We need to test H 0 vs H A, where H 0 : µ 1 µ 2 = 0 H A : µ 1 µ 2 < 0 (the second diet leads to greater weight gains) 4
2. Test statistic: From the sample information: n 1 = 15, x 1 = 21, s 2 1 = 94 n 2 = 9, x 2 = 29, s 2 2 = 108 Estimate of µ 1 µ 2 = x 1 x 2 = 21 29 = 8 The pooled sample standard deviation is s p = (15 1) 94 + (9 1) 108 15 + 9 2 = 9.95 The standard error is 1 SE = 9.95 15 + 1 9 = 4.20 The value of test statistic is t = x 1 x 2 SE = 8 4.20 = 1.91 3. P-value: The degrees of freedom df = n 1 + n 2 2 = 22. P-Value = P (T 22 < t) = P (T 22 < 1.91) = P (T 22 > 1.91) < P (T 22 > 1.717) = 0.05. That is, P-value< 0.05. 4. Conclusion: Because α = 0.05 is bigger than P- value, then H 0 is rejected at 0.05-level. Equivalently, we do not reject the believe that the second diet leads to greater weight gains than the first at 0.05 level. 5
2.2 Practice 4 In Practice 3: a) Find a 90% confidence interval of the difference between the average weight gains from the two diets. b) Is there reason to believe that both two diets lead to the same average weight gains? Use α = 0.10. a) A 90% confidence interval of the difference between the average weight gains from the two diets. A confidence interval with level (1 α) for µ 1 µ 2 is X 1 X 2 ± t SE From the calculations in Practice 3, we have x 1 x 2 = 8, SE = 4.20; df = 22, confidence level = 90%, then t = 1.717 (from the t-table) Then 90% CI of µ 1 µ 2 is 8 ± 1.717 4.20 = ( 15.21, 0.79) b) Is there reason to believe that both two diets lead to the same average weight gains? Use α = 0.10. In this case we need to test H 0 = µ 1 µ 2 = 0 vs H 0 = µ 1 µ 2 0 at level α = 0.10. Since test is two tailed test, then we can use the (1 α)100% = 90% CI for µ 1 µ 2. From part (b), the 90% CI for µ 1 µ 2 ( 15.21, 0.79) does not contain the null difference (which is 0), then we have to reject H 0 at 0.10 level. 6
2.3 Practice 5 Resolve Practices 3 and 4 using the Unpooled test. Do it yourself. 3 Comparing two means: Paired Samples 3.1 Practice 6 In order to determine wether or not a particular heat treatment is effective in reducing the number of bacteria in skim milk, counts were made before and after treatment on 12 samples of skim milk, with the following results. The data are in the form of log DMC, the logarithms of direct microscopic counts. Use α = 0.03 level. 1. We need to test Before After Differences Sample Treatment Treatment X i = Before - After 1 6.98 6.95 0.03 2 7.08 6.94 0.14 3 8.34 7.17 1.17 4 5.30 5.15 0.15 5 6.26 6.28-0.02 6 6.77 6.81-0.04 7 7.03 6.59 0.44 8 5.56 5.34 0.22 9 5.97 5.98-0.01 10 6.64 6.51 0.13 11 7.03 6.84 0.19 12 7.69 6.99 0.70 H 0 : µ 1 µ 2 = 0 (No effect) vs H 0 : µ 1 µ 2 > 0 (heat treatment reducing the number of bacteria) 2. The test statistic: T = X 0 SE( (X) 7
Here X is the mean of the differences between the number of bacteria in skim milk (Before - After the treatment). 3. From these data: x i = 3.10 then the mean of the differences is x = 3.10/12 = 0.2583 (x i x) 2 = 1.398167, then s 2 = 1.398167/11 = 0.1271061 The standard error is SE = s n = 0.3565194 12 = 0.1029183 the test statistic value is t = x SE = 0.2583 0.1029183 = 2.509758 4. P-value: df = n-1 = 12-1 = 11 P-value = P (T 11 > 2.509758). Since the value 2.509758 2.51 lies between 2.201 and 2.718, then P (T 11 > 2.718) < P (T 11 > 2.51) < P (T 11 > 2.201) 0.01 < P (T 11 > 2.51) < 0.025 0.01 < P value < 0.025 5. Conclusion: Since α = 0.03 is bigger than P-value, then H 0 is rejected at 0.03 level. 3.2 Practice 7 In Practice 6: a) Find a 95% confidence interval of the difference between the average numbers of bacteria before and after the treatment. b) Is there reason to believe that there is no difference in the average number of bacteria before and after the treatment? Use α = 0.05. Do it yourself. 8