Hypothesis testing
A hypothesis test checks whether data gives enough evidence to reject a claim. Start by assuming nothing has changed (the null hypothesis) and see how surprising the data would be if that were true.
Key facts
- H₀: the null hypothesis (no change). H₁: what you suspect.
- Significance level (often 5%): how unlikely a result must be before you reject H₀.
- p-value: the probability of a result at least this extreme if H₀ is true.
- Reject H₀ if the p-value is below the significance level; conclude in context.
Worked examples
Example 1
A coin is thrown 20 times and lands heads 15 times. Test at 5% whether it is biased towards heads.
- H₀: p = 0.5. H₁: p > 0.5. X ~ B(20, 0.5).
- P(X ≥ 15) = 0.0207
- 0.0207 < 0.05, so reject H₀.
- There is evidence the coin is biased towards heads.
Answer: Reject H₀: evidence of bias