bayesplain.frequentist.one_proportion

bayesplain.frequentist.one_proportion(successes, n, p0=0.5, level=0.95)[source]

Exact binomial test and Wilson score interval for one proportion.

Uses the exact binomial test rather than the normal approximation, and the Wilson score interval rather than the Wald interval, because both behave sensibly at the small samples and extreme rates that real planning data routinely produce.

Parameters:
successes : int

Number of successes observed.

n : int

Number of trials.

p0 : float, default 0.5

Null value for the rate.

level : float, default 0.95

Confidence level for the interval.

Returns:

The conventional result for this data.

Return type:

FrequentistTwin