# Hypothesis Testing

> CIE A-Level Mathematics · 9709
> Source: https://www.owlsprep.com/study/cie-9709-u4-hypothesis-testing/

This module covers the core framework of hypothesis testing for CIE A-Level 9709, including hypothesis setup, significance testing for proportions and means, error interpretation, and common exam traps.

**Prerequisites:** [Normal distribution probability calculations](https://www.owlsprep.com/study/cie-9709-u3-normal-distribution/); [Binomial probability for discrete counts](https://www.owlsprep.com/study/cie-9709-u2-binomial-probability/)

## Learning objectives

- Understand the structure of hypothesis tests for population proportions and means
- Distinguish between null and alternative hypotheses, one-tailed and two-tailed tests
- Calculate test statistics and p-values to draw valid conclusions
- Calculate and interpret Type I and Type II errors

## How often is this tested?

Based on OwlsPrep's analysis of official CIE 9709 S2 past papers (2016–2025): **Hypothesis Testing** appears **63 times** in the last 10 years — **14.7%** of all S2 questions (63 of 428).

Most-tested forms: 假设检验的概念与术语 (63).

## Core Terminology & Hypothesis Setup

**Null Hypothesis** — The statement of no effect or no difference from the hypothesized population value. We assume $H_0$ is true unless we find sufficient evidence to reject it.

*Notation:* $H_0$

*Example:* For testing if a coin is biased, $H_0: p = 0.5$ where $p$ is the true probability of heads.

**Alternative Hypothesis** — The alternative claim we accept if we reject $H_0$. Can be one-tailed ($p > p_0$ or $p < p_0$) or two-tailed ($p \neq p_0$).

*Notation:* $H_1$

*Example:* For testing if the coin is biased towards heads, $H_1: p > 0.5$.

The first step of any hypothesis test is to define the population parameter you are testing, then write $H_0$ and $H_1$ in terms of that parameter. Hypotheses are always about population parameters, never sample statistics.

> **Easy Exam Mark**
>
> Always explicitly define your parameter. Most students skip this and lose a free mark. For example: `Let p = true proportion of defective components produced by the machine.`

**Check your understanding**

Check your understanding:

1. A bakery claims 10% of their pastries are undercooked. An inspector thinks the proportion is higher. What is the correct $H_1$?

   - $H_1: p > 0.1$
   - $H_1: \hat{p} > 0.1$
   - $H_1: p < 0.1$

   *Answer:* $H_1: p > 0.1$

   *Why:* Correct! Hypotheses describe population parameters ($p$), not sample statistics ($\hat{p}$), and we test for an increase so $p>0.1$.

## Hypothesis Tests for Proportions

For large samples, we approximate the binomial distribution of the number of successes with a normal distribution, then calculate a p-value to compare to our significance level. We follow a standard 5-step process for every test:

- 1. Define the parameter and write hypotheses
- 2. State the significance level
- 3. State the distribution of the test statistic under $H_0$
- 4. Calculate the p-value (or compare test statistic to critical value)
- 5. Draw a conclusion in context

**Worked example:** A machine produces components, 10% of which are normally defective. After a service, a sample of 100 components finds 14 defective. Test at the 5% significance level if the proportion defective has increased.

1. 1. Define parameter and hypotheses: Let $p = $ true proportion of defective components after the service.
2. $$H_0: p = 0.10 \newline H_1: p > 0.10$$
3. 2. State significance level: $\alpha = 0.05$
4. 3. Under $H_0$, the number of defective $X \sim B(100, 0.1)$. Approximate with normal, mean = $np = 10$, variance = $np(1-p)=9$, so $X \sim N(10, 9)$.
5. 4. Calculate p-value for $X \geq 14$, apply continuity correction: $P(X \geq 14) = P(X > 13.5)$
6. $$z = \frac{13.5 - 10}{3} = 1.167, \quad p\text{-value} = 1 - \Phi(1.167) = 0.1216$$
7. 5. Compare: $0.1216 > 0.05$, so we do not reject $H_0$.
8. Conclusion: There is insufficient evidence at the 5% significance level to conclude the proportion defective has increased.

## Hypothesis Tests for Population Means

When the population is normally distributed with known variance, we use a z-test for the population mean $\mu$. The test statistic follows a standard normal distribution when $H_0$ is true.

**Z-test Statistic for Means** — For a sample of size $n$, sample mean $\bar{x}$, hypothesized mean $\mu_0$ and known population standard deviation $\sigma$: $z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}$. This measures how many standard errors the sample mean is from the hypothesized value.

*Notation:* $z$

*Example:* Sample size 25, mean 12, $\sigma=2$, $\mu_0=11$ gives $z=2.5$.

**Worked example:** A bottling machine fills bottles with a known population standard deviation of 5 ml. The mean fill volume is supposed to be 500 ml. A sample of 10 bottles has a mean of 497 ml. Test at the 1% significance level if the mean fill volume is different from 500 ml.

1. 1. Define parameter and hypotheses: Let $\mu = $ true mean fill volume.
2. $$H_0: \mu = 500 \newline H_1: \mu \neq 500$$
3. 2. This is a two-tailed test, total significance level $\alpha = 0.01$.
4. 3. Calculate the z-test statistic:
5. $$z = \frac{497 - 500}{5/\sqrt{10}} \approx -1.898$$
6. 4. Calculate two-tailed p-value:
7. $$p\text{-value} = 2 \times P(Z < -1.898) = 2 \times 0.0287 = 0.0574$$
8. 5. Compare: $0.0574 > 0.01$, so do not reject $H_0$.
9. Conclusion: There is insufficient evidence at 1% significance that the mean fill volume is different from 500 ml.

> **warning**
>
> For two-tailed tests, always remember to double the one-tailed p-value. Forgetting this is the most common mistake in mean hypothesis tests.

## Type I and Type II Errors

**Type I Error** — Rejecting $H_0$ when $H_0$ is actually true. The probability of a Type I error is always equal to the significance level $\alpha$ of the test.

*Example:* Concluding a coin is biased when it is actually fair.

**Type II Error** — Failing to reject $H_0$ when $H_0$ is actually false. The probability of a Type II error depends on the true value of the population parameter.

*Example:* Concluding a coin is fair when it is actually biased.

**Worked example:** For a hypothesis test $H_0: p=0.1$, $H_1: p>0.1$, carried out at 5% significance level, what is the probability of a Type I error?

1. By definition, the probability of a Type I error is the probability that we reject $H_0$ when $H_0$ is true. This equals the significance level of the test:
2. $$P(\text{Type I Error}) = 0.05$$

> **mnemonic**
>
> Type I = Reject a True H0, Type II = Fail to reject a False H0. Mnemonic: *First you Reject, Second you Stay* to remember.

## Common pitfalls

- **Wrong:** Writing hypotheses in terms of sample statistics (e.g. $H_0: \bar{x} = 500$ instead of $H_0: \mu = 500$)
  - Why it fails: Hypotheses are always claims about unknown population parameters, not observed sample values
  - Correct: Always write hypotheses in terms of the population parameter ($p$ for proportion, $\mu$ for mean)
- **Wrong:** Forgetting continuity correction when approximating binomial with normal for proportion tests
  - Why it fails: Binomial is discrete and normal is continuous, so the p-value will be incorrect without the correction
  - Correct: Always apply continuity correction when working with counts of successes in proportion tests
- **Wrong:** Not doubling the p-value for two-tailed tests
  - Why it fails: Two-tailed tests account for difference in either direction, so a one-tailed p-value is half the correct value
  - Correct: Calculate the one-tailed p-value, then double it for two-tailed tests, or use a two-tailed critical value
- **Wrong:** Saying 'we accept $H_0$' when p-value > significance level
  - Why it fails: We never prove $H_0$ is true, we only fail to find sufficient evidence to reject it
  - Correct: Always state 'we do not reject $H_0$' or 'there is insufficient evidence to reject $H_0$'
- **Wrong:** Confusing Type I and Type II errors in exam questions
  - Why it fails: The order of errors is easy to mix up under pressure
  - Correct: Use the mnemonic *First you Reject, Second you Stay* to recall which error is which

## Cheatsheet

| Term | Key Fact/Formula | Notes |
| --- | --- | --- |
| $H_0$ | Null hypothesis: no effect | Assumed true unless proven otherwise |
| $H_1$ | Alternative hypothesis: effect/difference | One-tailed = specific direction; two-tailed = any difference |
| Proportion test statistic | $z = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}$ | Always apply continuity correction to count $X$ |
| Mean test statistic (known $\sigma$) | $z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}$ | Requires normal population distribution |
| P(Type I error) | $= \alpha$ (significance level) | Rejecting true $H_0$ |
| P(Type II error) | $P(\text{not reject } H_0 \| H_0 \text{ false})$ | Depends on the true parameter value |

## What's next

Hypothesis testing is the foundation of all statistical inference for CIE A-Level Mathematics, and it is heavily tested in Paper 4, usually as an 8-10 mark longer question. Mastering the structured approach and common exam conventions (like defining parameters and correct conclusion wording) will earn you full marks on these predictable questions. This topic leads directly into more advanced inference topics including Chi-squared tests for categorical data, t-tests for means with unknown variance, and hypothesis testing for correlation and regression coefficients, all of which are core topics for full A-Level Mathematics and Further Mathematics.

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/cie-9709-u4-hypothesis-testing/
