Hypothesis test for a binomial proportion

Hypothesis test for a binomial proportion

Spec O2 · AQA A-Level Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • Follow four steps: hypotheses, distribution under H0H_0, pp-value or critical region, conclusion in context.
  • Use the value of pp in H0H_0, never the sample proportion xn\frac xn.
  • pp-value for H1:p<p0H_1:p<p_0 is P(X≤x)P(X\le x); for H1:p>p0H_1:p>p_0 it is P(X≥x)=1−P(X≤x−1)P(X\ge x)=1-P(X\le x-1). Reject H0H_0 if it is ≤α\le\alpha.
  • In a two-tailed test at 5%, compare the relevant tail with 0.0250.025.
  • A test gives evidence, not proof; conclusions are cautious and in context.

Setting up the test

A test uses a sample to make an inference about the population value of pp. Follow the same four steps every time.

The significance level is the probability of incorrectly rejecting H0H_0 (rejecting it when it is true).

The sample gives the inference; the value of pp you use in the distribution always comes from H0H_0.

  1. 1

    Hypotheses

    Define pp in words and write H0H_0 and H1H_1.

  2. 2

    Distribution

    State the distribution under H0H_0, such as X∼B(12,0.25)X\sim B(12,0.25).

  3. 3

    Method

    Use the pp-value or a critical region at the stated significance level.

  4. 4

    Conclusion

    Decide about H0H_0, then state the conclusion in context.

The four steps of every test

A coin is claimed to be fair. In 20 tosses there are 14 heads. Which distribution is used for the test?

The p-value method

Find the probability, under H0H_0, of a result at least as extreme as the observed value in the direction of H1H_1, then compare it with α\alpha.

If the pp-value is ≤α\le\alpha, reject H0H_0.

Write the probability you are calculating, such as P(X≥6)=1−P(X≤5)P(X\ge6)=1-P(X\le5), before using the calculator.

00.050.10.150.20.250.01150.00240.00040123456789101112XP(X = x)
X ~ B(12, 0.25): the p-value for H₁: p < 0.25 is the lower tail P(X ≤ 1) = 0.1584 (bars for X = 0 and X = 1).

H1:p<p0H_1:p<p_0

  • pp-value =P(X≤x)=P(X\le x)
  • Lower tail

H1:p>p0H_1:p>p_0

  • pp-value =P(X≥x)=1−P(X≤x−1)=P(X\ge x)=1-P(X\le x-1)
  • Upper tail

Worked example

Historically 25% of buses are late. In 12 journeys 1 is late. Test at the 5% level whether the proportion of late buses has decreased.

For H1:p>p0H_1:p>p_0 and an observed value x=6x=6, which probability is the pp-value?

The critical region method

Find the critical region for the significance level first, then see whether the observed value lies in it.

The critical region is the set of values that lead to rejecting H0H_0.

The actual significance level is the true probability of landing in the critical region under H0H_0. It is usually lower than the stated level because XX is discrete.

00.050.10.150.20.250.007616171819kP(X ≥ k)
For X ~ B(20, 0.7): P(X ≥ k) first falls to 0.05 or below at k = 18

Worked example

H0:p=0.7H_0:p=0.7, H1:p>0.7H_1:p>0.7, X∼B(20,0.7)X\sim B(20,0.7), 5% level. Find the critical region and the actual significance level. Is an observed value of 17 significant?

The critical region is X≥18X\ge18 and the observed value is 18. What is the decision?

Two-tailed tests

When H1:p≠p0H_1:p\ne p_0, split the significance level equally between the two tails. At 5%, compare the relevant tail with 0.0250.025.

Use the tail in the direction of the observed result: the lower tail P(X≤x)P(X\le x) if xx is below the expected value np0np_0, the upper tail P(X≥x)P(X\ge x) if it is above.

00.050.10.150.20.250.0010.00980.00980.001012345678910XP(X = x)
X ~ B(10, 0.5): an observed 9 is in the upper tail, P(X ≥ 9) = 0.0107, compared with 0.025.

One-tailed

H1H_1:
p<p0p<p_0 or p>p0p>p_0
Compare a tail with (5% level):
0.05
Tail to use:
The direction of H1H_1

Two-tailed

H1H_1:
p≠p0p\ne p_0
Compare a tail with (5% level):
0.025
Tail to use:
The direction of the observed result

Worked example

A coin gives 9 heads in 10 tosses. Test at the 5% level whether it is biased.

In a two-tailed test at the 5% level, a tail probability is 0.04. What is the decision?

Interpreting the result

The conclusion has two parts: the decision about H0H_0, then a sentence in context, in cautious wording.

The result can depend on the significance level: a pp-value of 0.02930.0293 rejects H0H_0 at 5% but not at 1%.

Because a sample is used, the test can reach the wrong decision. The probability of incorrectly rejecting H0H_0 is the significance level. A larger sample gives a more reliable estimate of pp.

00.0050.010.0150.020.0250.030.0350.040.0450.050.0550.061%p = 0.02935%
A p-value of 0.0293 is below 0.05 (reject H₀ at 5%) but above 0.01 (do not reject at 1%).

Reject H₀

  • There is sufficient evidence, at the 5% level, that the proportion of defective items is higher than 8%

Do not reject H₀

  • There is insufficient evidence that the cure rate is higher
  • This does not prove H₀ true

A pp-value of 0.02930.0293 is found. At which significance levels is H0H_0 rejected?

Try an exam question

A manufacturer claims that 8%8\% of its items are defective. A manager thinks the true proportion is higher. In a random sample of 2525 items, 55 are defective. Test the manager's belief at the 5% significance level.

[5 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Which expression gives the pp-value for this test?

1 mark, marked against the mark scheme

Revision notes