How would you construct a confidence interval for the difference between two proportions, and how do you read whether the interval indicates a real difference?
Last updated
Basic Wald form: (p̂1 − p̂2) ± z·√(p̂1(1−p̂1)/n1 + p̂2(1−p̂2)/n2). Variances add because the samples are independent.
Prefer better methods such as Newcombe's (combining two Wilson intervals) or Agresti-Caffo, especially at small n or extreme rates.
If the interval contains 0, no significant difference is detected. If it is entirely positive or negative, there is a real difference in that direction, and you should still judge its practical size.
- https://www.statsmodels.org/v0.14.3/generated/statsmodels.stats.proportion.confint_proportions_2indep.html
- https://search.r-project.org/CRAN/refmans/DescTools/html/BinomDiffCI.html
- https://metricgate.com/docs/difference-of-proportions-ci/
- https://fangya.medium.com/newcombe-wilson-confidence-interval-1939dc8fa8d7
- https://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/diffprop.htm
- https://metricgate.com/docs/newcombe-difference-interval/