ArticleslgStudy

mathematics

Marginal likelihood

Marginal likelihood is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Marginal likelihood rather than just read about it. In short: 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.

Marginal likelihood — main illustration
Marginal likelihood — illustration

Key takeaways

  • Marginal likelihood belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Marginal likelihood to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Marginal likelihood from memory before moving on to harder problems.

Reference excerpt

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.

Concept Given a set of independent identically distributed data points X = ( x 1 , … , x n ) , {\displaystyle \mathbf {X} =(x_{1},\ldots ,x_{n}),} where x i ∼ p ( x | θ ) {\displaystyle x_{i}\sim p(x|\theta )} according to some probability distribution parameterized by θ {\displaystyle \theta } , where θ {\displaystyle \theta } itself is a random variable described by a distribution, i.e. θ ∼ p ( θ ∣ α ) , {\displaystyle \theta \sim p(\theta \mid \alpha ),} the marginal likelihood in general asks what the probability p ( X ∣ α ) {\displaystyle p(\mathbf {X} \mid \alpha )} is, where θ {\displaystyle \theta } has been marginalized out (integrated out):

p ( X ∣ α ) = ∫ θ p ( X ∣ θ ) p ( θ ∣ α ) d θ {\displaystyle p(\mathbf {X} \mid \alpha )=\int _{\theta }p(\mathbf {X} \mid \theta )\,p(\theta \mid \alpha )\ \operatorname {d} \!\theta }

The above definition is phrased in the context of Bayesian statistics in which case p ( θ ∣ α ) {\displaystyle p(\theta \mid \alpha )} is called prior density and p ( X ∣ θ ) {\displaystyle p(\mathbf {X} \mid \theta )} is the likelihood. Recognizing that the marginal likelihood is the normalizing constant of the Bayesian posterior density p ( θ ∣ X , α ) {\displaystyle p(\theta \mid \mathbf {X} ,\alpha )} , one also has the alternative expression

p ( X ∣ α ) = p ( X ∣ θ , α ) p ( θ ∣ α ) p ( θ ∣ X , α ) {\displaystyle p(\mathbf {X} \mid \alpha )={\frac {p(\mathbf {X} \mid \theta ,\alpha )p(\theta \mid \alpha )}{p(\theta \mid \mathbf {X} ,\alpha )}}}

which is an identity in θ {\displaystyle \theta } . The marginal likelihood quantifies the agreement between data and prior in a geometric sense made precise via Hilbert spaces in de Carvalho et al. (2019). In classical (frequentist) statistics, the concept of marginal likelihood occurs instead in the context of a joint parameter θ = ( ψ , λ ) {\displaystyle \theta =(\psi ,\lambda )} , where ψ {\displaystyle \psi } is the actual parameter of interest, and λ {\displaystyle \lambda } is a non-interesting nuisance parameter. If there exists a probability distribution for λ {\displaystyle \lambda } , it is often desirable to consider the likelihood function only in terms of ψ {\displaystyle \psi } , by marginalizing out λ {\displaystyle \lambda } :

L ( ψ ; X ) = p ( X ∣ ψ ) = ∫ λ p ( X ∣ λ , ψ ) p ( λ ∣ ψ ) d λ {\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 }

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Marginal likelihood

Start with the simplest possible case. Write down what Marginal likelihood claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Marginal likelihood before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Marginal likelihood ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Marginal likelihood

In research
Marginal likelihood appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Marginal likelihood in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Marginal likelihood is common in secondary-school and first-year university syllabi. It links to neighbouring topics Bayesian statistics, so understanding it makes those chapters shorter.
In everyday life
Look for Marginal likelihood outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Marginal likelihood” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Marginal likelihood in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Marginal likelihood means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Marginal likelihood out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Marginal likelihood in simple terms?

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 the…

Why does Marginal likelihood matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Marginal likelihood?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Marginal likelihood.

Tags

  • Bayesian statistics

Keep exploring