Hypothesis testing
A hypothesis test uses data to decide whether there is enough evidence against a claim. You assume the null hypothesis H₀ is true. Then you work out how likely your result (or something more extreme) would be. You reject H₀ only if that probability is below the significance level.
Key facts
- H₀ says the parameter equals the claimed value (for example p = 0.3). H₁ says what you suspect: p > 0.3, p < 0.3 or p ≠ 0.3.
- One-tailed test: H₁ has a direction. Two-tailed test: H₁ uses ≠, and each tail gets half the significance level.
- p-value: the probability of a result at least as extreme as the one observed, if H₀ is true.
- If the p-value is less than the significance level, reject H₀. Otherwise, do not reject H₀.
- Critical region: the values of the test statistic that lead to rejecting H₀.
- Actual significance level: the probability of landing in the critical region when H₀ is true.
- Always finish with a conclusion in context, such as “there is evidence that…”.
Worked examples
Example 1
A seed company claims 80% of its seeds germinate. Kai plants 20 and only 12 germinate. Test at the 5% level whether fewer germinate than claimed.
- Write the hypotheses. Under H₀, X ~ B(20, 0.8). H₀: p = 0.8, H₁: p < 0.8
- Find the probability of 12 or fewer. P(X ≤ 12) = 0.0321
- The result is significant, so reject H₀. There is evidence that fewer than 80% of the seeds germinate. 0.0321 < 0.05
Answer: Reject H₀: evidence that fewer than 80% germinate
Example 2
X ~ B(20, 0.25). Find the critical region for testing H₀: p = 0.25 against H₁: p > 0.25 at the 5% level, and its actual significance level.
- Try 8. This is more than 0.05, so it is too big. P(X ≥ 8) = 0.1018
- Try 9. This is less than 0.05. P(X ≥ 9) = 0.0409
- The critical region is X ≥ 9. The actual significance level is 0.0409.
Answer: X ≥ 9; 0.0409
Example 3
Jars are filled with mean 500 g and standard deviation 8 g. A sample of 16 jars has mean 503.5 g. Test at the 5% level whether the mean has changed.
- Write the hypotheses. The test is two-tailed. H₀: μ = 500, H₁: μ ≠ 500
- Standardise the sample mean. z = (503.5 − 500) ÷ (8 ÷ √16) = 3.5 ÷ 2 = 1.75
- Compare with the critical value 1.96. Do not reject H₀. 1.75 < 1.96
Answer: Do not reject H₀: no evidence the mean has changed
Example 4
A test uses a 5% significance level. What does that mean?
- Assume H₀ is true and find the probability of a result at least this extreme.
- If that probability is less than 5%, reject H₀.
Answer: Reject H₀ if the result has a probability below 5% when H₀ is true