, as you scroll — highermaths.org highermaths.org read instead ›

Hypothesis testing

Fifteen heads in twenty tosses. Is the coin bent?

A fair coin could do that. The question is not whether it's possible — it is whether it's unlikely enough to stop believing the coin is fair.

scroll ↓

Assume it is fair

Start by assuming the thing you doubt. If p=0.5p = 0.5, the number of heads follows X∼B(20, 0.5)X \sim B(20,\,0.5) — every bar here is a fair coin's work.

H0:p=0.5H1:p>0.5H_0: p = 0.5 \qquad H_1: p > 0.5

The p-value

Fifteen sits out to the right. But a test never asks about one bar — it asks how likely this result or anything more extreme is:

P(X≥15)=0.0207P(X \ge 15) = 0.0207

About one fair coin in fifty would do this well or better.

Where to draw the line

Grow the tail one bar at a time and its total climbs: 0.0002, 0.0013, 0.0059, 0.0207 — then 0.0577, which has passed 5%. So the largest tail allowed at the 5% level stops at 15.

critical region: X≥15\text{critical region: } X \ge 15

Not quite 5%

Bars come in whole steps, so no region lands on 5% exactly. This one's real probability is 2.07%, the actual significance level.

15 is inside the region, so reject H0H_0: at the 5% level there is evidence that the coin is biased towards heads.

Chapter 7

Evidence, never proof.

One- and two-tailed tests, critical values, actual significance levels, writing the conclusion in context, and twelve graded exam questions with full worked solutions are waiting.