Confidence intervals
Clopper–Pearson interval
Implemented
confidence.clopper_pearsonDefinition
Exact binomial interval obtained by inverting two one-sided binomial tests.
Formula
Lower = B(α/2; k, n − k + 1), Upper = B(1 − α/2; k + 1, n − k)
Inputs and outputs
- successes k
- trials n
- confidence level
Returns: ConfidenceInterval
Assumptions
No assumptions beyond valid, aligned inputs of the documented types.
Limitations
- Conservative: coverage is at least the nominal level, so intervals are wider than necessary.
Python API
import evalsuite as es
es.proportion_ci(8, 10, method="clopper-pearson")References
- Clopper, C. J., & Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26(4), 404–413.