Interval Estimators: Confidence Intervals for Proportions – STAT 611, Handout 11 (Part 2 of 5) – Study Notes

Source: Principles of Statistics I, Texas A&M / Tamhane & Dunlop Ch. 9; Brown, Cai & DasGupta (2001)

Tags: binomial proportion, Clopper-Pearson, Wald CI, Wilson CI, Agresti-Coull, coverage probability, population proportion, confidence interval for p


TL;DR

Four main CIs exist for a binomial proportion p: the exact Clopper-Pearson (conservative, based on the binomial distribution), the Wald (simple but unreliable for small n or extreme p̂), the Wilson (inverts the original pivot without substituting p̂), and the Agresti-Coull (a practical approximation to Wilson). For n ≥ 40, Agresti-Coull is recommended for its simplicity. For small n, Wilson or Jeffreys intervals perform better.


Key Terms

Clopper-Pearson CI

The "exact" CI for p, constructed so that the coverage probability is at least 1 − α. It uses the binomial distribution directly and is conservative (slightly wider than necessary) because the binomial is discrete.

Wald CI

The simplest asymptotic CI: p̂ ± Zα/2√[p̂(1 − p̂)/n]. Replaces p with p̂ in the standard error. Requires min(np̂, n(1 − p̂)) ≥ 5. Collapses to a point when p̂ = 0 or p̂ = 1.

Wilson CI

Derived by inverting the original pivot (keeping p in the denominator rather than replacing with p̂). Solves a quadratic inequality in p. Better coverage than Wald, especially for small n.

Agresti-Coull CI

A simplification of Wilson: add Z²α/2/2 pseudo-successes and Z²α/2/2 pseudo-failures to the data, then apply the Wald formula to the adjusted proportion p̃. For 95% CIs, this amounts to adding 2 successes and 2 failures (the "plus-four" method).

Coverage probability

The actual probability that the CI contains the true p, which may differ from the nominal 1 − α, especially for discrete data.


Core Content

Setup

Y = number of Type A outcomes in n iid Bernoulli trials. Y ~ Bin(n, p). The sample proportion is p̂ = Y/n.

By the CLT, the asymptotic pivot is:

g(Y, p) = (p̂ − p) / √[p(1 − p)/n] ≈ N(0, 1)

The four CIs differ in how they handle the unknown p in the denominator.


1. Clopper-Pearson CI (Exact)

The interval (PL, PU) is defined by solving two equations. For observed Y = y:

  • Σk=yn C(n,k) PLk(1 − PL)n−k = α/2

  • Σk=0y C(n,k) PUk(1 − PU)n−k = α/2

Special cases:

  • If y = 0: PL = 0, PU = 1 − (α/2)1/n

  • If y = n: PL = (α/2)1/n, PU = 1

General case (0 < y < n): Uses the relationship between the binomial and F-distribution:

PL = 1 / [1 + ((n − y + 1)/y) · F2(n−y+1), 2y, α/2]

PU = [((y+1)/(n−y)) · F2(y+1), 2(n−y), α/2] / [1 + ((y+1)/(n−y)) · F2(y+1), 2(n−y), α/2]

where Fdf1, df2, α/2 = qf(1 − α/2, df1, df2) in R.

Key property: Coverage probability is always ≥ 1 − α, making it conservative. The conservatism comes from the discreteness of the binomial.

Connection to Beta and F distributions: If X ~ Bin(n, p), then P[X ≥ x] = P[Y ≤ p] where Y ~ Beta(x, n − x + 1). A transformed F random variable (ν₁/ν₂)W / [1 + (ν₁/ν₂)W] follows a Beta(ν₁/2, ν₂/2) distribution.


2. Wald CI (Asymptotic)

Replace p with p̂ in the standard error of the pivot:

CI: p̂ ± Zα/2 · √[p̂(1 − p̂) / n]

Requirement: min(np̂, n(1 − p̂)) ≥ 5.

Problems:

  • Meaningless when p̂ = 0 or p̂ = 1 (interval collapses to a single point)

  • Poor coverage for small n, especially when p is near 0 or 1

  • Underestimates the standard error because p̂ is substituted for the true p


3. Wilson CI

Wilson (1927) kept p in the denominator and inverted the inequality algebraically. Squaring the pivot inequality and solving the resulting quadratic h(p) = (1 + C)p² − (C + 2p̂)p + p̂² ≤ 0, where C = Z²α/2/n, gives:

Define adjusted quantities: Ỹ = Y + Z²α/2/2, ñ = n + Z²α/2, p̃ = Ỹ/ñ.

Wilson CI:

p̃ ± [√n · Zα/2 · √(p̂(1 − p̂) + Z²α/2/(4n))] / ñ

For large n (n ≥ 40), p̃ ≈ p̂, leading to the Agresti-Coull simplification.


4. Agresti-Coull CI

Use the adjusted proportion p̃ = (Y + Z²α/2/2) / (n + Z²α/2) with the Wald-style formula:

CI: p̃ ± Zα/2 · √[p̃(1 − p̃) / ñ]

For a 95% CI specifically: Z0.025 ≈ 2, so Ỹ ≈ Y + 2 and ñ ≈ n + 4, giving p̃ = (Y + 2)/(n + 4). This is the widely taught "add two successes and two failures" rule.

The Agresti-Coull CI is always wider than the Wilson CI.


Comparison Table (Selected Values)

For small n and small p̂, the Wald CI is strikingly different from the exact Clopper-Pearson. Some examples at 95% confidence:

  • n = 10, y = 1 (p̂ = 0.10): Wald gives (0, 0.286), Clopper-Pearson gives (0.003, 0.445)

  • n = 50, y = 1 (p̂ = 0.02): Wald gives (0, 0.059), Clopper-Pearson gives (0.001, 0.107)

  • n = 100, y = 50 (p̂ = 0.50): Wald gives (0.402, 0.598), Clopper-Pearson gives (0.398, 0.602)

At large n with moderate p̂, all four methods converge.


Performance Summary

Accuracy is measured by coverage probability C(p, n). Precision is measured by expected width.

  • For n ≥ 40: Agresti-Coull and Wilson are comparable and recommended.

  • For n < 40: Wilson or Jeffreys (Bayesian with Beta(0.5, 0.5) prior) are preferred.

  • Clopper-Pearson is conservative for all n; width is slightly larger than necessary.

  • Wald has erratic coverage, especially near p = 0 or p = 1, and for small n. Not recommended when np̂ < 5.


Formulas / Diagrams

Wald: p̂ ± Zα/2√[p̂(1 − p̂)/n]

Wilson: p̃ ± √n · Zα/2√[p̂(1 − p̂) + Z²α/2/(4n)] / ñ

Agresti-Coull: p̃ ± Zα/2√[p̃(1 − p̃)/ñ]

where Ỹ = Y + Z²α/2/2, ñ = n + Z²α/2, p̃ = Ỹ/ñ

Clopper-Pearson boundary cases: y = 0 → (0, 1 − (α/2)1/n); y = n → ((α/2)1/n, 1)


Why It Matters / Exam Flags

⚠️ The Wald CI breaks down when p̂ = 0 or p̂ = 1. If all observations are the same type, use Clopper-Pearson or Wilson.

⚠️ Agresti-Coull is always wider than Wilson. Exam questions sometimes ask which is wider by construction.

⚠️ Clopper-Pearson has coverage ≥ 1 − α, never exactly 1 − α (because the binomial is discrete).

⚠️ For a 95% Agresti-Coull, remember the shortcut: add 2 successes and 2 failures, then use p̃ = (Y + 2)/(n + 4).

⚠️ The Wald condition min(np̂, n(1 − p̂)) ≥ 5 is a minimum. Asymptotic CIs are not recommended when this fails.


Practice Q&A

Q: In a study of n = 20 patients, y = 0 experience a side effect. Give a 95% Clopper-Pearson CI for the side-effect rate p.

A: PL = 0, PU = 1 − (0.025)1/20 = 0.168. The 95% CI is (0, 0.168).

Q: Why is the Wald CI inappropriate when p̂ = 0?

A: The estimated standard error √[p̂(1 − p̂)/n] equals zero, so the interval collapses to the single point p̂ = 0 with zero width, which is clearly not a useful interval.

Q: For n = 20, y = 5, compute the Agresti-Coull 95% CI for p.

A: Z0.025 ≈ 1.96. Ỹ = 5 + 1.96²/2 ≈ 5 + 1.92 = 6.92, ñ = 20 + 1.96² ≈ 23.84, p̃ = 6.92/23.84 ≈ 0.290. SE = √[0.290 · 0.710 / 23.84] ≈ 0.0929. CI ≈ 0.290 ± 1.96(0.0929) = (0.108, 0.472).

Q: State one advantage of Wilson over Agresti-Coull, and one advantage of Agresti-Coull over Wilson.

A: Wilson is narrower (better precision). Agresti-Coull is simpler to calculate, which matters in an exam or quick field estimate.


Related Terms / Search Tags

binomial confidence interval, Clopper-Pearson exact interval, Wald interval, Wilson score interval, Agresti-Coull plus-four method, coverage probability for proportion, F-distribution binomial connection, Beta distribution binomial, Jeffreys interval, discrete coverage, proportion CI comparison