Hypothesis Testing
Hypothesis Testing
Hypothesis testing is a formal procedure for using sample data to decide whether there is sufficient evidence to reject a claim about a population parameter. At A-Level you must understand the framework and apply it to binomial and normal tests.
The Framework
Every hypothesis test follows the same logical structure:
1. State the hypotheses — H₀ (null hypothesis: the default claim) and H₁ (alternative hypothesis: what you suspect)
2. Choose the significance level — typically 5% (α = 0.05) or 1% (α = 0.01)
3. Collect data and calculate the test statistic
4. Find the critical region or p-value
5. Compare and conclude — reject or do not reject H₀
H₀ always contains an equality (e.g., p = 0.3, μ = 50). H₁ determines whether the test is:
- One-tailed: H₁: p > 0.3 or H₁: p < 0.3 (testing for change in one specific direction)
- Two-tailed: H₁: p ≠ 0.3 (testing for any change; split the significance level between both tails)
Binomial Hypothesis Test
Used to test a claim about a population proportion p when the data follows a binomial distribution.
Worked Example: A coin is suspected of being biased toward heads. In 20 tosses, 15 heads are observed. Test at the 5% significance level.
Step 1: H₀: p = 0.5 (coin is fair), H₁: p > 0.5 (biased toward heads). One-tailed test.
Step 2: Significance level α = 0.05.
Step 3: X = number of heads. Under H₀, X ~ B(20, 0.5). Observed value x = 15.
Step 4: P(X ≥ 15 | H₀) = P(X ≥ 15) when X ~ B(20, 0.5)
= 1 - P(X ≤ 14) = 1 - 0.9793 = 0.0207
Step 5: Since 0.0207 < 0.05, we reject H₀.
Conclusion: There is sufficient evidence at the 5% significance level to conclude that the coin is biased toward heads.
Critical Regions and Critical Values
The critical region is the set of values of the test statistic that lead to rejection of H₀. The critical value is the boundary of this region.
Worked Example: For X ~ B(30, p), H₀: p = 0.2, H₁: p > 0.2, at the 5% level:
Find the smallest c such that P(X ≥ c | p = 0.2) ≤ 0.05.
P(X ≥ 10) = 1 - P(X ≤ 9) = 1 - 0.9662 = 0.0338 < 0.05
P(X ≥ 9) = 1 - P(X ≤ 8) = 1 - 0.9256 = 0.0744 > 0.05
The critical region is X ≥ 10 and the critical value is 10.
The actual significance level is P(X ≥ 10) = 0.0338 (not exactly 5% because the binomial is discrete).
Normal Hypothesis Test (Test for a Mean)
When testing a claim about a population mean μ, with known variance σ² and a sample of size n:
Under H₀, the sample mean X̄ follows X̄ ~ N(μ₀, σ²/n).
The test statistic is:
Z = (X̄ - μ₀) / (σ/√n)
Worked Example: A machine fills bottles to a mean of 500ml with standard deviation 8ml. A sample of 25 bottles has a mean of 497ml. Test at the 5% level whether the mean has decreased.
H₀: μ = 500, H₁: μ < 500. One-tailed test.
Z = (497 - 500) / (8/√25) = -3/1.6 = -1.875
Critical value at 5% one-tailed: z = -1.6449.
Since -1.875 < -1.6449 (deeper into the tail), we reject H₀.
Conclusion: There is sufficient evidence at the 5% significance level that the mean fill volume has decreased.
Two-Tailed Tests
For a two-tailed test at the 5% level, the critical region is split: 2.5% in each tail. The critical values are z = ±1.96 (for a normal test).
Example: H₀: μ = 100, H₁: μ ≠ 100, 5% significance. Reject H₀ if Z > 1.96 or Z < -1.96.
Key Terminology
| Term | Meaning |
|---|---|
| p-value | The probability of obtaining a result at least as extreme as observed, assuming H₀ is true |
| Significance level (α) | The threshold below which we reject H₀ |
| Type I error | Rejecting H₀ when it is actually true (probability = α) |
| Type II error | Not rejecting H₀ when it is actually false |
| Power | Probability of correctly rejecting H₀ when it is false (= 1 - P(Type II error)) |
Exam Tips
- Always write hypotheses using the population parameter (p or μ), never the sample statistic.
- State your conclusion in context — do not just say "reject H₀". Say what this means about the coins, machine, etc.
- Use the phrase "there is (in)sufficient evidence to..." — hypothesis testing never proves a hypothesis, it only provides evidence.
- For binomial tests, the actual significance level may differ from the stated level — note this when asked.
- In two-tailed tests, remember to halve α when comparing with the p-value or looking up critical values.
- A common error: "accept H₀". The correct phrasing is "do not reject H₀" or "there is insufficient evidence to reject H₀".