S2 4.6 - Testing a binomial probability

S2 4.6 - Testing a binomial probability

A sample proportion can differ from a claimed probability simply through chance. You will use exact binomial tails to construct critical regions and test a population probability, handle two-sided alternatives, and use a Normal approximation when a suitable large-sample test calls for it.

Exact binomial critical regions

If you expect five successes but observe eight, is that strong evidence of an increase? The size of the difference alone cannot decide: its probability under the null model matters.

Let pp be the population probability of the outcome counted as a success. For nn independent trials with a constant success probability, H0:p=p0H_0:p=p_0 gives X∼B(n,p0)X\sim\mathrm B(n,p_0). For H1:p>p0H_1:p>p_0, seek a region X≥cX\ge c; for H1:p<p0H_1:p<p_0, seek X≤cX\le c.

You already know

Binomial cumulative tables give P(X≤x)\mathrm P(X\le x). For an upper critical tail, use

P(X≥c)=1−P(X≤c−1).\mathrm P(X\ge c)=1-\mathrm P(X\le c-1).

The shift by one includes the probability at cc.

Choose the largest tail whose null probability does not exceed the stated level. Show its boundary probability and the neighbouring one to establish why the next integer cannot be included.

Worked example 1: an upper critical region

A success probability is claimed to be 0.25. For 20 independent trials, find the upper-tail critical region at 5% for testing H0:p=0.25H_0:p=0.25 against H1:p>0.25H_1:p>0.25.

Plan. Use X∼B(20,0.25)X\sim\mathrm B(20,0.25) under H0H_0, and compare adjacent upper tails with 0.05.

P(X≥8)=1−P(X≤7)=0.101812P(X≥9)=1−P(X≤8)=0.0409252.\begin{aligned} \mathrm P(X\ge8)&=1-\mathrm P(X\le7)=0.101812\\ \mathrm P(X\ge9)&=1-\mathrm P(X\le8)=0.0409252. \end{aligned}

Since 0.0409252≤0.05<0.1018120.0409252\le0.05<0.101812, the cutoff is 9.

Answer. Critical region X≥9X\ge9, actual significance approximately 4.09%.

Check. Adding the count 8 would more than double the rejection probability and exceed 5%.

Change only the alternative from an increase to a decrease. The null distribution stays the same, but low counts now supply evidence.

Worked example 2: a lower critical region

For the same null probability and sample size, find the 5% critical region for H1:p<0.25H_1:p<0.25.

Plan. Compare lower cumulative probabilities with 0.05, keeping X∼B(20,0.25)X\sim\mathrm B(20,0.25) under H0H_0.

P(X≤1)=0.0243126,P(X≤2)=0.0912604.\mathrm P(X\le1)=0.0243126, \qquad\mathrm P(X\le2)=0.0912604.

Answer. Critical region X≤1X\le1, actual significance approximately 2.43%.

Check. The region contains counts 0 and 1. Adding count 2 would make the lower-tail probability exceed 5%.

For a lower alternative the procedure is the same, but use the lower cumulative probabilities directly. The count must represent the success whose probability appears in the hypotheses; changing from successes to failures changes the parameter too.

Probability-based conclusions

You can decide using the critical region or calculate the inclusive tail at the observed count. For an upper alternative, the relevant probability includes the observed count and all larger counts; for a lower alternative, it includes that count and all smaller counts.

Do not compare only P(X=x)\mathrm P(X=x) with the level. A particular count can have small probability without being far into a tail.

Worked example 3: evidence of an increase

A training method previously produced a pass with probability 0.25. Of 20 independent participants using a new method, 9 pass. Test at 5% whether the pass probability has increased.

Plan. Define the parameter, state the directional hypotheses and calculate the inclusive upper tail under H0H_0.

H0:p=0.25,H1:p>0.25,H_0:p=0.25,\qquad H_1:p>0.25,

where pp is the population pass probability with the new method. Under H0H_0, X∼B(20,0.25)X\sim\mathrm B(20,0.25), so

P(X≥9)=1−P(X≤8)=0.0409252<0.05.\mathrm P(X\ge9)=1-\mathrm P(X\le8)=0.0409252<0.05.

Answer. Reject H0H_0. There is significant evidence that the new method increases the pass probability.

Check. The observed 9 is in the 5% region X≥9X\ge9, agreeing with the probability comparison.

Change only the observed count from 9 to 8. Although 8 still exceeds the expected count of 5, the evidence is weaker.

Worked example 4: above expectation without significance

For the same investigation, suppose 8 of the 20 participants pass. Carry out the same 5% test.

Plan. Retain the hypotheses and null model, changing only the observed tail boundary.

P(X≥8)=1−P(X≤7)=0.101812>0.05.\mathrm P(X\ge8)=1-\mathrm P(X\le7)=0.101812>0.05.

Answer. Do not reject H0H_0. There is insufficient evidence at 5% that the new method increases the pass probability.

Check. Eight is outside X≥9X\ge9. This answers the opening question: exceeding the expectation by three successes is not enough for this test.

A conclusion must refer to the population probability or proportion in the investigation. It does not assert that the observed sample proportion equals the true probability.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account