ArticleslgStudy

mathematics

Likelihood function

Likelihood function 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 Likelihood function rather than just read about it. In short: A likelihood function (often simply called the likelihood) gives the relative merit of various statistical models for describing a data set. Often the models being compared are parameterized by a parameter, with the parameter often written as θ, or they are parameterized by multiple parameters given as the components of a vector.

Likelihood function — main illustration
Likelihood function — illustration

Key takeaways

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

Reference excerpt

A likelihood function (often simply called the likelihood) gives the relative merit of various statistical models for describing a data set. Often the models being compared are parameterized by a parameter, with the parameter often written as θ, or they are parameterized by multiple parameters given as the components of a vector. For a probability function (or probability density function) Pr[x | θ] that gives the probability (or probability density) of data x for a given model-specifying parameter θ, the likelihood is any function of θ equal to cPr[x | θ] for some positive value c. In maximum likelihood estimation, the model parameter(s) or argument that maximizes the likelihood function serves as a point estimate for the unknown parameter, while the Fisher information (often approximated by the likelihood's Hessian matrix at the maximum) gives an indication of the estimate's precision. In contrast, in Bayesian statistics, the estimate of interest is the converse of the likelihood, the so-called posterior probability of the parameter given the observed data, which is calculated via Bayes' rule.

Definition

The likelihood function, parameterized by a (possibly multivariate) parameter θ, is usually defined differently for discrete and continuous probability distributions (a more general definition is discussed below). Given a probability density or mass function x↦f(x∣θ), where x is a realization of the random variable X, the likelihood function is θ↦f(x∣θ), often written ℒ(θ∣x). In other words, when f(x∣θ) is viewed as a function of x with θ fixed, it is a probability density function, and when viewed as a function of θ with x fixed, it is a likelihood function. In the frequentist paradigm, the notation f(x∣θ) is often avoided and instead f(x;θ) or f(x,θ) are used to indicate that θ is regarded as a fixed unknown quantity rather than as a random variable being conditioned on. The likelihood function does not specify the probability that θ is the truth, given the observed sample X=x. Such an interpretation is a common error, with potentially disastrous consequences (see prosecutor's fallacy).

Discrete probability distribution Let X be a discrete random variable with probability mass function p depending on a parameter θ. Then the function ℒ(θ∣x)=pθ(x)=Pθ(X=x)=Pr{X=x∣Θ=θ}, considered as a function of θ, a possible value of the deterministic but unknown parameter Θ, is the likelihood function, given the outcome x of the random variable X. Sometimes the probability of "the value x of X for the parameter value θ" is written as P(X = x | θ) or P(X = x; θ). The likelihood is the probability that a particular outcome x is observed when the true value of the parameter is θ, equivalent to the probability mass on x; it is not a probability density over the parameter θ. The likelihood, ℒ(θ∣x), should not be confused with P(θ∣x), which is the posterior probability of θ given the data x.

Example

Consider a simple statistical model of a coin flip: a single parameter pH that expresses the "fairness" of the coin. The parameter is the probability that a coin lands heads up ("H") when tossed. pH can take on any value within the range 0.0 to 1.0. For a perfectly fair coin, pH=0.5. Imagine flipping a fair coin twice, and observing two heads in two tosses ("HH"). Assuming that each successive coin flip is i.i.d., then the probability of observing HH is P(HH∣pH=0.5)=0.52=0.25. Equivalently, the likelihood of observing "HH" assuming pH=0.5 is ℒ(pH=0.5∣HH)=0.25. This is not the same as saying that P(pH=0.5∣HH)=0.25, a conclusion which could only be reached via Bayes' theorem given knowledge about the marginal probabilities P(pH=0.5) and P(HH). Now suppose that the coin is not a fair coin, but instead that pH=0.3. Then the probability of two heads on two flips is P(HH∣pH=0.3)=0.32=0.09. Hence ℒ(pH=0.3∣HH)=0.09. More generally, for each value of pH, we can calculate the corresponding likelihood. The result of such calculations is displayed in Figure 1. The integral of ℒ over [0, 1] is 1/3; likelihoods need not integrate or sum to one over the parameter space.

Continuous probability distribution Let X be a random variable following an absolutely continuous probability distribution with density function f (a function of x) which depends on a parameter θ. Then the function ℒ(θ∣x)=fθ(x), considered as a function of θ, is the likelihood function (of θ, given the outcome X=x). Again, ℒ is not a probability density or mass function over θ, despite being a function of θ given the observation X=x.

Relationship between the likelihood and probability density functions

The use of the probability density in specifying the likelihood function above is justified as follows. Given an observation xj, the likelihood for the interval [xj,xj+h], where h>0 is a constant, is given by ℒ(θ∣x∈[xj,xj+h]). Observe that argmaxθℒ(θ∣x∈[xj,xj+h])=argmaxθ1hℒ(θ∣x∈[xj,xj+h]), since h is positive and constant. Because argmaxθ1hℒ(θ∣x∈[xj,xj+h])=argmaxθ1hPr⁡(xj≤x≤xj+h∣θ)=argmaxθ1h∫xjxj+hf(x∣θ)dx, where f(x∣θ) is the probability density function, it follows that argmaxθℒ(θ∣x∈[xj,xj+h])=argmaxθ1h∫xjxj+hf(x∣θ)dx. The first fundamental theorem of calculus provides that limh→0+1h∫xjxj+hf(x∣θ)dx=f(xj∣θ). Then argmaxθℒ(θ∣xj)=argmaxθ[limh→0+ℒ(θ∣x∈[xj,xj+h])]=argmaxθ[limh→0+1h∫xjxj+hf(x∣θ)dx]=argmaxθf(xj∣θ). Therefore, argmaxθℒ(θ∣xj)=argmaxθf(xj∣θ), and so maximizing the probability density at xj amounts to maximizing the likelihood of the specific observation xj.

In general In measure-theoretic probability theory, the density function is defined as the Radon–Nikodym derivative of the probability distribution relative to a common dominating measure. The likelihood function is this density interpreted as a function of the parameter, rather than the random variable. Thus, we can construct a likelihood function for any distribution, whether discrete, continuous, a mixture, or otherwise. (Likelihoods are comparable, e.g. for parameter estimation, only if they are Radon–Nikodym derivatives with respect to the same dominating measure.) The above discussion of the likelihood for discrete random variables uses the counting measure, under which the probability density at any outcome equals the probability of that outcome.

… excerpt ends here. Continue reading the full article.

Illustrations

Likelihood function: Figure 1. The likelihood function (pH2) for the probability of a coin landing heads-up (without prior knowledge of the coin's fairness), given that we have observed HH.
Figure 1. The likelihood function (pH2) for the probability of a coin landing heads-up (without prior knowledge of the coin's fairness), given that we have observed HH.
Likelihood function: Figure 2. The likelihood function (pH2(1−pH)) for the probability of a coin landing heads-up (without prior knowledge of the coin's fairness), given that we have observed HHT.
Figure 2. The likelihood function (pH2(1−pH)) for the probability of a coin landing heads-up (without prior knowledge of the coin's fairness), given that we have observed HHT.

Worked examples

Example 1 — a first encounter with Likelihood function

Start with the simplest possible case. Write down what Likelihood function 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 Likelihood function 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 Likelihood function 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 Likelihood function

In research
Likelihood function 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 Likelihood function 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
Likelihood function is common in secondary-school and first-year university syllabi. It links to neighbouring topics Bayesian statistics, Likelihood, so understanding it makes those chapters shorter.
In everyday life
Look for Likelihood function 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 “Likelihood function” →

How to study Likelihood function in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Likelihood function 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 Likelihood function out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Likelihood function in simple terms?

A likelihood function (often simply called the likelihood) gives the relative merit of various statistical models for describing a data set. Often the models being compared are parameterized by a parameter, with the parameter often written as θ, or they are parameterized by multiple parameters give…

Why does Likelihood function 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 Likelihood function?

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 Likelihood function.

Tags

  • Bayesian statistics
  • Likelihood

Keep exploring