Bayes’ rule updates probabilities by combining a prior distribution with a likelihood for the evidence. The result depends on both parts of the model.
Worked example
For an unknown coin probability, a beta prior with parameters one and one gives a uniform density over probabilities from zero to one. After observing eight heads and two tails under independent Bernoulli trials with a fixed probability, the posterior is beta with parameters nine and three. Its mean is nine divided by twelve, or 0.75.
What to check
The posterior mean differs from the observed proportion because the prior contributes information. State the sampling assumptions and the prior when reporting the update. If trials are dependent or the probability changes over time, the simple beta-binomial calculation no longer represents that process directly. Examine how conclusions change under reasonable prior choices. A posterior is conditional on the specified model and evidence.
Continue with the book
Explore the full treatment, worked examples, and exercises in Mathematics for AI and Machine Learning.
Companion article for Mathematics for AI and Machine Learning, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.
