# Marginal likelihood

In statistics, a **marginal likelihood function**, or **integrated likelihood**, is a likelihood function in which some parameter variables have been marginalized. In the context of Bayesian statistics, it may also be referred to as the **evidence** or **model evidence**.

## Concept

Given a set of independent identically distributed data points [math]\displaystyle{ \mathbf{X}=(x_1,\ldots,x_n), }[/math] where [math]\displaystyle{ x_i \sim p(x|\theta) }[/math] according to some probability distribution parameterized by [math]\displaystyle{ \theta }[/math], where [math]\displaystyle{ \theta }[/math] itself is a random variable described by a distribution, i.e. [math]\displaystyle{ \theta \sim p(\theta\mid\alpha), }[/math] the marginal likelihood in general asks what the probability [math]\displaystyle{ p(\mathbf{X}\mid\alpha) }[/math] is, where [math]\displaystyle{ \theta }[/math] has been marginalized out (integrated out):

- [math]\displaystyle{ p(\mathbf{X}\mid\alpha) = \int_\theta p(\mathbf{X}\mid\theta) \, p(\theta\mid\alpha)\ \operatorname{d}\!\theta }[/math]

The above definition is phrased in the context of Bayesian statistics. In classical (frequentist) statistics, the concept of marginal likelihood occurs instead in the context of a joint parameter [math]\displaystyle{ \theta = (\psi,\lambda) }[/math], where [math]\displaystyle{ \psi }[/math] is the actual parameter of interest, and [math]\displaystyle{ \lambda }[/math] is a non-interesting nuisance parameter. If there exists a probability distribution for [math]\displaystyle{ \lambda }[/math], it is often desirable to consider the likelihood function only in terms of [math]\displaystyle{ \psi }[/math], by marginalizing out [math]\displaystyle{ \lambda }[/math]:

- [math]\displaystyle{ \mathcal{L}(\psi;\mathbf{X}) = p(\mathbf{X}\mid\psi) = \int_\lambda p(\mathbf{X}\mid\lambda,\psi) \, p(\lambda\mid\psi) \ \operatorname{d}\!\lambda }[/math]

Unfortunately, marginal likelihoods are generally difficult to compute. Exact solutions are known for a small class of distributions, particularly when the marginalized-out parameter is the conjugate prior of the distribution of the data. In other cases, some kind of numerical integration method is needed, either a general method such as Gaussian integration or a Monte Carlo method, or a method specialized to statistical problems such as the Laplace approximation, Gibbs/Metropolis sampling, or the EM algorithm.

It is also possible to apply the above considerations to a single random variable (data point) [math]\displaystyle{ x }[/math], rather than a set of observations. In a Bayesian context, this is equivalent to the prior predictive distribution of a data point.

## Applications

### Bayesian model comparison

In Bayesian model comparison, the marginalized variables are parameters for a particular type of model, and the remaining variable is the identity of the model itself. In this case, the marginalized likelihood is the probability of the data given the model type, not assuming any particular model parameters. Writing [math]\displaystyle{ \theta }[/math] for the model parameters, the marginal likelihood for the model *M* is

- [math]\displaystyle{ p(\mathbf{X}\mid M) = \int p(\mathbf{X}\mid\theta, M) \, p(\theta\mid M) \, \operatorname{d}\!\theta }[/math]

It is in this context that the term *model evidence* is normally used. This quantity is important because the posterior odds ratio for a model *M*_{1} against another model *M*_{2} involves a ratio of marginal likelihoods, the so-called Bayes factor:

- [math]\displaystyle{ \frac{p(M_1\mid \mathbf{X})}{p(M_2\mid \mathbf{X})} = \frac{p(M_1)}{p(M_2)} \, \frac{p(\mathbf{X}\mid M_1)}{p(\mathbf{X}\mid M_2)} }[/math]

which can be stated schematically as

- posterior odds = prior odds × Bayes factor

## See also

- Empirical Bayes methods
- Lindley's paradox
- Marginal probability
- Bayesian information criterion

## References

- Charles S. Bos. "A comparison of marginal likelihood computation methods". In W. Härdle and B. Ronz, editors,
*COMPSTAT 2002: Proceedings in Computational Statistics*, pp. 111–117. 2002.*(Available as a preprint on the web: [1])* - The on-line textbook: Information Theory, Inference, and Learning Algorithms, by David J.C. MacKay.

Original source: https://en.wikipedia.org/wiki/Marginal likelihood.
Read more |