The likelihood function: construction, interpretation and proportionality

The same formula, read the other way round

Start from the joint probability model for a sample. If X1,…,XnX_1,\dots,X_n are independent with common probability mass or density function f(x∣θ)f(x\mid\theta), the joint model is


f(x1,…,xn∣θ)=∏i=1nf(xi∣θ)f(x_1,\dots,x_n\mid\theta) = \prod_{i=1}^{n} f(x_i\mid\theta)


Read as a function of the data with θ\theta fixed, this is a probability distribution: it is non-negative and it sums or integrates to 1 over the sample space. The likelihood function is the very same expression read the other way round, the data are fixed at the values actually observed, and θ\theta is the argument:


L(θ)=∏i=1nf(xi∣θ),θ∈ΘL(\theta) = \prod_{i=1}^{n} f(x_i\mid\theta), \qquad \theta \in \Theta


No new formula has appeared. What has changed is which symbol is the variable, and that change is the whole idea.


L(θ)L(\theta) answers the question: what joint probability mass or density value would the model assign to the data I actually saw, had the parameter been θ\theta? Comparing LL at two candidate values compares how well each explains the observations.

Three properties that are easy to get wrong

  • The likelihood is not a probability distribution over θ\theta. It is not required that ∫ΘL(θ) dθ=1\int_{\Theta} L(\theta)\,d\theta=1. For example, observing x=0x=0 from a Poisson(λ)\mathrm{Poisson}(\lambda) model gives L(λ)=e−λL(\lambda)=e^{-\lambda}, and ∫0∞e−λ dλ=1\int_0^\infty e^{-\lambda}\,d\lambda=1; this incidental normalization does not make LL a probability distribution over λ\lambda. L(0.3)=0.002L(0.3) = 0.002 does not mean the parameter has probability 0.002 of being 0.3. Turning a likelihood into a distribution over θ\theta requires a prior and Bayes' theorem, which is a different framework with an additional ingredient.
  • The likelihood matters only up to a positive multiplicative constant. Any factor that does not involve θ\theta cancels out of every comparison, so L(θ)L(\theta) and c L(θ)c\,L(\theta) carry identical information about θ\theta. This is why binomial coefficients and Poisson factorials are routinely dropped, and why writing L(θ)∝θs(1−θ)n−sL(\theta) \propto \theta^{s}(1-\theta)^{n-s} is perfectly rigorous.
  • The likelihood is a function, not a number. ‘The likelihood’ of a model is the whole curve over Θ\Theta. Reporting a single value is reporting the curve at one point.

The log-likelihood

Products of many small numbers underflow and are awkward to manipulate, so one almost always works with


ℓ(θ)=ln⁡L(θ)=∑i=1nln⁡f(xi∣θ)\ell(\theta) = \ln L(\theta) = \sum_{i=1}^{n} \ln f(x_i\mid\theta)


Because ln⁡\ln is strictly increasing, ℓ\ell orders candidate parameter values exactly as LL does: if ℓ(θ1)>ℓ(θ2)\ell(\theta_1) \gt \ell(\theta_2) then L(θ1)>L(θ2)L(\theta_1) \gt L(\theta_2). Multiplicative constants in LL become additive constants in ℓ\ell, so a log-likelihood is likewise defined only up to an added constant, and phrases like ‘up to an additive constant’ signal that such terms have been discarded.


A difference of log-likelihoods is the logarithm of a likelihood ratio, ℓ(θ1)−ℓ(θ2)=ln⁡ ⁣(L(θ1)/L(θ2))\ell(\theta_1)-\ell(\theta_2) = \ln\!\big(L(\theta_1)/L(\theta_2)\big). Likelihood ratios and log-likelihood differences compare candidate values; the maximizing parameter value and relative shape of the curve are also meaningful. Absolute likelihood magnitudes depend on scaling.

Building a likelihood: the recipe

  1. Write the pmf or pdf for one observation, keeping θ\theta symbolic.
  2. Write the joint pmf or pdf; under independence, form it by multiplying the individual contributions.
  3. Substitute the observed numbers, so that only θ\theta remains free.
  4. Collect the data into sufficient summaries where possible, a count of successes, a sum, a sum of squares.
  5. Take logarithms and drop any term free of θ\theta, if a log-likelihood is wanted.

Worked example: Bernoulli data

Ten independent trials with success probability pp yield 7 successes and 3 failures. Each success contributes a factor pp and each failure a factor 1−p1-p, so


L(p)=p7(1−p)3,ℓ(p)=7ln⁡p+3ln⁡(1−p)L(p) = p^{7}(1-p)^{3}, \qquad \ell(p) = 7\ln p + 3\ln(1-p)


Evaluate at two candidates. At p=0.5p = 0.5: L=0.510=9.766×10−4L = 0.5^{10} = 9.766\times10^{-4}. At p=0.7p = 0.7: L=0.77(0.3)3=0.082354×0.027=2.2236×10−3L = 0.7^{7}(0.3)^{3} = 0.082354 \times 0.027 = 2.2236\times10^{-3}.


The ratio is L(0.7)/L(0.5)=2.2236×10−3/9.766×10−4=2.277L(0.7)/L(0.5) = 2.2236\times10^{-3} / 9.766\times10^{-4} = 2.277. The data are about 2.3 times more probable under p=0.7p = 0.7 than under p=0.5p = 0.5, so p=0.7p=0.7 is better supported, but note what this does not say.


It does not say p=0.7p = 0.7 is 2.3 times as likely to be true, and it does not identify the best-supported value in the whole parameter space.


Finding that maximiser is the subject of maximum likelihood estimation; constructing and reading the function is the subject here.


Had the binomial coefficient (107)=120\binom{10}{7} = 120 been included, both values would be multiplied by 120 and the ratio 2.277 would be unchanged. That is the proportionality property in action.

Worked example: a continuous model

For nn independent Exponential(θ)\mathrm{Exponential}(\theta) observations, parameterised by rate so that f(x∣θ)=θe−θxf(x\mid\theta) = \theta e^{-\theta x} for x>0x \gt 0,


L(θ)=∏i=1nθe−θxi=θne−θ∑xi,ℓ(θ)=nln⁡θ−θ∑xiL(\theta) = \prod_{i=1}^{n}\theta e^{-\theta x_i} = \theta^{n}e^{-\theta\sum x_i}, \qquad \ell(\theta) = n\ln\theta - \theta\sum x_i


The data enter only through nn and ∑xi\sum x_i. For continuous models L(θ)L(\theta) is built from densities, so its values are not probabilities and may exceed 1; multiplying the likelihood by a positive scale changes its absolute magnitude but leaves likelihood ratios and the maximizing parameter unchanged.



A sample x1,…,xnx_1,\dots,x_n has been observed from a model with unknown parameter θ\theta, and the likelihood function L(θ)L(\theta) has been formed. Which statement correctly describes what L(θ)L(\theta) is?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Twelve independent Bernoulli trials, each with success probability pp, produce 5 successes. The likelihood function for these data is

L(p)=p5(1−p)7L(p) = p^{5}(1-p)^{7}

Evaluate L(0.4)L(0.4). Give your answer to at least three significant figures.

Give your answer as a number.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Four independent observations are drawn from a Poisson distribution with mean λ\lambda, giving the counts 3,1,4,23, 1, 4, 2. Recall that the Poisson pmf is f(x∣λ)=e−λλx/x!f(x\mid\lambda) = e^{-\lambda}\lambda^{x}/x!.

Write the log-likelihood up to an additive constant that does not involve λ\lambda. Then, using the representative obtained by dropping all terms independent of λ\lambda (equivalently, setting the additive constant to zero), evaluate it at λ=2\lambda = 2.

Give your answer in log-likelihood units.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors