Maths › Statistics › Hypothesis testing with the binomial
Hypothesis testing with the binomial
A claim about a proportion meets some data. The test assesses whether the observed result would be sufficiently unlikely if the null hypothesis were true. Assume the claim, compute how unlikely the observed data would be under it, and compare that with a threshold agreed in advance.
Builds on The binomial distribution.
IN THIS TOPIC
- Set up H₀ and H₁ for a claim about a binomial probability p.
- Carry out one- and two-tailed tests by comparing a tail probability with the significance level, concluding in context.
- Find a critical region and state the actual significance level of a test.
COMMON MISCONCEPTION
Rejecting the null hypothesis proves the alternative is true.
The logic of a test
The null hypothesis H₀ is the default claim, always a specific value of the population proportion p, and it is retained unless the data is sufficiently unlikely under it. The alternative H₁ states the direction of departure you are testing for. Use p > 0.5 or p < 0.5 for a one-tailed test and p ≠ 0.5 for a two-tailed one. The significance level, usually 5%, is fixed before the data arrives, and it sets how unlikely the data must be before H₀ is rejected.
Everything gets computed assuming H₀ is true. That assumption is what makes the calculation possible. Under H₀ the count follows a known binomial, so the probability of a result at least as extreme as the one observed, the p-value, is a number your calculator can give you.
Two things a p-value is not. It is not the probability that H₀ is true, and it is not the probability that the result happened by chance. It is the probability of data this extreme if H₀ holds. Getting that sentence right is worth more than any calculation in this lesson.
A one-tailed test
WORKED EXAMPLE
Is the coin biased towards heads?
A coin is flipped 20 times and lands heads 15 times. Test at the 5% level whether the coin is biased towards heads.
H₀: p = 0.5, H₁: p > 0.5. Under H₀, X ~ B(20, 0.5).
P(X ≥ 15) = 1 − P(X ≤ 14) = 0.0207.
0.0207 < 0.05, so reject H₀. There is significant evidence at the 5% level that the coin is biased towards heads.
The conclusion needs all three parts: the comparison, the decision about H₀, and the meaning in context. Two out of three scores two out of three.
Notice that the tail is P(X ≥ 15) and not P(X = 15). Testing the probability of the exact observed value is the commonest wrong turn in the whole topic, and it usually flips the decision.
Two tails
A two-tailed test splits the significance level between the tails, 2.5% each at the 5% level, and the observed tail probability gets compared against the half. Wording decides which test you are running. “Has the proportion changed” is two-tailed. “Has it increased” is one-tailed.
WORKED EXAMPLE
A spinner that lands red too rarely
A spinner is claimed to land on red 30% of the time. In 25 spins it lands red 3 times. Test at the 5% level whether the proportion differs from 0.3.
H₀: p = 0.3, H₁: p ≠ 0.3. Under H₀, X ~ B(25, 0.3).
3 is below the expected 7.5, so this is the lower tail: P(X ≤ 3) = 0.0332.
Compare with 0.025, not with 0.05. Since 0.0332 > 0.025, do not reject H₀. There is insufficient evidence at the 5% level that the proportion of reds differs from 0.3.
This is exactly the trap. A candidate who compares 0.0332 with 0.05 rejects H₀ and loses the last three marks in one line.
Critical regions
A critical region answers the question before the data arrives. Which counts would have rejected H₀? For X ~ B(20, 0.5) against p > 0.5 at 5%, P(X ≥ 14) = 0.0577 is too big to fit inside the level and P(X ≥ 15) = 0.0207 fits, so the critical region is X ≥ 15.
The actual significance level is the probability of the critical region under H₀, here 2.07%. A binomial takes only whole-number values, so the actual rejection probability usually falls short of the nominal 5%. Quote it, and say what it means. It is the probability of rejecting H₀ when H₀ is in fact true.
A two-tailed critical region gets built one tail at a time, each against 2.5%. With X ~ B(25, 0.3), the region is X ≤ 2 or X ≥ 13, and its actual significance level is 0.0090 + 0.0175 = 2.64%.
ASSESSMENT FOCUS
- Hypotheses are about p and must be written with p. “H₀: p = 0.3” earns the mark; “the coin is fair” on its own does not.
- Compare a tail probability with the level, or compare the observed value with a critical region. Either route scores, provided you say which one you are on.
- Conclusions come in the exam's own dialect. “Reject H₀, so there is significant evidence that…” or “insufficient evidence that…”, always naming the context.
- For a two-tailed test, halve the level before comparing. This is one of the most common ways to lose marks in Section A.
- Actual significance level is the probability of the critical region under H₀. Expect it to undershoot the nominal level.
- Never test P(X = observed). The test uses the probability of a result at least as extreme, which is a tail probability.
CHECK YOURSELF
X ~ B(30, 0.2) under H₀, and the critical region for a one-tailed test is X ≥ 11 with P(X ≥ 11) = 0.0256. State the actual significance level and what it measures.
Show a hint
The region's probability, assuming the null.
Show the answer
The actual significance level is 2.56%.
It is the probability of rejecting H₀ even though H₀ is true, the test's built-in false alarm rate.
Assume H₀, measure how extreme the data is, compare with the agreed level.
The critical region is decided before the data, and its probability under H₀ is the actual significance level.
WORKBOOK
Printable practice for this topic: original exam-style questions with room to work, and a fully worked answer book. Free to use; please do not redistribute or sell.
Or read them with their worked answers on the hypothesis testing with the binomial questions page.
CHECK YOUR PROGRESS
Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device, unless you sign in.
- Set up H₀ and H₁ for a claim about a binomial probability p.
- Carry out one- and two-tailed tests by comparing a tail probability with the significance level, concluding in context.
- Find a critical region and state the actual significance level of a test.
Open the full revision checklist to see every objective in the course in one place.