Applications: Bayesian Inference, Information & Simulation

the prior, likelihood, and posterior

These three are the cast of every Bayesian update, and the cleanest way to keep them straight is by what each is a function of and what it represents. The prior is your belief about the unknown before data. The likelihood is the data's verdict on each possible value of the unknown. The posterior is your belief about the unknown after the data has spoken. Bayesian inference is nothing but the rule that turns the first two into the third.

Be precise about each. The prior p(theta) is an honest probability distribution over the unknown theta — it integrates to 1 and you can sample from it. The likelihood L(theta) = p(data given theta) is the SAME formula as a probability of the data, but now you hold the data fixed and let theta vary; that flip is the whole point, and it is why the likelihood is a function of theta and NOT a probability distribution over theta (it need not integrate to 1). The posterior p(theta given data) is again a genuine distribution over theta, obtained by posterior proportional to likelihood times prior and then normalized. A useful mental picture: the prior is a soft hill over theta, the likelihood is a second hill carved by the data, and multiplying them point by point produces the posterior hill, which sits wherever both agree and is narrower than either.

Two confusions are worth heading off. First, the likelihood is not 'the probability that theta is true' — theta is fixed in the frequentist reading and the likelihood is the probability of the data given that theta, read as a function of theta. Second, with little data the posterior leans on the prior, and with abundant data the posterior leans on the likelihood; neither dominates universally, and watching that balance shift as data grows is exactly how you sanity-check a Bayesian model.

Estimating a basketball player's true free-throw rate p: a prior centered at 0.75 (the league average) says 'probably a good shooter'. She then makes 9 of 10. The likelihood (proportional to p^9 times (1-p)^1) peaks at 0.9. The posterior, the product renormalized, sits between — near 0.82 — reflecting both the prior wisdom and the fresh, small sample.

Multiply prior by likelihood, normalize, and you get the posterior — the updated belief.

The likelihood is a function of theta, not a probability distribution over theta — it generally does not integrate to 1, and reading it as 'the probability theta is true' is a common error.

Also called
prior distributionposterior distribution先驗分布後驗分布概似函數