Marginal Likelihood (Evidence)

Given a model with prior and likelihood , the marginal likelihood (also called evidence, prior predictive density, or model evidence) is the prior-weighted average of the likelihood,

It is the normalizing constant in Bayes’ rule: . It is the probability of the observed data under the model before any is committed to. Three roles:

  1. Hyperparameter estimation (empirical Bayes). Maximizing over tunes the prior to the data. The resulting Type-II MLE is used as a plug-in for unit-level inference. This is the standard way to choose Dirichlet concentrations, Beta-Binomial pseudo-counts, Gaussian-prior variances, or Gaussian-process kernel lengthscales in practice.
  2. Model comparison. The ratio of evidences for two models is the Bayes factor , which Bayesians use to quantify how strongly the data favor one model over another.
  3. Posterior normalization. It is the denominator of Bayes’ rule. In conjugate models it is closed form; in non-conjugate models it is computed by Laplace approximation, bridge sampling, or nested sampling.

Closed-form evidence in conjugate families. When and form a conjugate pair, the evidence has a clean ratio-of-normalizing-constants form. For the Beta-Binomial: . For the Gamma-Poisson: . For the Dirichlet-Multinomial: .

Laplace approximation. When closed form is unavailable,

where is the MAP and the Hessian is evaluated there. See 3.9 Laplace Approximation.

Asymptotic approximation — BIC. For large with a proper prior,

which is the Bayesian Information Criterion. BIC approximates evidence to within an error, giving a fast model-comparison surrogate that trades off fit against dimension.

Prerequisites

Intuition

The marginal likelihood measures how well a model predicts the observed data before any parameters are fit. It is the average likelihood across all parameter values the prior considers plausible. A model that concentrates its prior on values producing the observed data receives high evidence; a model that spreads its prior over regions of parameter space far from the data’s implications receives low evidence, because most of the prior mass is “wasted.”

This produces an automatic Occam-razor effect that no frequentist model-selection criterion gets for free. A flexible model with many parameters can fit almost any dataset, but its prior must spread mass across the whole parameter space — so the prior density at any particular is small. A simpler model has less flexibility but concentrates its prior predictions, so prior density near the truth is larger. The marginal likelihood weighs fit against how sharply the prior had to be tuned to produce that fit, and rewards the model that used its flexibility efficiently. This is the formal content of the 3.3 Bayes Factors “built-in Occam” property.

When the prior has hyperparameters , viewing as a function of yields a standard likelihood function for alone — the “marginal” in marginal likelihood is over . Maximizing this likelihood picks the prior that best explains the observed data, which is the empirical-Bayes recipe. In conjugate models the maximization is analytic; in non-conjugate models it reduces to numerical optimization of a (usually log-concave) function.

Properties

(Prior Predictive) Evidence is literally the prior-averaged likelihood.


This is the probability of before the data is used, with uncertainty about integrated out per the prior. It is not a function of — that has been integrated away. It is a function of (and the observed ). The term “prior predictive density” is sometimes preferred for this reason.

(Closed Form in Conjugate Families) Each conjugate pair has an evidence expression in terms of ratios of normalizing constants.

For the Beta-Binomial:

For the Gamma-Poisson with i.i.d. counts and unit exposure:

For the Normal-Normal with known :

with and the posterior parameters. These closed forms allow Type-II MLE over by simple root-finding.

(Empirical-Bayes Estimator) Maximizing evidence over gives the Type-II MLE.


In the Beta-Binomial hierarchy, the first-order condition involves the digamma function : setting and gives two digamma equations solved numerically by Newton’s method. The Type-II MLE is then used as a plug-in prior; see 3.6 Hierarchical Models.

(Built-in Occam Penalty via BIC) Evidence penalizes model dimension logarithmically via the Laplace approximation.

For a proper prior on with log-likelihood smooth and growing, the Laplace approximation gives

Hence , recovering the BIC. Evidence thus performs model selection that rewards fit and penalizes dimension — an asymptotic surrogate for the full Bayes factor that needs only the MLE and the dimension of . See 3.9 Laplace Approximation and 3.3 Bayes Factors.

(Log-Evidence Decomposes as Prequential Prediction) Total evidence equals the sum of one-step-ahead predictive log-likelihoods.

By the chain rule,

where each term is the posterior-predictive likelihood conditional on all earlier data. This prequential or leave-future-out decomposition is a Bayesian version of cross-validation: the evidence is the cumulative predictive accuracy along the data stream. Two models with comparable overall evidence but different prequential profiles differ in when they predict well — useful diagnostic information.

(Computation in Non-Conjugate Models) Without conjugacy, evidence is computed by Laplace, thermodynamic integration, bridge sampling, or nested sampling.

  • Laplace: ; fast and accurate when posterior is approximately Gaussian. See 3.9 Laplace Approximation.
  • Bridge sampling / thermodynamic integration: interpolate between prior and posterior and integrate; robust for multimodal posteriors.
  • Nested sampling (Skilling 2006): evaluate at decreasing prior-mass levels; standard in astrophysical inference.
  • Harmonic-mean estimator: ; infamous for infinite variance and should not be used without stabilization.

(Evidence Depends on the Prior, Not Just the Likelihood) Unlike the posterior for a well-identified parameter, evidence is sensitive to prior choice.

As the prior width , evidence at rate (the prior spreads mass ever more thinly). Two models with identical likelihoods but different prior widths therefore have different evidences, and the Bayes factor inherits this sensitivity — the source of the Jeffreys-Lindley paradox in 3.3 Bayes Factors. Weakly informative priors, not improper ones, are mandatory for Bayes-factor analyses.

(Marginal Likelihood Under Improper Priors Is Undefined) Model comparison via Bayes factors requires proper priors.

If is improper, the evidence is finite only if the likelihood is integrable in , and the result has no absolute scale. The Bayes factor then inherits an arbitrary scaling constant. Posterior inference within a single model is immune to this (the normalizing constant cancels), but cross-model comparison is not. See the 3.3 Bayes Factors Jeffreys-Lindley discussion for what to do when only improper priors feel principled.

Examples

Derivation

Goal: derive the Laplace approximation for evidence.

The posterior is proportional to , and the evidence is . Write and let be its maximizer (the MAP). Taylor-expanding around to second order:

where is the Hessian (negative definite at a maximum). Exponentiating and integrating:

Since ,

Asymptotic BIC derivation. For i.i.d. observations, where is order 1. Taking logs:

All - and -independent terms are absorbed into a constant; the prior term does not grow with . The dominant terms are and , giving BIC.

See Also