Barak 0.3.2 documentation

barak.stats.binomial_confidence_interval

«  barak.spec.writesp   ::   Contents   ::   barak.stats.binomial_min_max_limits  »

barak.stats.binomial_confidence_interval

barak.stats.binomial_confidence_interval(conf, ntrial, nsuccess)[source]

Find the binomial confidence level.

Parameters :

conf: float :

Confidence level in percent (95, 90, 68.3% or similar).

ntrial: int :

The number of trials.

nsuccess: int :

The number of successes from the trials. If 0, then return the 1-sided upper limit.

Returns :

plo, phi : floats

The two-sided confidence interval: probabilities such that >= observed number of successes occurs in fewer than conf% of cases (plo), and prob such that <= number of success occurs in fewer than conf% of cases (phi).

«  barak.spec.writesp   ::   Contents   ::   barak.stats.binomial_min_max_limits  »