Binomial hypothesis tests

A level Maths (Edexcel) · Edexcel 9MA0 · S5.2 · Statistics › Statistical hypothesis testing

2 exam-style questions plus unlimited generated ones on this topic, at up to four difficulty levels, with full mark schemes. Notes and Full packs are open to everyone. Practice needs a free account.

Or take a quick quiz: 10 questions on this subtopic in A level Maths (Edexcel), marked as you tap.

Revision notes

Testing a claim about a population proportion \(p\) with the binomial distribution: writing hypotheses, finding a p-value or a critical region (one- or two-tailed), and writing a conclusion in context. A complete test is typically worth around 4 to 8 marks.

Key facts

  • \(H_0: p = p_0\); \(H_1: p \gt p_0\), \(p \lt p_0\) or \(p \ne p_0\)
  • Under \(H_0\): \(X \sim B(n, p_0)\)
  • Upper tail: \(P(X \ge x) = 1 - P(X \le x - 1)\)
  • Lower tail: \(P(X \le x)\)
  • Critical region: the largest tail whose probability is no more than the significance level
  • Two-tailed: at most half the significance level in each tail
  • Actual significance level = probability of the critical region under \(H_0\)

Notes

Setting up

  • Define \(p\) in context as the probability of success (the population proportion). \(H_0: p = p_0\), the claimed value.
  • Choose \(H_1\) from the wording: ‘increased’ or ‘more’ gives \(p \gt p_0\); ‘decreased’ or ‘less’ gives \(p \lt p_0\); ‘changed’ or ‘different’ gives \(p \ne p_0\)
  • Under \(H_0\), the number of successes in a sample of size \(n\) is \(X \sim B(n, p_0)\)

Method 1: p-value

  • For \(H_1: p \gt p_0\), find \(P(X \ge x) = 1 - P(X \le x - 1)\), where \(x\) is the observed value; for \(H_1: p \lt p_0\), find \(P(X \le x)\)
  • In a two-tailed test, use the tail the observed value is in (above or below \(np_0\), the number you expect under \(H_0\)) and compare with half the significance level. If the probability is smaller than the level you compare with, reject \(H_0\)

Method 2: critical region

diagram
  • Upper tail: the smallest \(c\) with \(P(X \ge c) \le\) the significance level gives the critical region \(X \ge c\). Lower tail: the largest \(c\) with \(P(X \le c) \le\) the significance level gives \(X \le c\)
  • Use a table of cumulative probabilities on your calculator and quote the probabilities either side of each boundary.
  • Two-tailed: each tail has probability at most half the significance level. The actual significance level is the sum of the two tail probabilities.
  • 035791113151720X ≤ 30.0160X ≥ 130.0210observed 13actual significance level = 0.0160 + 0.0210 = 0.0370
    Two-tailed test, H0: p = 0.4, n = 20: each tail at most 2.5%
  • If a question asks for tails ‘as close as possible to’ a value instead, follow that wording.
  • If the observed value is in the critical region, reject \(H_0\)

Conclusion

  • Give the decision, then a conclusion in context that does not claim certainty, e.g. ‘there is evidence to suggest that the proportion of customers who use the app has increased’.

How to answer each type of question

M = method mark, A = answer mark, B = a mark on its own.

One-tailed test using a p-value

4 to 5 marksGrade D
  1. Write the hypotheses, with \(p\) defined.
  2. State the distribution under \(H_0\)
  3. Find the probability of the observed value or a more extreme one.
  4. Compare, decide and conclude in context.

Example. A company claims that 30% of its customers use its app. The manager believes that the proportion is higher. In a random sample of 25 customers, 12 use the app. Test the manager's belief at the 5% level of significance.

Show the model answerHide the model answer
\(H_0: p = 0.3\), \(H_1: p \gt 0.3\), where \(p\) is the proportion of customers who use the app
(B1)
Under \(H_0\), \(X \sim B(25, 0.3)\)
(M1)
\(P(X \ge 12) = 1 - P(X \le 11)\)
\(= 1 - 0.9558 = 0.0442\)
(A1)
\(0.0442 \lt 0.05\), so reject \(H_0\)
(M1)
There is sufficient evidence to suggest that more than 30% of customers use the app
(A1)

One-tailed critical region (lower tail)

3 to 4 marksGrade C
  1. Use the distribution under \(H_0\)
  2. Find the largest \(c\) with \(P(X \le c)\) no more than the significance level.
  3. Quote the probabilities either side and write the region as \(X \le c\)

Example. A treatment works for 70% of patients. A researcher suspects that a new batch is less effective. It is given to 20 patients, and \(X\) is the number for whom it works. Find the critical region for a test at the 5% level, and state the actual significance level.

Show the model answerHide the model answer
\(H_0: p = 0.7\), \(H_1: p \lt 0.7\); \(X \sim B(20, 0.7)\)
(B1)
\(P(X \le 10) = 0.0480\) and \(P(X \le 11) = 0.1133\)
(M1)
Critical region \(X \le 10\) (A1); actual significance level 0.0480
(B1)

Two-tailed critical regions and actual significance level

6 to 7 marksGrade B
  1. Write the hypotheses with \(\ne\)
  2. Allow at most half the significance level in each tail.
  3. Quote the probabilities either side of each boundary.
  4. Add the two tail probabilities for the actual significance level.

Example. A gardener claims that 40% of seeds of a certain type germinate. A random sample of 20 seeds is planted to test whether the proportion is different from 40%.
(a) Using a 5% level of significance, find the critical region for the number of seeds that germinate.
(b) Find the actual significance level of the test.
(c) 13 of the seeds germinate. State the conclusion of the test.

Show the model answerHide the model answer
(a) \(H_0: p = 0.4\), \(H_1: p \ne 0.4\) (B1); \(X \sim B(20, 0.4)\)
Lower tail: \(P(X \le 3) = 0.0160\), \(P(X \le 4) = 0.0510\) (M1), so \(X \le 3\)
(A1)
Upper tail: \(P(X \ge 13) = 1 - 0.9790 = 0.0210\), \(P(X \ge 12) = 0.0565\), so \(X \ge 13\)
(A1)
(b) \(0.0160 + 0.0210\) (M1) \(= 0.0370\)
(A1)
(c) 13 is in the critical region, so reject \(H_0\): there is evidence to suggest that the proportion of seeds that germinate is not 40%
(B1)

Smallest sample size for a significant result

3 marksGrade A*
  1. Write the probability of the most extreme outcome in terms of \(n\)
  2. Set it to be no more than the significance level.
  3. Solve using logarithms and round up.

Example. A test of \(H_0: p = 0.2\) against \(H_1: p \lt 0.2\) is carried out at the 5% level using a sample of size \(n\). Find the smallest value of \(n\) for which observing no successes would lead to rejecting \(H_0\)

Show the model answerHide the model answer
\(P(X = 0) = 0.8^n \le 0.05\)
(M1)
\(n \ge \dfrac{\log 0.05}{\log 0.8} = 13.4\)
(M1)
\(n = 14\)
(A1)
(check: \(0.8^{13} = 0.0550\) and \(0.8^{14} = 0.0440\))

Don’t lose marks

  • Using \(P(X = x)\) instead of \(P(X \ge x)\) or \(P(X \le x)\) for the p-value.
  • Using \(1 - P(X \le x)\) for \(P(X \ge x)\)
  • Writing the critical region as a probability instead of as values of \(X\)
  • Using the full significance level in each tail of a two-tailed test.
  • Conclusions that claim certainty, or that don't mention the context.

More tips

Memory tricks

  • Use your calculator's table mode for binomial CD to list \(P(X \le x)\) for many values at once and spot the boundary.
  • Write \(P(X \ge c) = 1 - P(X \le c - 1)\) every time: it avoids the most common slip.
  • Two-tailed test: compare the observed value with \(np_0\), the number you expect under \(H_0\), to see which tail it is in, then test that tail only.

Exam technique

  • For critical regions, show the probabilities either side of each boundary: they earn the method mark.
  • Write critical regions in terms of \(X\), e.g. \(X \le 3\) or \(X \ge 13\)
  • Read the tail rule in the question: ‘at most 2.5%’ and ‘as close as possible to 2.5%’ can give different answers.

What each grade needs

What you need to be able to do, from the first marks up to the top grade.

  1. Grade E
    Write hypotheses for a binomial test\(H_0: p = p_0\), with \(H_1\) from the wording and \(p\) defined in context.
  2. Grade D
    Carry out a one-tailed test with a p-valueFind \(P(X \ge x)\) or \(P(X \le x)\) under \(H_0\) and compare it with the significance level.
  3. Grade C
    Find a one-tailed critical regionFind the boundary where the tail probability is no more than the significance level.
  4. Grade B
    Find critical regions for a two-tailed testAllow at most half the significance level in each tail.
  5. Grade B
    Find the actual significance levelFind the probability of the critical region under \(H_0\) (adding both tails for a two-tailed test).
  6. Grade A
    Carry out a complete test in contextHypotheses, distribution, probability or critical region, decision and conclusion in context.
  7. Grade A*
    Find a sample size that gives significanceE.g. find the smallest \(n\) for which \(X = 0\) is in the critical region.

Sample questions

Written for this site in the style of Edexcel exam questions. They are not taken from real past papers.

Question 1Easy3 marks
A seed company states that 75% of its seeds germinate. A gardener believes that seeds that have been stored for a year are less likely to germinate. A test of \(H_0: p = 0.75, \ H_1: p \lt 0.75\) is carried out at the 1% level of significance, where \(p\) is the proportion of seeds that germinate. In a random sample of 22 seeds, 10 germinate.
Using \(X \sim B(22, 0.75)\), find \(P(X \le 10)\) and state, with a reason, whether \(H_0\) is rejected.
[3]
Show the answer and mark scheme
Answer: \(P(X \le 10) = 0.0029\). Since \(0.0029 \lt 0.01\), reject \(H_0\).
  • M1 for \(P(X \le 10)\)
  • A1 for awrt 0.0029
  • A1ft for a correct decision from a comparison with 0.01
Question 2Medium8 marks
A game designer claims that a spinner lands on red with probability \(\frac{1}{4}\). A player believes that it lands on red less often than this. In 40 spins, the spinner lands on red 4 times.
The player carries out a test at the 5% level of significance and writes:
\(H_0: p = 0.1\), \(H_1: p \lt 0.1\)
\(P(X = 4) = 0.0113\), which is less than 0.05, so reject \(H_0\).
(a) Identify two errors in the player’s working.
[2]
(b) Carry out the test correctly.
[4]
(c) Find the critical region for this test.
[2]
Show the answer and mark scheme
(a) Answer: The hypotheses should use the claimed value \(p = 0.25\), not the sample proportion 0.1; the player should find \(P(X \le 4)\), not \(P(X = 4)\).
  • B1 for the hypotheses should be about the claimed population proportion: \(H_0: p = 0.25\), \(H_1: p \lt 0.25\) (0.1 is the sample proportion)
  • B1 for the probability should be \(P(X \le 4)\) (the observed value or a more extreme one), not \(P(X = 4)\)

Worked solution: The hypotheses must be about the population parameter under the designer’s claim, \(p = 0.25\); 0.1 is just the sample proportion. And the test needs the probability of a result at least as extreme as the one observed, \(P(X \le 4)\), not the probability of exactly 4.

(b) Answer: \(H_0: p = 0.25\), \(H_1: p \lt 0.25\); \(X \sim \mathrm{B}(40, 0.25)\), \(P(X \le 4) = 0.0160 \lt 0.05\): reject \(H_0\). There is evidence that the spinner lands on red less often than \(\frac{1}{4}\).
  • B1 for \(H_0: p = 0.25\), \(H_1: p \lt 0.25\)
  • M1 for \(X \sim \mathrm{B}(40, 0.25)\) and \(P(X \le 4)\)
  • A1 for 0.0160 (awrt 0.016)
  • A1 for reject \(H_0\), with a conclusion in context: evidence that the spinner lands on red less often than the designer claims

Worked solution: \(H_0: p = 0.25\), \(H_1: p \lt 0.25\). Under \(H_0\), \(X \sim \mathrm{B}(40, 0.25)\).
\(P(X \le 4) = 0.0160 \lt 0.05\), so reject \(H_0\): there is evidence that the spinner lands on red less often than \(\frac{1}{4}\) of the time.

(c) Answer: \(X \le 5\)
  • M1 for \(P(X \le 5) = 0.0433\) and \(P(X \le 6) = 0.0962\)
  • A1 for \(X \le 5\)

Worked solution: \(P(X \le 5) = 0.0433 \le 0.05\) and \(P(X \le 6) = 0.0962 \gt 0.05\), so the critical region is \(X \le 5\).

Question 3Hard6 marks
At a restaurant, 25% of customers buy a dessert. The owner believes that a new dessert menu has increased the proportion of customers who buy a dessert. A random sample of 27 customers is taken, and \(X\) is the number who buy a dessert.
(a) Find the critical region for a test of \(H_0: p = 0.25, \ H_1: p \gt 0.25\) at the 10% level of significance, and state the actual significance level.
[4]
(b) In the sample, 13 buy a dessert. State, with a reason, the conclusion of the test in context.
[2]
Show the answer and mark scheme
(a) Answer: \(X \ge 11\); actual significance level 0.0528.
  • M1 for \(X \sim B(27, 0.25)\)
  • A1 for \(P(X \ge 11) = 0.0528\) and \(P(X \ge 10) = 0.1133\)
  • A1 for \(X \ge 11\)
  • A1 for 0.0528
(b) Answer: 13 is in the critical region, so reject \(H_0\). There is sufficient evidence to suggest that the proportion of customers who buy a dessert has increased.
  • M1 for a correct decision from their critical region
  • A1ft for a non-assertive conclusion in context

More in Statistical hypothesis testing

Stuck? Get 1-to-1 help.

Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.