2.05b - Testing a binomial proportion

2.05b - Testing a binomial proportion

Turn a claim about a population probability into an exact binomial test. Calculate the relevant tail, justify critical boundaries and recognise how a two-tail test changes the evidence threshold.

Calculate the relevant tail under the null hypothesis

Does three successes in twenty trials suggest that a claimed success probability of 0.40.4 has fallen? A test makes that judgement by comparing this sample with the distribution expected under the claim.

You already know

State a null hypothesis about a population parameter and choose the alternative before sampling. A p-value includes the observed count and all outcomes more extreme in that direction.

Let pp be the population probability of a successful trial. A fixed number of trials, independence and a common probability must be reasonable. Success and failure must exhaust the possible outcomes; for example, “on time” and “not on time” do, even when “not on time” includes a cancellation.

Exact binomial probability

If X∼B(n,p)X\sim\mathrm B(n,p), then for integers r=0,…,nr=0,\ldots,n,

P(X=r)=(nr)pr(1−p)n−r.\mathrm P(X=r)=\binom nr p^r(1-p)^{n-r}.

Add the relevant terms, or use a calculator cumulative function, for a tail probability.

In the formula sheet.

The null fixes the probability entered into the calculator. We test the claim rather than fit a new model to the observed proportion.

Worked example 1: evidence for a decrease

Question. A process has claimed success probability 0.40.4. Three successes occur in twenty independent trials. Test for a decrease at 5%5\%.

Plan. Define pp, state the directed hypotheses and calculate the lower tail under the null.

H0:p=0.4,H1:p<0.4X∣H0∼B(20,0.4)P(X≤3)=0.01596116279…<0.05\begin{aligned} \mathrm H_0&:p=0.4,\qquad \mathrm H_1:p<0.4\\ X\mid\mathrm H_0&\sim\mathrm B(20,0.4)\\ \mathrm P(X\le3)&=0.01596116279\ldots<0.05 \end{aligned}

Why this step? Counts zero, one and two would provide stronger evidence for a decrease than the observed three, so include them.

Answer. Reject H0\mathrm H_0. There is sufficient evidence at 5%5\% to suggest that the population success probability is below 0.40.4.

Check. The null expected count is 20(0.4)=820(0.4)=8; three is on the correct side for the proposed decrease.

Change only the observed count from three to four. Keep the claim, sample size, alternative and level fixed.

Worked example 2: a result just outside the threshold

Question. What would four successes imply in the same test?

Plan. Recalculate the inclusive lower tail at four.

P(X≤4)=0.05095195319…>0.05.\mathrm P(X\le4)=0.05095195319\ldots>0.05.

Why this step? A result that rounds to 0.050.05 is not automatically at the threshold; keep enough digits to decide.

Answer. Do not reject H0\mathrm H_0. There is insufficient evidence at 5%5\% to suggest that the population success probability has fallen below 0.40.4.

Check. Four successes are less extreme than three, so their lower-tail probability is larger. The decisions fit that ordering.

A probability expression shows which event you evaluated, even when a calculator does the arithmetic.

Watch out

Using B(20,3/20)\mathrm B(20,3/20) in the first test replaces the claim with the sample result. Use B(20,0.4)\mathrm B(20,0.4), and use exact binomial probabilities rather than a Normal approximation.

Practise a complete directed test with a different process.

Justify the first rejected count in an upper tail

For an increase, the rejection region consists of large counts. Find its first count by checking both an admissible tail and its neighbouring, larger-probability tail.

Inclusive upper tail

For a binomial count and an integer kk,

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

The critical region X≥kX\ge k at level α\alpha is maximal when its probability is at most α\alpha, but the tail starting at k−1k-1 exceeds α\alpha.

Not in the formula sheet: learn it.

A cumulative inverse function may return the first count reaching an area rather than the last acceptable boundary. Verify the two probabilities instead of relying on the calculator's naming convention.

Worked example 3: the first rejected count

Question. For twelve independent invitations, test an increase from population reply probability 0.30.3. Determine the upper-tail critical and acceptance regions at 5%5\%, and conclude for eight replies.

Plan. Use H0:p=0.3\mathrm H_0:p=0.3, H1:p>0.3\mathrm H_1:p>0.3, with X∼B(12,0.3)X\sim\mathrm B(12,0.3) under the null, and check neighbouring upper tails.

P(X≥7)=0.0386008431≤0.05P(X≥6)=0.1178487389>0.05\begin{aligned} \mathrm P(X\ge7)&=0.0386008431\le0.05\\ \mathrm P(X\ge6)&=0.1178487389>0.05 \end{aligned}

Why this step? Starting at six would reject too often when the null is true; starting above seven would discard usable evidence unnecessarily.

Answer. The critical region is X≥7X\ge7; the acceptance region is 0≤X≤60\le X\le6. The actual rejection probability is 0.03860084310.0386008431, below the specified level. Eight replies lie in the region: there is sufficient evidence at 5%5\% to suggest a population reply probability above 0.30.3.

Check. P(X≥7)=1−P(X≤6)\mathrm P(X\ge7)=1-\mathrm P(X\le6), so the boundary count 77 is included.

Change only the significance level: a 1%1\% rule demands stronger evidence than a 5%5\% rule.

Continue this lesson.

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

Create free account