Skip to content
EvalSuite
Documentation menu

Confidence intervals

Wilson score interval

Implementedconfidence.wilson

Definition

Confidence interval for a binomial proportion with good coverage for small samples and extreme proportions.

Formula

(p̂ + z²/2n ± z√(p̂(1 − p̂)/n + z²/4n²)) / (1 + z²/n)

Inputs and outputs

  • successes k
  • trials n
  • confidence level

Returns: ConfidenceInterval

Assumptions

No assumptions beyond valid, aligned inputs of the documented types.

Limitations

No metric-specific limitations are documented yet. Interpret the value alongside the task, data, and other metrics.

Python API

PythonSince v0.1.0
import evalsuite as es

es.proportion_ci(8, 10, method="wilson")
es.accuracy_ci(y_true, y_pred)

References

  1. Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22(158), 209–212.

Implementation status