7.1 Hypothesis Testing
A-level Maths Statistics and Mechanics Year 1 (AS) · Edexcel 9MA0 · Chapter 7: Hypothesis Testing
A free A-level Maths Stats and Mechanics Year 1 lesson for Pearson Edexcel A level Mathematics (9MA0) from OBA School: the language of hypothesis testing, developed through the binomial distribution. Watch the video, read the explanation and worked examples, then try the revision questions. You can work through the full lesson, with more videos, an interactive lesson, a practice quiz and printable worksheets, in our free online course.
What you will learn
- Write null and alternative hypotheses, H₀ and H₁, for a population proportion p
- Decide whether a test is one-tailed or two-tailed from the wording of a claim
- Find a p-value using the binomial distribution and compare it with the significance level
- Write a conclusion in context, without claiming to have proved anything
- Explain that the significance level is the probability of wrongly rejecting the null hypothesis
Key words
- Null hypothesis: H₀: the claim we assume is true, such as p = 0.5. It always uses "=".
- Alternative hypothesis: H₁: what we suspect instead, such as p > 0.5, p < 0.5 or p ≠ 0.5.
- Test statistic: The value calculated from the sample, here the number of successes X.
- Significance level: The probability below which we reject the null hypothesis, often 10%, 5% or 1%. It is the probability of rejecting H₀ when it is true.
- p-value: The probability, assuming H₀ is true, of a result at least as extreme as the one observed.
- One-tailed, two-tailed: One-tailed: H₁ uses . Two-tailed: H₁ uses ≠.
Hypotheses about a proportion
We often want to know a population proportion p, such as the proportion of seeds that grow. We cannot test the whole population, so we take a sample and use it to make an inference about the population. A hypothesis test asks whether the sample gives enough evidence to reject a claim.
The test is always about the population parameter p, never about the sample. H₀ gives the value we assume; H₁ gives the direction we suspect.
Worked example: writing hypotheses
(a) A coin is said to be fair. Kofi thinks it is biased towards heads.
H₀: p = 0.5 H₁: p > 0.5, where p is the probability of a head. One-tailed.
(b) A seed company says 85% of its seeds germinate. A gardener thinks the figure is lower.
H₀: p = 0.85 H₁: p < 0.85, where p is the proportion that germinate. One-tailed.
(c) 10% of adults are left-handed. A researcher wants to know whether the proportion is different for musicians.
H₀: p = 0.1 H₁: p ≠ 0.1. "Different" gives no direction, so this is two-tailed.
Answer: always say what p stands for, in context
Test statistic, p-value and significance level
Assume H₀ is true. Then the number of successes in a sample of n is X ~ B(n, p). Work out how likely a result at least as extreme as the observed one would be. That probability is the p-value. If it is less than the significance level, the result is significant and we reject H₀.
Worked example: testing Kofi's coin at the 5% level
Kofi tosses the coin 20 times and gets 15 heads.
H₀: p = 0.5, H₁: p > 0.5. Under H₀, X ~ B(20, 0.5).
"At least as extreme" means 15 or more: P(X ≥ 15) = 1 − P(X ≤ 14) = 0.0207
0.0207 < 0.05, so the result is significant. Reject H₀.
Answer: There is evidence at the 5% level that the coin is biased towards heads.
Key fact: For an upper-tail test the p-value is P(X ≥ x). For a lower-tail test it is P(X ≤ x). Use the cumulative binomial function: P(X ≥ x) = 1 − P(X ≤ x − 1).
Conclusions in context
A test never proves anything. If the result is not significant, we say there is insufficient evidence to reject H₀; we do not say H₀ is true. Every conclusion should mention the context of the question.
Worked example: the gardener's seeds at the 5% level
The gardener sows 30 seeds and 22 germinate.
H₀: p = 0.85, H₁: p < 0.85. Under H₀, X ~ B(30, 0.85).
p-value: P(X ≤ 22) = 0.0698
0.0698 > 0.05, so the result is not significant. Do not reject H₀.
Answer: There is insufficient evidence at the 5% level to support the gardener's belief that fewer than 85% of the seeds germinate.
Exam tip: Good conclusions have two parts: a decision (reject or do not reject H₀) and a sentence in context that uses the word "evidence".
What the significance level means
Even when H₀ is true, unusual samples happen. A fair coin can give 15 heads in 20 tosses; it just does not happen often. If we reject H₀ whenever we see 15 or more heads, we will wrongly reject a fair coin with probability P(X ≥ 15) = 0.0207.
Key fact: The significance level is the probability of incorrectly rejecting H₀, that is, rejecting it when it is actually true. Because X is discrete, the actual probability is usually a little less than the stated level.
Worked example: actual probability of a wrong rejection
A test of a fair coin uses 20 tosses. H₀ will be rejected if there are 15 or more heads. What is the probability of rejecting H₀ when the coin is fair?
P(X ≥ 15) = 0.0207 for X ~ B(20, 0.5)
Answer: 0.0207, about 2.1%, which is less than 5%
A smaller significance level, such as 1%, makes a wrong rejection less likely. The price is that a real change in p is harder to detect, because the sample has to be more extreme before we reject H₀.
Common mistakes
- Writing hypotheses about the sample instead of the population parameter p.
- Using P(X = 15) instead of P(X ≥ 15) as the p-value.
- Writing "H₀ is true". Say there is insufficient evidence to reject H₀.
- A conclusion with no context: link it back to the coin, the seeds or the people.
Revision questions
Try these, then check your answers below each one.
Question 1. A courier says that 8% of its parcels arrive late. A manager thinks the proportion has increased. Which hypotheses should she use? (Choose from: H₀: p = 0.08, H₁: p > 0.08; H₀: p = 0.08, H₁: p < 0.08; H₀: p = 0.08, H₁: p ≠ 0.08; H₀: p > 0.08, H₁: p = 0.08.)
Answer: H₀: p = 0.08, H₁: p > 0.08
Working: H₀: p = 0.08 and, because she thinks it has increased, H₁: p > 0.08, where p is the proportion of parcels that arrive late.
Question 2. Under H₀, X ~ B(18, 0.5). The test is H₁: p > 0.5 and the observed value is x = 14. Find the p-value, to 4 decimal places.
Answer: 0.0154
Working: P(X ≥ 14) = 1 − P(X ≤ 13) = 0.0154.
Question 3. A one-tailed test at the 5% level gives a p-value of 0.062. Is the result significant?
Answer: No
Working: 0.062 > 0.05, so the result is not significant and H₀ is not rejected.
Related lessons
- Previous lesson: 6.3 Cumulative Probabilities
- Next lesson: 7.2 Finding Critical Values
- In this chapter: 7.3 One-Tailed Tests
- In this chapter: 7.4 Two-Tailed Tests
Continue in the full course
This lesson is section 7.1 of our free A-level Maths Statistics and Mechanics Year 1 (AS) course. In the full course you get every video for this section, an animated interactive lesson, a self-marking practice quiz, a printable worksheet with a mark scheme, an end-of-chapter test and your progress saved. Go to the full A-level Maths Statistics and Mechanics Year 1 (AS) course.