Bayes Rule
Bayes rule relates prior belief, likelihood, evidence, and posterior belief.
where:
- is the prior.
- is the likelihood.
- is the evidence or marginal likelihood.
- is the posterior.
The same rule can be read as a proportionality:
because does not depend on . This is often the most useful view when comparing candidate latent states or parameters.
The evidence marginalizes over latent states:
or, for continuous latent variables:
Conditional Form
With additional context , Bayes rule becomes:
This is the form behind conditional generative models, prompt-conditioned prediction, and structure-conditioned molecular modeling.
MAP Estimate
The maximum a posteriori estimate chooses the most likely latent state or parameter after observing data:
The likelihood term rewards explaining the observation. The prior term encodes assumptions before seeing the observation.
Log Form
Bayes rule is often used in log space:
For optimization over , the evidence term can be dropped because it is constant with respect to :
This is the bridge between Bayesian notation and regularized objective functions.
Odds Form
For two hypotheses and :
The posterior odds equal likelihood ratio times prior odds. This form is useful for reading classifier calibration, diagnostic tests, and evidence updates.
Posterior Predictive
Bayesian prediction averages over posterior uncertainty:
Practical ML systems often approximate this integral with ensembles, variational distributions, dropout approximations, or calibrated point estimates.
Why It Matters
- Latent-variable models infer hidden causes from observations.
- Uncertainty estimation often asks for posterior distributions.
- Bayesian framing separates prior assumptions from evidence.
- MAP estimation connects priors to regularized optimization.
- Many practical ML systems approximate Bayesian reasoning without doing exact inference.
- Posterior uncertainty can be more informative than a single best prediction.
Checks
- What is observed and what is latent?
- Is the prior explicit, learned, or implicit?
- Is posterior inference exact, approximate, amortized, or ignored?
- Does the uncertainty estimate reflect data uncertainty, model uncertainty, or both?
- Is the reported prediction a posterior mean, MAP estimate, sample, or calibrated score?
- Is the evidence term estimated, ignored, or only used for normalization?
- Are posterior probabilities calibrated against held-out outcomes?