Beta–binomial updating
With a Beta(a, b) prior for a success probability and s successes and f failures, the posterior is Beta(a + s, b + f) — the prior acts like a + b earlier observations.
- unknown success probability
- prior parameters (Beta(1, 1) is uniform); density proportional to
- observed successes and failures
- parameters of the (posterior) Beta distribution
When to use
- Estimating a rate (conversion, defect, response) with uncertainty, especially with small samples or when earlier evidence should count.
- Sequential learning: today's posterior is tomorrow's prior.
Assumptions
- Trials are independent with a common success probability (binomial likelihood).
- The prior is chosen before seeing the data and stated openly; check sensitivity to it.
How to interpret
- The posterior mean is a compromise between the prior mean and the observed proportion, weighted by versus . With lots of data the prior hardly matters.
- The posterior is a full distribution: report its mean or median and a credible interval.
Common mistakes
- Using a strong prior without justification, or hiding it.
- Confusing the prior "pseudo-counts" with real data when reporting n.
- Treating the posterior mean as the observed rate.
Example
12 successes in 40 trials. Uniform prior Beta(1, 1) → posterior Beta(13, 29): mean 0.310, mode 0.300, sd 0.070, 95% equal-tailed credible interval 0.181 to 0.455. A sceptical prior Beta(2, 8) (prior mean 0.2) → Beta(14, 36): mean 0.280, interval 0.166 to 0.411.