A python package for binomial confidence intervals
Pynomial (pronounced like “binomial”) is a lightweight python library for implementing the many confidence intervals for the risk parameter of a binomial model. Pynomial is more or less a python port of the R library {binom}
by Sundar Dorai-Raj. As a point of philosophy and until otherwise stated, if {binom}
does a thing then so should pynomial (e.g. error throwing or handling cases when the number of successes is the same as the number of trials).
The following confidence intervals are implemented:
-
The asymptotic interval based on the central limit theorem (this is the interval you probably see in most statistics textbooks)
-
An equal tailed posterior credible interval using a conjugate Beta