Download Hypothesis Testing: Null & Alternative Hypotheses, Errors and more Exams Statistics in PDF only on Docsity! Stat 224, Handout 11 TA: Shubing Wang, Dec 7, 2005 Summary of Hypothesis Test 1. Definition. Null hypothesis, H0 : some statement; Alternative hypothesis Ha : another statement. 2. Test Statistic. A function of the sample data which is used to make decision about a hypothesis test. 3. Rejection region. The set of test statistic values for which to reject H0. 4. Type I error. Probability to reject H0 when H0 is true. 5. Type II error. Probability not to reject H0 when Ha is true. Examples 1. 8.9 The hypothesis is H0 : p = 0.5 Ha : p 6= 0.5 What kind rejection region is appropriate for this hypothesis test? Two-sided test → two sides rejection region. How to calculated type I and type II error if we have rejection region R = x : x ≤ 7orx ≥ 18. α = P (X ∈ R|H0 is true) = P (X ∈ R|p = 0.5) β = P (X ∈ Rc|Ha is true) = P (X ∈ R|p 6= 0.5) So notice that type II error is not unique for this case. In order to calculate α and β, we need to know the distribution of the test statistic X. For this case X ∼ Bin(25, p). So when H0 is true, X ∼ Bin(25, 0.5). Then type I error α = P (X ∈ R|H0 is true) = P (X ≤ 7 or X ≥ 18|X ∼ Bin(25, 0.5)). For p = 0.3, so Ha is true, type II error is β = P (X ∈ Rc|Ha is true) = P (7 < X < 18|X ∼ Bin(25, 0.3)) Given X = 6, what would you conclude from the hypothesis test? Note 6inR, so we reject H0. 2. 8.18 This is an example of test of the Population mean. The hypothesis is H0 : µ = 75 Ha : µ < 75 1 So the test statistic is Z = X̄ − µ σ/ √ n Given significance level α = 0.01, what are we going to conclude if x̄ = 72.3? α = P (X̄ ∈ R|H0 is true) = P (X̄ < B|X̄ ∼ N(75, 81/n)) = P ( X̄ − 75 9/ √ 25 < B − 75 9/ √ 25 ) = P (Z < B − 75 9/ √ 25 ) = 0.01 And we know P (Z < −2.33) = 0.01, so B − 75 9/ √ 25 = −2.33 we have B = 70.806. So 72.3 6∈ (−∞, 70.806], we we don’t reject H0. What is α for the test procedure that reject H0 when Z ≤ −2.88. α = P (Z < −2.88) = 0.002 Let the rejection region is (−∞, B]. Then β(70) = P (X̄ > B|µ = 70) = P ( X̄ − 70 σ/ √ 25 > B − 70 σ/ √ 25 ) = P (Z > B − 75 σ/ √ 25 + 75 − 70 σ/ √ 25 ) = P (Z > −2.88 + 5/1.8) = 0.5398. What n makes β(70) = 0.01. So β(70) = P (Z > z0) = 0.01 We have z0 = 2.33. There for z0 = B − 70 9/ √ n = B − 75 σ/ √ 25 + 75 − 70 σ/ √ 25 = −2.88 + 5 9/ √ n = 2.33 2