Compute the confidence interval for a set of Bernoulli trials
Most, if not all, implemented methods assume statistical independence of the Bernoulli trial outcomes. Computed confidence intervals may be invalid if this condition is violated.
This is a re-implementation of Matlab code originally written by Anderson Winkler and Tom Nichols.
Parameters : | n : int
X : int or array
alpha : float
meth : {‘wald’, ‘wilson’, ‘agresti-coull’, ‘jeffreys’, ‘clopper-pearson’, ‘arc-sine’, ‘logit’, ‘anscombe’}
|
---|---|
Returns : | 2-item array or 2D array :
|
References
[R18] | Brown LD, Cai TT, DasGupta AA. Interval estimation for a binomial proportion. Statistical Science. 2001 16(2):101-133. http://brainder.org/2012/04/21/confidence-intervals-for-bernoulli-trials |