Statistics Sample Exam 4 Chapters 8 & 9: Hypothesis Testing & Inferences from Two Samples 1. A test of hypothesis is always about a population parameter. 2. The observed value of a test statistic is the value calculated for a sample statistic. ex) z scores, t distribution, chi-square(X2) 3. As the sample size gets larger, both type I and type II errors decrease. 4. Define type I error. Rejecting a hypothesis when it is true (false positive) 5. Define type II error. Failing to reject a hypothesis when it is false (false negative) 6. The value of α is called the probability of type I error 7. The value of β is called the probability of type II error 8. The value of 1-β is called the correct decision ( probability of rejecting a false hypothesis) 9. In 1990, 5.8% of job applicants who were tested for drugs failed the test. At the 0.01 significance level, test the claim that the failure rate is now lower if a simple random sample of 1520 current job applicants results in 58 failures. Does the result suggest that fewer job applicants now use drugs? given: p = 0.058, α = 0.01, n = 1520, x = 58 a. State the null and alternate hypothesis. H0: p = 0.058 H1: p < 0.058 (claim, LTT) b. Find the value of sample proportion. p^ = x/n = 58/1520 = 0.03816 c. Calculate the value of test statistic. z = p^ - p / √(pq/n) z = 0.03816 – 0.058 / √(.058 x 0.942 / 1520) z = -3.3096 d. Find the critical value. z = -2.325 e. Make a decision. Reject H0 because the value of test statistic is inside the rejection region Claim is true There is sufficient evidence to support the claim that the failure rate among job applicants for drugs is now lower. Result suggests that fewer job applicants now use drugs. f. Find the p-value and make a decision. Is this decision in agreement with the previous one? P-value: 0.0009 0.0009 < 0.01 – reject null hypothesis this decision is in agreement with the previous one. g. What is the probability of making type I error? 0.01 10. A sample of 54 bears has a mean weight of 182.9 lb. Let’s assume that the standard deviation of weights of all such bears is known to be 121.8 lb, at α = 0.1. Is there enough evidence to support the claim that the population mean of all such bear weights is less than 200 lb? given: n = 54, x = 182.9 lb, σ = 121.8 lb, α = 0.1 μ = 200 lb a. State the null and alternate hypothesis. H0: μ = 200 H1: u < 200 (claim, LTT) b. Find the critical value(s). z = -1.285 c. Calculate the value of test statistic. z = x – μ / σ/√n z = 182.9 – 200 / 121.8/√54 z = -1.0317 d. Make a decision. Fail to reject the null hypothesis because the value of test statistic is inside the non-rejection region. Claim is false. There is not a sufficient evidence to support the claim that the population mean of all bear weights is less than 200 lb. 11. Sixteen new textbooks in the college bookstore, had prices with a mean of $70.41 and a standard deviation of $19.70. Use a 0.05 significance level to test the claim that the mean price of a textbook at this college is less than $75? given: n = 16, x = $70.41, s = $19.70, α = 0.05, μ = $75 H0: μ = 75 H1: μ < 75 (claim, LTT) df: n – 1 = 15 (cv): t = ± 1.753 (ts) t = x – μ / s/√n t = 70.41 – 75 / 19.70/√16 t = -0.9320 Fail to reject the null hypothesis because the value of test statistic is inside the non-rejection region. Claim is false. There is not a sufficient evidence to support the claim that the mean price of a textbook at this college is less than $75. 12. Tests in the author’s past statistics classes have scores with a standard deviation equal to 14.1. One of his current classes now has 27 test scores with a standard deviation of 9.3. Use a 0.01 significance level to test the claim that this current class has less variation than past classes. Does a lower standard deviation suggest that the current class is doing better? Assume the population is normal. given: σ = 14.1, n = 27, s = 9.3, α = 0.01 H0: σ = 14.1 H1: σ < 14.1 {claim, LTT} -cv: df: 26, α = 0.01 X2 = 12.198 -ts X2 = (n-1)s2 /σ2 X2 = 26 x 9.32/14.12 X2 = 11.3110 Reject null hypothesis because the value of test statistic is inside the rejection region. Claim is true. There is sufficient evidence to support the claim that this current class has less variation than past classes. A lower standard deviation does not suggest that the current class is doing better. It just means that the grade is more homogeneous (closer to the mean). Mean value might be different. 13. Among 843 smoking employees of hospitals with the smoking ban, 56 quit smoking in one year after the ban. Among 703 smoking employees from work places without the smoking ban, 27 quit smoking in one year. given: n1 = 843, x1 = 56, n2 = 703, x2 = 27 a. Is there a significant difference between the two proportions? Use a 0.01 significance level p = 56 + 27/843 + 703 = 83/1546 = 0.0537 q = 1 – p = 0.9463 p1^ = x1/n1 = 56/843 = 0.0664 p2^ = x2/n2 = 27/703 = 0.0384 q1^ = 1- p1^ = 0.9336 q2^ = 1- p2^ = 0.9616 H0: p1 = p2 H1: p1 ≠ p2 (2TT) critical values = ± 2.575 test statistic value: z = (p1^ - p2^) – (p1 – p2) /√((p q/n1) + (p q/n2)) z = (0.0664 – 0.0384) – 0 / √((0.0537 x 0.9463/843) + (0.0537x0.9463/703)) z = 2.4319 fail to reject null hypothesis there is not a significant difference between the two proportions b. Construct the 99% confidence interval for the difference between the two proportions. (p1^ - p2^) – E < p1 – p2 < (p1^ - p2^) + E E = z α/2 √((p1^q1^/n1) + (p2^q2^/n2)) E = 2.575 √((0.0664 x 0.9336/843) + (0.0384 x 0.9616/703)) E = 0.0289 (0.0664 – 0.0384) – 0.0289 < p1 – p2 < (0.0664 – 0.0384) + 0.0289 -0.0009 < p1 – p2 < 0.0569 since 0 is included in this 99% confidence interval, there is no significant difference between the two proportions 14. Company “A” claims that its yogurt cups contain, on average fewer calories than that of a competitor. A sample of 50 such yogurt cups of company “A” produced an average of 141 calories per cup with a standard deviation of 5.4 calories. A sample of 40 yogurt cups of a rival company “B” produced an average of 144 calories per cup with a standard deviation of 6.3 calories. given: n1 = 50, x1 = 141 calories, s1 = 5.4 calories, n2 = 40, x2 = 144 calories, s2 = 6.3 calories a. Assuming that the calories of the yogurt cups for company “A” and company “B” have different variances, use a 0.01 significance level to test the claim. H0: μ1 = μ2 H1: μ1 < μ2 (claim, LTT) df = smaller of n1-1, n2-1 = 39 t = -2.426 (critical value) (test statistic): t = (x1 – x2) – (μ1- μ2) / √((s12/n1) + (s22/n2)) t = 141 – 144/ √((5.42/50) + (6.32/40)) t = -2.3901 fail to reject null hypothesis claim is false there is not a sufficient evidence to support the claim that company A’s yogurt cups contain, on average fewer calories than that of a competitor b. Calculate the p-value for the test of previous part and make a decision. Is decision in agreement with the previous one? -2.426 < t = -2.3901 < -2.023 0.01 < p-value < 0.025 since p-value is greater than 0.01 (α) we fail to reject the null hypothesis (therefore, the claim is false) decision is in agreement with the previous one c. Make the 98% confidence intervals for the difference between the two means. (x1 – x2) – E < μ1 – μ2 < (x1 – x2) + E, E = t α/2√(s12/n1 + s22/n2) E = 2.426 √(5.42/50 + 6.32/40) E = 3.0450 (141 – 144) – 3.0450 < μ1 – μ2 < (141-144) + 3.0450 -6.045 < μ1 – μ2 < 0.045 15. Assuming that the calories of the yogurt cups for company “A” and company “B” have equal variances, repeat the previous question. A: n = 50, x =141 calories, s = 5.4 calories B: n = 40, x = 144 calories, x = 6.3 calories a. H0: μ1 = μ2 H1: μ1 < μ2 (LTT, claim) df = n1 + n2 – 2 = 50 + 40 – 2 = 88 ≈ 90 (when using table A-3) α = 0.01 critical value: -2.368 test statistic value: t = (x1 – x2) – (μ1 – μ2) / √((s2p/n1) + (s2p/n2)) s2p = (n1 – 1)s12 + (n2 – 1)s22 / (n1 – 1) + (n2 – 1) s2p = (50 – 1)5.42 + (40 – 1)6.32 / 49 + 39 s2p = 33.8267 t = (141 – 144) – 0 / √((33.8267/50) + (33.8267/40)) t = -2.4316 reject null hypothesis because the value of test statistic is inside the rejection region claim is true there is sufficient evidence to support the claim that companyA’s yogurt cups contain on average less calories than that of its competitors b. -2.708 < t=-2.4316 < -2.426 0.0005 < p-value < 0.01 p-value less than 0,01, the result agrees with part a c. (x1 – x2) – E < μ1 – μ2 < (x1 – x2) + E, E = t α/2√(sp2/n1 + sp2/n2) E = 2.368 √((33.8267/50) + 33.8267/40)) E = 2.9216 (141 – 144) – 2.9216 < μ1 – μ2 < (141 – 144) + 2.9216 -5.9216 < μ1 – μ2 < -0.0784 16. Test a claim that weights of male college students have a larger variance than female college students. Use a significance level of 0.05 and assume the populations are normal. males: n = 31, x = 168, s = 28 females: n = 29, x = 125, s = 25 given: α = 0.05, normal population H0: σ12 = σ22 H1: σ12 > σ22 (claim, RTT) df1: n1 – 1 = 30 (numerator degrees of freedom) df2: n2 – 1 = 28 (denominator degrees of freedom) critical value: F = 1.8687 test statistic value: F = s12/s22 F = 282/252 = 1.2544 we fail to reject the null hypothesis because the value of test statistic falls in the non-rejection region claim is false there is not a sufficient evidence to support the claim that weights of male college students have a larger variance than female college students