Marginal likelihood

Revision as of 00:14, 21 February 2025 by imported>Accgcc (→‎Concept)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description Template:Bayesian statistics A marginal likelihood is a likelihood function that has been integrated over the parameter space. In Bayesian statistics, it represents the probability of generating the observed sample for all possible values of the parameters; it can be understood as the probability of the model itself and is therefore often referred to as model evidence or simply evidence.

Due to the integration over the parameter space, the marginal likelihood does not directly depend upon the parameters. If the focus is not on model comparison, the marginal likelihood is simply the normalizing constant that ensures that the posterior is a proper probability. It is related to the partition function in statistical mechanics.<ref>Template:Cite book</ref>

ConceptEdit

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

<math>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 which case <math>p(\theta\mid\alpha)</math> is called prior density and <math>p(\mathbf{X}\mid\theta)</math> is the likelihood. Recognizing that the marginal likelihood is the normalizing constant of the Bayesian posterior density <math>p(\theta\mid\mathbf{X},\alpha)</math>, one also has the alternative expression<ref>Template:Cite journal</ref>

<math>p(\mathbf{X} \mid \alpha) = \frac{p(\mathbf{X} \mid \theta, \alpha) p(\theta \mid \alpha)}{p(\theta \mid \mathbf{X}, \alpha)}</math>

which is an identity in <math>\theta</math>. The marginal likelihood quantifies the agreement between data and prior in a geometric sense made preciseTemplate:How in de Carvalho et al. (2019). In classical (frequentist) statistics, the concept of marginal likelihood occurs instead in the context of a joint parameter <math>\theta = (\psi,\lambda)</math>, where <math>\psi</math> is the actual parameter of interest, and <math>\lambda</math> is a non-interesting nuisance parameter. If there exists a probability distribution for <math>\lambda</math>{{ safesubst:#invoke:Unsubst||date=__DATE__ |$B= Template:Fix }}, it is often desirable to consider the likelihood function only in terms of <math>\psi</math>, by marginalizing out <math>\lambda</math>:

<math>\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>x</math>, rather than a set of observations. In a Bayesian context, this is equivalent to the prior predictive distribution of a data point.

ApplicationsEdit

Bayesian model comparisonEdit

In Bayesian model comparison, the marginalized variables <math>\theta</math> are parameters for a particular type of model, and the remaining variable <math>M</math> 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>\theta</math> for the model parameters, the marginal likelihood for the model M is

<math> 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 M1 against another model M2 involves a ratio of marginal likelihoods, called the Bayes factor:

<math> \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 alsoEdit

Template:No footnotes

ReferencesEdit

Template:Reflist

Further readingEdit