Hypothesis tests for a binomial proportion

Hypothesis tests for a binomial proportion

Spec 5.2 · Edexcel A-Level Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • Define the parameter pp, then write H0:p=p0H_0:p=p_0 using the value claimed, never the sample proportion.
  • Under H0H_0 the number of successes is X∼B(n,p0)X\sim B(n,p_0).
  • The p-value is P(X≥x)P(X\ge x) for H1:p>p0H_1:p>p_0 and P(X≤x)P(X\le x) for H1:p<p0H_1:p<p_0.
  • In a two-tailed test compare the tail probability with half the significance level.
  • Conclude in context: reject H0H_0, or say there is insufficient evidence. Never 'prove'.

Setting up the test

Define pp, write the hypotheses in terms of pp, and state the distribution of XX under H0H_0.

Define the parameter pp (for example the proportion of all parcels delivered on time), then write H0:p=p0H_0:p=p_0 against H1H_1.

The sample gives an inference about the population. If H0H_0 is true, the successes are X∼B(n,p0)X\sim B(n,p_0).

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

00.020.040.060.080.10.120.140.00410.00540.002567891011121314151617181920xP(X = x)
If H₀ is true, X ~ B(30, 0.4): the sample outcome is judged against this distribution (mean 12).
  • H0H_0p=p0p=p_0 (the claimed value)
  • If H0H_0 is trueX∼B(n,p0)X\sim B(n,p_0)

A company claims 85% of parcels arrive on time. In a sample of 15, 10 do. Which is the correct H0H_0?

One-tailed test

Find the p-value in the direction of H1H_1 and compare it with the significance level.

  1. Define pp and write H0H_0 and H1H_1.
  2. State the distribution of XX under H0H_0.
  3. The p-value is P(X≥x)P(X\ge x) for H1:p>p0H_1:p>p_0 or P(X≤x)P(X\le x) for H1:p<p0H_1:p<p_0.
  4. Compare with the level and conclude in context.
  1. 1

    Hypotheses

    define pp; H0H_0 and H1H_1

  2. 2

    Distribution

    X∼B(n,p0)X\sim B(n,p_0) under H0H_0

  3. 3

    p-value

    P(X≥x)P(X\ge x) or P(X≤x)P(X\le x)

  4. 4

    Conclusion

    compare with the level, in context

Steps of a one-tailed test

Worked example

A drug cures 30% of patients. 10 of 20 patients on a new drug are cured. Test at 5% whether the new drug is better.

For H1:p<p0H_1:p<p_0 and observed xx, which probability is the p-value?

Two-tailed tests

When H1:p≠p0H_1:p\ne p_0, split the significance level equally between the two tails.

Compare the tail probability with half the significance level, after deciding the tail from the mean np0np_0.

For X∼B(30,0.4)X\sim B(30,0.4) the mean is 12, so 17 is in the upper tail: P(X≥17)=0.0481P(X\ge17)=0.0481. At 5% compare with 0.0250.025: 0.0481>0.0250.0481>0.025, so do not reject H0H_0.

Alternatively double the tail probability and compare with the full level.

00.050.10.150.20.250.30.00830.00290.00090.0002141516171819202122xP(X ≥ x)
Upper tail P(X ≥ x) for B(30, 0.4). P(X ≥ 17) = 0.0481 is above 0.025, so a two-tailed 5% test does not reject H₀.

One-tailed

Tail probability compared with:
The full level
Split of the level:
None

Two-tailed

Tail probability compared with:
Half the level
Split of the level:
Equal in each tail

Two-tailed test at 5%: a one-tail probability is 0.02. Do you reject H0H_0?

Critical region method

Find the critical region first, then see whether the observation lies in it.

Choose the critical region as large as possible with probability at most the significance level. If the observed value is in it, reject H0H_0.

The actual significance level is the probability of that region under H0H_0.

01234567891011126 observed7 critical value

Worked example

X∼B(40,0.05)X\sim B(40,0.05), H1:p>0.05H_1:p>0.05, 1% level. Find the critical region and decide whether 6 is significant.

What is the actual significance level in the worked example?

Writing the conclusion

State what happens to H0H_0, then say what it means in context, without claiming proof.

A full conclusion has two parts.

  • Reject H0H_0: 'There is evidence at the 5% level that the new drug cures more than 30% of patients.'
  • Do not reject H0H_0: 'There is insufficient evidence at the 5% level that the proportion on time is less than 85%.'

Failing to reject does not prove the claim; the sample may be too small.

00.020.040.060.080.10.120.140.160.180.25% level

Reject H0H_0

  • Evidence for H1H_1 at this level
  • Say what it means in context

Do not reject H0H_0

  • Insufficient evidence for H1H_1
  • Never 'accept' or 'prove' H0H_0

Which is the best conclusion when H0H_0 is not rejected?

Try an exam question

A seed company claims 80% of its seeds germinate. A gardener plants 25 seeds and 16 germinate. Test at the 5% level whether the proportion is lower than claimed, given P(X≤16)=0.0468P(X\le16)=0.0468 for X∼B(25,0.8)X\sim B(25,0.8).

[5 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

State the distribution of XX if the new drug is no more effective than the old one.

1 mark, marked against the mark scheme

Revision notes