Maximum likelihood trusts the data completely — four flips is a tiny sample, and MLE will happily report off of it. What if you walked in already believing tails were a bit more likely?
The faint curve is the plain likelihood from the flips alone; the bold curve adds in a tails-favoring prior. Dial the prior's strength up and watch the bold curve's peak slide away from the faint curve's — that gap is the prior's influence.
Bayes' rule turns a likelihood into a posterior by multiplying in a prior belief over the parameter itself. The MAP estimate maximizes that posterior instead of the raw likelihood:
- — the maximum a posteriori estimate.
- — the data likelihood, same as in plain MLE.
- — the prior density over , encoding belief held before seeing any data.
Using a Beta prior — encoded as imagined extra heads and imagined extra tails — gives a closed form that looks just like the MLE with pseudo-counts folded in:
- — the prior's pseudo-counts: imagined extra heads and tails, respectively.
- — the actually observed heads and total flips, exactly as in MLE.
- A uniform prior (α=β=1) reduces exactly to MLE
Plug in and the pseudo-counts vanish: .
- MAP is a compromise, not a replacement
always sits between the prior's own mean and the MLE — more data pulls it toward the MLE; a stronger prior pulls it toward the prior mean.
- The normalizing constant never matters
The true posterior divides by , but that constant doesn't depend on , so it can never change where the maximum sits — only the unnormalized numerator matters for MAP.
At strength 0 the two peaks coincide exactly — an uninformative prior changes nothing. Every notch up adds more imagined tails-observations, and the MAP estimate keeps sliding toward the prior's own mean.
Same four flips as the MLE chapter's toy — H, H, H, T, so , — now with a Beta() prior.
- The MLE, ignoring the prior entirely
- Apply the MAP closed form
- Compare to the prior's own mean
The prior alone believes . The MAP estimate, , lands exactly between that prior belief and the MLE's — pulled by the prior, not overridden by it.
3 heads out of 4 flips, with a Beta(α=2, β=4) prior (mean 0.333). What is the MAP estimate of p?
MAP estimation is MLE with a built-in regularizer: prior pseudo-counts act exactly like extra observations, pulling small-sample estimates back toward a belief you held before seeing any data — the same mechanism that shows up later as L2 regularization's Gaussian prior on weights.