Section 7.1 Hypothesis Testing: Hypothesis: Null Hypothesis (H 0 ): Alternative Hypothesis (H 1 ): a statistical analysis used to decide which of two competing hypotheses should be believed (analogous to a court trial) a statement often involving the value of a parameter in a distribution that we want to decide whether or not to believe; the hypothesis is called simple if it specifies only one possible value and is called composite if it specifies multiple possible values a statement assumed to be true at the outset of a hypothesis test (comparable to “innocence” in a court trial) a statement for which sufficient evidence is required before it will be believed (comparable to “guilt” in a court trial)
Critical (Rejection) Region: Type I Error: Type II Error: p-value (probability value): a set describing the observed results of data collection that will lead to rejecting H 0 rejecting H 0 and accepting H 1 when H 0 is true (in a court trial, saying that the defendant is guilty when the defendant is really innocent) failing to reject H 0 when H 1 is true (in a court trial, saying that the defendant is innocent when the defendant is really guilty) denotes the probability of making a Type I error and is called the significance level of the test denotes the probability of making a Type II error the probability of observing data as supportive or more supportive of H 1 than the actual data, calculated by assuming H 0 is true
Tables and summarize hypothesis tests about one or two proportions (for sufficiently large sample size(s)). 1. Do Text Exercise three different ways: First Way (a) Let C 0 = {x | x 0} be the critical region. (b) = P{x : x 0; p = 3/5} = P{X = 0; p = 3/5} = (2/5) 4 = 16/625 = = P{x : x > 0; p = 2/5} = P{X > 0; p = 2/5} = 1 – (3/5) 4 = 1 – 81/625 =1 – P{X = 0; p = 2/5} = 544/625 =
Second Way (a) Let C 1 = {x | x 1} be the critical region. (b) = P{x : x 1; p = 3/5} = P{X = 0; p = 3/5} + P{X = 1; p = 3/5} = (2/5) 4 + (4)(3/5)(2/5) 3 = 16/ /625 = = P{x : x > 1; p = 2/5} = P{X > 1; p = 2/5} = 1 – [(3/5) 4 + (4)(2/5)(3/5) 3 ] = 1 – 297/625 = 1 – [P{X = 0; p = 2/5} + P{X = 1; p = 2/5}] = 328/625 =
1.-continued Third Way (a) Let C 2 = {x | x 2} be the critical region. (b) = P{x : x 2; p = 3/5} = P{X = 0; p = 3/5} + P{X = 1; p = 3/5} + P{X = 2; p = 3/5} = (2/5) 4 + (4)(3/5)(2/5) 3 + (6)(3/5) 2 (2/5) 2 = 16/ / /625 = = P{x : x > 2; p = 2/5} = P{X > 2; p = 2/5} = (4)(2/5) 3 (3/5) + (2/5) 4 = 96/ /625 = P{X = 3; p = 2/5} + P{X = 4; p = 2/5} = 328/625 =
2. (a) A bowl contains 2 red balls and 3 other balls each of which is either red or white. Let p denote the probability of drawing at random a red ball from the bowl. Consider testing H 0 : p = 2/5 vs. H 1 : p > 2/5. Drawing ten balls from the bowl one at a time at random and with replacement, we let X equal the number of red balls drawn, and we define the critical region to be C = {x | x 6}. Calculate . = P{x : x 6; p = 2/5} =P{X 6; p = 2/5} = 1 – P{X 5; p = 2/5} = 1 – = (from Table II in Appendix B)
2.-continued (b) Calculate if p = 3/5. If p = 3/5, = P{x : x 5; p = 3/5} =P{X 5; p = 3/5} = P{10 – X 5; 1 – p = 2/5} =1 – P{10 – X 4; 1– p = 2/5} = 1 – = (from Table II in Appendix B)
(c) (d) Calculate if p = 4/5. Calculate if p = 1. If p = 4/5, = P{x : x 5; p = 4/5} =P{X 5; p = 4/5} = P{10 – X 5; 1 – p = 1/5} =1 – P{10 – X 4; 1– p = 1/5} = 1 – = (from Table II in Appendix B) If p = 1, = P{x : x 5; p = 1} = 0
3. Do Text Exercise and calculate if p = (a) (b) Let Y = the number of ones (1s) observed in 8000 rolls The test statistic is z = The one-sided critical region with = 0.05 is y / 8000 – 1/6 ———————— (1/6)(5/6) / 8000 z z 0.95 = – z 0.05 = – With y = 1265, we have z = 1265 / 8000 – 1/6 ———————— = (1/6)(5/6) / 8000 – 2.05 Since z = – 2.05 < – z 0.05 = – 1.645, we reject H 0. We conclude that the probability of rolling a one (1) is less than 1/6.
Since H 0 is rejected. we expect the hypothesized proportion 1/6 not to be in the confidence interval: 1265 / 8000 (1265 / 8000)(6735 / 8000) / , (c) If p = 0.15, =P{z : z – 1.645; p = 0.15} = y / 8000 – 1/6 P ———————— – ; p = 0.15 = (1/6)(5/6) / 8000 y / 8000 – (0.15 – 1/6) P ———————————— – ; p = 0.15 = (1/6)(5/6) / 8000 Find a two-sided 95% confidence interval, instead of the one-sided interval.
y / 8000 – 0.151/6 – 0.15 P ———————— ———————— – ; p = 0.15 = (1/6)(5/6) / 8000 (1/6)(5/6) / 8000 y / 8000 – (0.15 – 1/6) P ———————————— – ; p = 0.15 = (1/6)(5/6) / 8000 y / 8000 – 0.151/6 – 0.15 P ———————— ———————— – ; p = 0.15 = (0.15)(0.85) / 8000 (0.15)(0.85) / 8000 P(Z 2.46) = 1 – (2.46) = 1 – =0.0069
4. Do Text Exercise (a) (b) (c) Let Y = number of yellow candies observed in n random candies The test statistic is z = The two-sided critical region with = 0.05 is p – 0.2 —————— (0.2)(0.8) / n |z| H 0 is rejected when p = 5/54, but H 0 is not rejected for each of the other 19 samples. If H 0 is true, then when this hypothesis test is performed repeatedly, H 0 will be rejected 5% of the time in the long run.
(d) (e) If 95% confidence intervals for p are repeatedly obtained, then 95% of the intervals in the long run will contain p. If the 20 samples are pooled, then, p = 219 —— 1124 We have z = 219 / 1124 – 0.2 ———————— = (0.2)(0.8) / 1124 – 0.43 Since z = – 0.43, and |z| < z = 1.960, we fail to reject H 0. We conclude that the proportion of yellow candies produced is not different from 0.2.
5. Do Text Exercise (a) (b) The test statistic is z = The one-sided critical region with = 0.05 is p 1 – p 2 ————————— p(1 – p)(1/n 1 + 1/n 2 ) z p1 =p1 =p2 =p2 = p =p = 135 / 900 = / 700 = / 1600 = z = Since z = 2.341, and z z 0.05 = 1.645, we reject H 0. We conclude that the proportion of babies with low birth weight is higher for developing countries in Africa than for developing countries in the Americas.
(c) (d) The one-sided critical region with = 0.01 is z Since z = z 0.01 = 2.326, we would still reject H 0. The p-value of the test is p 1 – p 2 ————————— p(1 – p)(1/n 1 + 1/n 2 ) P ; p 1 = p 2 = P(Z 2.341) = 1 – (2.341) = 1 – =0.0096