Arte SheetsLearn. Try. Understand.

Statistical & Clinical Analysis

Agresti-Coull Binomial Confidence Interval ("Add 2 Successes & 2 Failures")

Replace erratic small-sample Wald intervals with Alan Agresti and Brent Coull’s (1998) z²-adjusted proportion center p̃ = (x + 0.5*z²) / (n + z²) and 95% confidence bounds.

Why textbook p̂ ± 1.96*SQRT(p̂*(1-p̂)/n) gives a nonsensical [0, 0] interval when x = 0!

Alan Agresti and Brent A. Coull (1998, The American Statistician — "Approximate Is Better than Exact for Interval Estimation of Binomial Proportions") demonstrated that the standard Wald interval suffers catastrophic under-coverage at small n or extreme p, collapsing to zero width when x = 0! By shifting the estimator toward 0.5 using ñ = n + z^2 and p̃ = (x + 0.5 * z^2) / (n + z^2) (at 95% confidence where z = 1.96, z^2 = 3.8416 ≈ 4—giving the famous "Add 2 successes and 2 failures" rule!), near-nominal 95% coverage is restored across all p!

In a Phase I pilot cohort with x = 2 responders out of n = 20 patients (raw p̂ = 0.1000, where naive Wald produces a negative lower bound -0.0315!), Agresti-Coull shifts center to p̃ = 0.1645 and yields clean 95% bounds [0.0157, 0.3132]—and even when x = 0 out of 20, provides a realistic upper 95% safety limit of 0.1898!

Pilot Binomial Sample (n = 20, z = 1.96)Shifted Center p̃Agresti-Coull Lower 95%Agresti-Coull Upper 95%
x = 2 Responders / n = 20 (Raw 10%)0.16450.0157 (Positive!)0.3132
x = 0 Adverse Events / n = 20 (Raw 0%)0.08060.0000 (Clamped)0.1898 (Rule-of-3 Check)
Invalid x < 0, x > n, or n <= 0Error GuardError Guard"Invalid Binomial Sample"

Agresti-Coull Upper Confidence Limit (Clamped to [0, 1])

Computes MIN(1, p̃ + z * SQRT(p̃ * (1 - p̃) / ñ)) from successes x (B2), trials n (B3), and critical z-score (B4 = 1.96).

=IF(OR(B2 < 0, B3 <= 0, B2 > B3, B4 <= 0), "Invalid Binomial Sample", ROUND(MIN(1, ((B2 + 0.5 * (B4 ^ 2)) / (B3 + (B4 ^ 2))) + B4 * SQRT((((B2 + 0.5 * (B4 ^ 2)) / (B3 + (B4 ^ 2))) * (1 - ((B2 + 0.5 * (B4 ^ 2)) / (B3 + (B4 ^ 2))))) / (B3 + (B4 ^ 2)))), 4))

Agresti-Coull Lower Confidence Limit & Adjusted Center p̃

Evaluates MAX(0, p̃ - z * SQRT(p̃ * (1 - p̃) / ñ)), truncated at 0 when x = 0.

=IF(OR(B2 < 0, B3 <= 0, B2 > B3, B4 <= 0), "Invalid Binomial Sample", ROUND(MAX(0, ((B2 + 0.5 * (B4 ^ 2)) / (B3 + (B4 ^ 2))) - B4 * SQRT((((B2 + 0.5 * (B4 ^ 2)) / (B3 + (B4 ^ 2))) * (1 - ((B2 + 0.5 * (B4 ^ 2)) / (B3 + (B4 ^ 2))))) / (B3 + (B4 ^ 2)))), 4))

Try the example

Use the original values or change them to test your understanding.

Further reading