Intervals for proportions

Section of Estimation examples, part of Data analysis

Intervals for proportions

Type Section
Taught in Estimation examples
Part Data analysis

For a count X\sim\operatorname{Bin}(n,p), the Wald interval \widehat p\pm z_{1-\alpha/2}\sqrt{\widehat p(1-\widehat p)/n} is reasonable when there are at least 5 successes and 5 failures. In a poll of 1000 voters, 227 support a party: \widehat p=0.227, comfortably above the threshold, and the 95% interval is (0.20,\ 0.25). For two groups, the interval for p_X-p_Y adds the two variances. For the nightmare survey, 55 of 160 men and 60 of 192 women, it is (-0.067,\ 0.130).

R’s prop.test does these calculations, but by default it applies a continuity correction, which widens the interval slightly:

prop.test(c(55, 60), c(160, 192), correct = FALSE)$conf.int   # -0.067  0.130

With correct = FALSE it reproduces the Wald interval for a difference.

Key idea

An estimate is a number; its interval says how far it could plausibly be from the parameter. Use the t quantile for a small normal sample, the normal quantile for a large one, Welch’s interval when two variances may differ, and check the success and failure counts before trusting an interval for a proportion.

Used in

See also

Margin of error · Welch interval · From data to an estimate · Large-sample intervals · Small normal samples · Two samples with unequal variances · Wilcoxon rank-sum test

Glossary and index