The Confidence Interval for the Difference Between Two Independent Proportions
This page will calculate the lower and upper limits of the 95% confidence interval for the difference between two independent proportions, according to two methods described by Robert Newcombe, both derived from a procedure outlined by E.B.Wilson in 1927 (references below). The first method uses the Wilson procedure without a correction for continuity; the second uses the Wilson procedure with a correction for continuity.

For the notation used here, na and nb represent the total numbers of observations in two samples, A and B; ka and kb represent the numbers of observations within each sample that are of particular interest; and pa and pb represent the proportions ka/na and kb/nb, respectively. Thus, if sample A shows 23 recoveries among 60 patients, na=60, ka=23, and the proportion is pa=23/60=0.3833. If sample B shows 18 recoveries among 72 patients, nb=72, kb=18, and the proportion is pb=18/72=0.2500. The difference between the two proportions is diff=papb= 0.3833–0.2500 =0.1333.

Note that this method is recommended only for the case where papb is equal to or greater than zero. Thus, the sample with the larger proportion should be designated as Sample A and the one with the smaller proportion should be designated as Sample B. To calculate the lower and upper limits of the confidence interval for a difference of this sort, enter the values of k and n for samples A and B in the designated places, then click the «Calculate» button.
Sample A Sample B
ka =
kb =
na =
nb =
pa =
pb =
pa pb =
95% confidence interval: no continuity correction
Lower limit =
Upper limit =
95% confidence interval: including continuity correction
Lower limit =
Upper limit =
Newcombe, Robert G. "Interval Estimation for the Difference Between Independent Proportions: Comparison of Eleven Methods," Statistics in Medicine, 17, 873-890 (1998).

Wilson, E. B. "Probable Inference, the Law of Succession, and Statistical Inference," Journal of the American Statistical Association, 22, 209-212 (1927).

Home Click this link only if you did not arrive here via the VassarStats main page.

©Richard Lowry 2001-
All rights reserved.