Skip to content
EvalSuite
Documentation menu

Confidence intervals

Clopper–Pearson interval

Implementedconfidence.clopper_pearson

Definition

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

PythonSince v0.1.0
import evalsuite as es

es.proportion_ci(8, 10, method="clopper-pearson")

References

  1. 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.

Implementation status