Skip to content
LAB 01 / PRIOR + DATA -> POSTERIOR

Revising an unknown success rate, one observation at a time

Add successes and failures one at a time. Which way does the curve for the unknown success rate move, and how does its width change?

← Seven labs / LAB 01
About the prior, likelihood, and posterior

Combine a starting distribution with observations

The prior distribution expresses which success rates seem plausible before observing the data. The likelihood expresses how well each possible success rate explains what was observed.

Multiply the two and normalize the area to one to obtain the posterior distribution. Its mean gives one summary, while its width shows how much uncertainty remains.

Add successes and failures to update the distribution

A prior strength of 10 corresponds to hypothetical weights of five successes and five failures. These are not actual observations.
Prior distribution Likelihood (relative scale) Posterior distribution 95% credible intervalDotted line: previous posterior (appears when data change)

The horizontal axis p is the unknown success rate; the vertical axis is probability density. The dashed likelihood is rescaled only for comparing shapes.

See predictions under these observations →

Posterior mean - 95% credible interval - Prediction for the next trial - Prior strength -
Prior distribution Hypothetical success weight 5 / failure weight 5
×
Likelihood (relative scale) Weight by the data
→
Posterior distribution Appears after updating
Data -

Does the interval always narrow as data accumulate?

When the prior and data disagree strongly, adding a success or failure can temporarily widen the 95% credible interval. Compare the before and after widths using the two horizontal bars.