# Likelihood function

Short description: Function related to statistics and probability theory

The likelihood function (often simply called the likelihood) describes the joint probability of the observed data as a function of the parameters of the chosen statistical model.[1] For each specific parameter value $\displaystyle{ \theta }$ in the parameter space, the likelihood function $\displaystyle{ p(X|\theta) }$ therefore assigns a probabilistic prediction to the observed data $\displaystyle{ X }$. Since it is essentially the product of sampling densities, the likelihood generally encapsulates both the data-generating process as well as the missing-data mechanism that produced the observed sample.

To emphasize that the likelihood is a function (although not a probability density function) of the parameters,[lower-alpha 1] while the sample is taken as given, it is often written as $\displaystyle{ \mathcal{L}(\theta\mid X) }$. According to the likelihood principle, all of the information a given sample provides about $\displaystyle{ \theta }$ is expressed in the likelihood function.[2] In maximum likelihood estimation, the value which maximizes the probability of observing the given sample, i.e. $\displaystyle{ \hat{\theta} = \operatorname{argmax}_{\theta \in \Theta} \mathcal{L}(\theta\mid X) }$, serves as a point estimate for the parameter of the distribution from which the sample was drawn. Meanwhile in Bayesian statistics, the likelihood function serves as the conduit through which sample information influences $\displaystyle{ p(\theta\mid X) }$, the posterior probability of the parameter, via Bayes' rule.[3]

## Definition

The likelihood function is usually defined differently for discrete and continuous probability distributions. A general definition is also possible, as discussed below.

### Discrete probability distribution

Let $\displaystyle{ X }$ be a discrete random variable with probability mass function $\displaystyle{ p }$ depending on a parameter $\displaystyle{ \theta }$. Then the function

$\displaystyle{ \mathcal{L}(\theta \mid x) = p_\theta (x) = P_\theta (X=x), }$

considered as a function of $\displaystyle{ \theta }$, is the likelihood function, given the outcome $\displaystyle{ x }$ of the random variable $\displaystyle{ X }$. Sometimes the probability of "the value $\displaystyle{ x }$ of $\displaystyle{ X }$ for the parameter value $\displaystyle{ \theta }$ " is written as P(X = x | θ) or P(X = x; θ). The likelihood is equal to the probability that a particular outcome $\displaystyle{ x }$ is observed when the true value of the parameter is $\displaystyle{ \theta }$, it is equal to the probability density over $\displaystyle{ x }$, it is not a probability density over the parameter $\displaystyle{ \theta }$. The likelihood, $\displaystyle{ \mathcal{L}(\theta \mid x) }$, should not be confused with $\displaystyle{ p(\theta \mid x) }$, which is the posterior probability of $\displaystyle{ \theta }$ given the data $\displaystyle{ x }$.

Given no event (no data), the probability and thus likelihood is 1; any non-trivial event will have a lower likelihood.

#### Example

Figure 1.  The likelihood function ($\displaystyle{ p_\text{H}^2 }$) for the probability of a coin landing heads-up (without prior knowledge of the coin's fairness), given that we have observed HH.
Figure 2.  The likelihood function ($\displaystyle{ p_\text{H}^2(1-p_\text{H}) }$) for the probability of a coin landing heads-up (without prior knowledge of the coin's fairness), given that we have observed HHT.

Consider a simple statistical model of a coin flip: a single parameter $\displaystyle{ p_\text{H} }$ that expresses the "fairness" of the coin. The parameter is the probability that a coin lands heads up ("H") when tossed. $\displaystyle{ p_\text{H} }$ can take on any value within the range 0.0 to 1.0. For a perfectly fair coin, $\displaystyle{ p_\text{H} = 0.5 }$.

Imagine flipping a fair coin twice, and observing the following data: two heads in two tosses ("HH"). Assuming that each successive coin flip is i.i.d., then the probability of observing HH is

$\displaystyle{ P(\text{HH} \mid p_\text{H}=0.5) = 0.5^2 = 0.25. }$

Hence, given the observed data HH, the likelihood that the model parameter $\displaystyle{ p_\text{H} }$ equals 0.5 is 0.25. Mathematically, this is written as

$\displaystyle{ \mathcal{L}(p_\text{H}=0.5 \mid \text{HH}) = 0.25. }$

This is not the same as saying that the probability that $\displaystyle{ p_\text{H} = 0.5 }$, given the observation HH, is 0.25. (For that, we could apply Bayes' theorem, which implies that the posterior probability is proportional to the likelihood times the prior probability.)

Suppose that the coin is not a fair coin, but instead it has $\displaystyle{ p_\text{H} = 0.3 }$. Then the probability of getting two heads is

$\displaystyle{ P(\text{HH} \mid p_\text{H}=0.3) = 0.3^2 = 0.09. }$

Hence

$\displaystyle{ \mathcal{L}(p_\text{H}=0.3 \mid \text{HH}) = 0.09. }$

More generally, for each value of $\displaystyle{ p_\text{H} }$, we can calculate the corresponding likelihood. The result of such calculations is displayed in Figure 1.

In Figure 1, the integral of the likelihood over the interval [0, 1] is 1/3. That illustrates an important aspect of likelihoods: likelihoods do not have to integrate (or sum) to 1, unlike probabilities.

### Continuous probability distribution

Let $\displaystyle{ X }$ be a random variable following an absolutely continuous probability distribution with the density function $\displaystyle{ f }$ (a function of $\displaystyle{ x }$) which depends on a parameter $\displaystyle{ \theta }$. Then the function

$\displaystyle{ \mathcal{L}(\theta \mid x) = f_\theta (x), \, }$

considered as a function of $\displaystyle{ \theta }$, is the likelihood function (of $\displaystyle{ \theta }$, given the outcome $\displaystyle{ x }$ of $\displaystyle{ X }$). Sometimes the density function for "the value $\displaystyle{ x }$ of $\displaystyle{ X }$ given the parameter value $\displaystyle{ \theta }$ " is written as $\displaystyle{ f(x\mid\theta) }$. The likelihood function, $\displaystyle{ \mathcal{L}(\theta \mid x) }$, should not be confused with $\displaystyle{ f(\theta \mid x) }$; the likelihood is equal to the probability density of the observed outcome, $\displaystyle{ x }$, when the true value of the parameter is $\displaystyle{ \theta }$, and hence it is equal to a probability density over the outcome $\displaystyle{ x }$, i.e. the likelihood function is not a density over the parameter $\displaystyle{ \theta }$. Put simply, $\displaystyle{ \mathcal{L}(\theta \mid x) }$ is to hypothesis testing (finding the probability of varying outcomes given a set of parameters defined in the null hypothesis) as $\displaystyle{ f(\theta \mid x) }$ is to inference (finding the likely parameters given a specific outcome).

### 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.[4] The likelihood function is that density interpreted as a function of the parameter (possibly a vector), rather than the possible outcomes.[5] This provides a likelihood function for any statistical model with all distributions, whether discrete, absolutely continuous, a mixture or something else. (Likelihoods will be comparable, e.g. for parameter estimation, only if they are Radon–Nikodym derivatives with respect to the same dominating measure.)

The discussion above of likelihood with discrete probabilities is a special case of this using the counting measure, which makes the probability density at any outcome equal to the probability of that single outcome.

### Likelihood function of a parameterized model

Among many applications, we consider here one of broad theoretical and practical importance. Given a parameterized family of probability density functions (or probability mass functions in the case of discrete distributions)

$\displaystyle{ x\mapsto f(x\mid\theta), \! }$

where $\displaystyle{ \theta }$ is the parameter, the likelihood function is

$\displaystyle{ \theta\mapsto f(x\mid\theta), \! }$

written

$\displaystyle{ \mathcal{L}(\theta \mid x)=f(x\mid\theta), \! }$

where $\displaystyle{ x }$ is the observed outcome of an experiment. In other words, when $\displaystyle{ f(x\mid\theta) }$ is viewed as a function of $\displaystyle{ x }$ with $\displaystyle{ \theta }$ fixed, it is a probability density function, and when viewed as a function of $\displaystyle{ \theta }$ with $\displaystyle{ x }$ fixed, it is a likelihood function.

This is not the same as the probability that those parameters are the right ones, given the observed sample. Attempting to interpret the likelihood of a hypothesis given observed evidence as the probability of the hypothesis is a common error, with potentially disastrous consequences. See prosecutor's fallacy for an example of this.

From a geometric standpoint, if we consider $\displaystyle{ f(x\mid\theta) }$ as a function of two variables then the family of probability distributions can be viewed as a family of curves parallel to the $\displaystyle{ x }$-axis, while the family of likelihood functions is the orthogonal curves parallel to the $\displaystyle{ \theta }$-axis.

#### Likelihoods for continuous distributions

The use of the probability density in specifying the likelihood function above is justified as follows. Given an observation $\displaystyle{ x_j }$, the likelihood for the interval $\displaystyle{ [x_j, x_j + h] }$, where $\displaystyle{ h \gt 0 }$ is a constant, is given by $\displaystyle{ \mathcal{L}(\theta\mid x \in [x_j, x_j + h]) }$. Observe that

$\displaystyle{ \operatorname{argmax}_\theta \mathcal{L}(\theta\mid x \in [x_j, x_j + h]) = \operatorname{argmax}_\theta \frac{1}{h} \mathcal{L}(\theta\mid x \in [x_j, x_j + h]) }$,

since $\displaystyle{ h }$ is positive and constant. Because

$\displaystyle{ \operatorname{argmax}_\theta \frac 1 h \mathcal{L}(\theta\mid x \in [x_j, x_j + h]) = \operatorname{argmax}_\theta \frac 1 h \Pr(x_j \leq x \leq x_j + h \mid \theta) = \operatorname{argmax}_\theta \frac 1 h \int_{x_j}^{x_j+h} f(x\mid \theta) \,dx, }$

where $\displaystyle{ f(x\mid \theta) }$ is the probability density function, it follows that

$\displaystyle{ \operatorname{argmax}_\theta \mathcal{L}(\theta\mid x \in [x_j, x_j + h]) = \operatorname{argmax}_\theta \frac{1}{h} \int_{x_j}^{x_j+h} f(x\mid\theta) \,dx }$.

The first fundamental theorem of calculus provides that

\displaystyle{ \begin{align} & \lim_{h \to 0^{+}} \frac 1 h \int_{x_j}^{x_j+h} f(x\mid\theta) \,dx = f(x_j \mid \theta). \end{align} }

Then

\displaystyle{ \begin{align} & \operatorname{argmax}_\theta \mathcal{L}(\theta\mid x_j) = \operatorname{argmax}_\theta \left[ \lim_{h\to 0^{+}} \mathcal{L}(\theta\mid x \in [x_j, x_j + h]) \right] \\[4pt] = {} & \operatorname{argmax}_\theta \left[ \lim_{h\to 0^{+}} \frac{1}{h} \int_{x_j}^{x_j+h} f(x\mid\theta) \,dx \right] = \operatorname{argmax}_\theta f(x_j \mid \theta). \end{align} }

Therefore,

$\displaystyle{ \operatorname{argmax}_\theta \mathcal{L}(\theta\mid x_j) = \operatorname{argmax}_\theta f(x_j \mid \theta), \! }$

and so maximizing the probability density at $\displaystyle{ x_j }$ amounts to maximizing the likelihood of the specific observation $\displaystyle{ x_j }$.

### Likelihoods for mixed continuous–discrete distributions

The above can be extended in a simple way to allow consideration of distributions which contain both discrete and continuous components. Suppose that the distribution consists of a number of discrete probability masses $\displaystyle{ p_k \theta }$ and a density $\displaystyle{ f(x\mid\theta) }$, where the sum of all the $\displaystyle{ p }$'s added to the integral of $\displaystyle{ f }$ is always one. Assuming that it is possible to distinguish an observation corresponding to one of the discrete probability masses from one which corresponds to the density component, the likelihood function for an observation from the continuous component can be dealt with in the manner shown above. For an observation from the discrete component, the likelihood function for an observation from the discrete component is simply

$\displaystyle{ \mathcal{L}(\theta \mid x )= p_k(\theta), \! }$

where $\displaystyle{ k }$ is the index of the discrete probability mass corresponding to observation $\displaystyle{ x }$, because maximizing the probability mass (or probability) at $\displaystyle{ x }$ amounts to maximizing the likelihood of the specific observation.

The fact that the likelihood function can be defined in a way that includes contributions that are not commensurate (the density and the probability mass) arises from the way in which the likelihood function is defined up to a constant of proportionality, where this "constant" can change with the observation $\displaystyle{ x }$, but not with the parameter $\displaystyle{ \theta }$.

### Regularity conditions

In the context of parameter estimation, the likelihood function is usually assumed to obey certain conditions, known as regularity conditions. These conditions are assumed in various proofs involving likelihood functions, and need to be verified in each particular application. For maximum likelihood estimation, the existence of a global maximum of the likelihood function is of the utmost importance. By the extreme value theorem, it suffices that the likelihood function is continuous on a compact parameter space for the maximum likelihood estimator to exist.[6] While the continuity assumption is usually met, the compactness assumption about the parameter space is often not, as the bounds of the true parameter values are unknown. In that case, concavity of the likelihood function plays a key role.

More specifically, if the likelihood function is twice continuously differentiable on the k-dimensional parameter space $\displaystyle{ \, \Theta \, }$ assumed to be an open connected subset of $\displaystyle{ \, \mathbb{R}^{k} \;, }$ there exists a unique maximum $\displaystyle{ \hat{\theta} \in \Theta }$ if the matrix of second partials

$\displaystyle{ \mathbf{H}(\theta) \equiv \left[\, \frac{ \partial^2 L }{\, \partial \theta_i \, \partial \theta_j \,} \,\right]_{i,j=1,1}^{n_\mathrm{i},n_\mathrm{j}} \; }$ is negative definite for every $\displaystyle{ \, \theta \in \Theta \, }$ at which the gradient $\displaystyle{ \; \nabla L \equiv \left[\, \frac{ \partial L }{\, \partial \theta_i \,} \,\right]_{i=1}^{n_\mathrm{i}} \; }$ vanishes,

and if

$\displaystyle{ \lim_{\theta \to \partial \Theta} L(\theta) = 0 \;, }$

i.e. the likelihood function approaches a constant on the boundary of the parameter space, $\displaystyle{ \; \partial \Theta \;, }$ which may include the points at infinity if $\displaystyle{ \, \Theta \, }$ is unbounded.

Mäkeläinen et al. prove this result using Morse theory while informally appealing to a mountain pass property.[7] Mascarenhas restates their proof using the mountain pass theorem.[8]

In the proofs of consistency and asymptotic normality of the maximum likelihood estimator, additional assumptions are made about the probability densities that form the basis of a particular likelihood function. These conditions were first established by Chanda.[9] In particular, for almost all $\displaystyle{ x }$, and for all $\displaystyle{ \, \theta \in \Theta \,, }$

$\displaystyle{ \frac{\partial \log f}{\partial \theta_r} \,, \quad \frac{\partial^2 \log f}{\partial \theta_r \partial \theta_s} \,, \quad \frac{\partial^3 \log f}{\partial \theta_r \, \partial \theta_s \, \partial \theta_t} \, }$

exist for all $\displaystyle{ \, r, s, t = 1, 2, \ldots, k \, }$ in order to ensure the existence of a Taylor expansion. Second, for almost all $\displaystyle{ x }$ and for every $\displaystyle{ \, \theta \in \Theta \, }$ it must be that

$\displaystyle{ \left| \frac{\partial f}{\partial \theta_r} \right| \lt F_r(x) \,, \quad \left| \frac{\partial^2 f}{\partial \theta_r \, \partial \theta_s} \right| \lt F_{rs}(x) \,, \quad \left| \frac{\partial^3 f}{\partial \theta_r \, \partial \theta_s \, \partial \theta_t} \right| \lt H_{rst}(x) }$

where $\displaystyle{ H }$ is such that $\displaystyle{ \, \int_{-\infty}^{\infty} H_{rst}(z) \mathrm{d}z \leq M \lt \infty \;. }$ This boundedness of the derivatives is needed to allow for differentiation under the integral sign. And lastly, it is assumed that the information matrix,

$\displaystyle{ \mathbf{I}(\theta) = \int_{-\infty}^{\infty} \frac{\partial \log f}{\partial \theta_r}\ \frac{\partial \log f}{\partial \theta_s}\ f\ \mathrm{d}z }$

is positive definite and $\displaystyle{ \, \left| \mathbf{I}(\theta) \right| \, }$ is finite. This ensures that the score has a finite variance.[10]

The above conditions are sufficient, but not necessary. That is, a model that does not meet these regularity conditions may or may not have a maximum likelihood estimator of the properties mentioned above. Further, in case of non-independently or non-identically distributed observations additional properties may need to be assumed.

In Bayesian statistics, almost identical regularity conditions are imposed on the likelihood function in order to justify the Laplace approximation of the posterior probability.[11]

## Likelihood ratio and relative likelihood

### Likelihood ratio

A likelihood ratio is the ratio of any two specified likelihoods, frequently written as:

$\displaystyle{ \Lambda(\theta_1:\theta_2 \mid x) = \frac{\mathcal{L}(\theta_1 \mid x)}{\mathcal{L}(\theta_2 \mid x)} }$

The likelihood ratio is central to likelihoodist statistics: the law of likelihood states that degree to which data (considered as evidence) supports one parameter value versus another is measured by the likelihood ratio.

In frequentist inference, the likelihood ratio is the basis for a test statistic, the so-called likelihood-ratio test. By the Neyman–Pearson lemma, this is the most powerful test for comparing two simple hypotheses at a given significance level. Numerous other tests can be viewed as likelihood-ratio tests or approximations thereof.[12] The asymptotic distribution of the log-likelihood ratio, considered as a test statistic, is given by Wilks' theorem.

The likelihood ratio is also of central importance in Bayesian inference, where it is known as the Bayes factor, and is used in Bayes' rule. Stated in terms of odds, Bayes' rule states that the posterior odds of two alternatives, $\displaystyle{ A_1 }$ and $\displaystyle{ A_2 }$, given an event $\displaystyle{ B }$, is the prior odds, times the likelihood ratio. As an equation:

$\displaystyle{ O(A_1:A_2 \mid B) = O(A_1:A_2) \cdot \Lambda(A_1:A_2 \mid B). }$

The likelihood ratio is not directly used in AIC-based statistics. Instead, what is used is the relative likelihood of models (see below).

### Relative likelihood function

Since the actual value of the likelihood function depends on the sample, it is often convenient to work with a standardized measure. Suppose that the maximum likelihood estimate for the parameter θ is $\displaystyle{ \hat{\theta} }$. Relative plausibilities of other θ values may be found by comparing the likelihoods of those other values with the likelihood of $\displaystyle{ \hat{\theta} }$. The relative likelihood of θ is defined to be[13][14][15][16][17]

$\displaystyle{ R(\theta) = \frac{\mathcal{L}(\theta \mid x)}{\mathcal{L}(\hat{\theta} \mid x)}. }$

Thus, the relative likelihood is the likelihood ratio (discussed above) with the fixed denominator $\displaystyle{ \mathcal{L}(\hat{\theta}) }$. This corresponds to standardizing the likelihood to have a maximum of 1.

#### Likelihood region

A likelihood region is the set of all values of θ whose relative likelihood is greater than or equal to a given threshold. In terms of percentages, a p% likelihood region for θ is defined to be[13][15][18]

$\displaystyle{ \left\{\theta : R(\theta) \ge \frac p {100} \right\}. }$

If θ is a single real parameter, a p% likelihood region will usually comprise an interval of real values. If the region does comprise an interval, then it is called a likelihood interval.[13][15][19]

Likelihood intervals, and more generally likelihood regions, are used for interval estimation within likelihoodist statistics: they are similar to confidence intervals in frequentist statistics and credible intervals in Bayesian statistics. Likelihood intervals are interpreted directly in terms of relative likelihood, not in terms of coverage probability (frequentism) or posterior probability (Bayesianism).

Given a model, likelihood intervals can be compared to confidence intervals. If θ is a single real parameter, then under certain conditions, a 14.65% likelihood interval (about 1:7 likelihood) for θ will be the same as a 95% confidence interval (19/20 coverage probability).[13][18] In a slightly different formulation suited to the use of log-likelihoods (see Wilks' theorem), the test statistic is twice the difference in log-likelihoods and the probability distribution of the test statistic is approximately a chi-squared distribution with degrees-of-freedom (df) equal to the difference in df's between the two models (therefore, the e−2 likelihood interval is the same as the 0.954 confidence interval; assuming difference in df's to be 1).[18][19]

## Likelihoods that eliminate nuisance parameters

In many cases, the likelihood is a function of more than one parameter but interest focuses on the estimation of only one, or at most a few of them, with the others being considered as nuisance parameters. Several alternative approaches have been developed to eliminate such nuisance parameters, so that a likelihood can be written as a function of only the parameter (or parameters) of interest: the main approaches are profile, conditional, and marginal likelihoods.[20][21] These approaches are also useful when a high-dimensional likelihood surface needs to be reduced to one or two parameters of interest in order to allow a graph.

### Profile likelihood

It is possible to reduce the dimensions by concentrating the likelihood function for a subset of parameters by expressing the nuisance parameters as functions of the parameters of interest and replacing them in the likelihood function.[22][23] In general, for a likelihood function depending on the parameter vector $\displaystyle{ \mathbf{\theta} }$ that can be partitioned into $\displaystyle{ \mathbf{\theta} = \left( \mathbf{\theta}_{1} : \mathbf{\theta}_{2} \right) }$, and where a correspondence $\displaystyle{ \mathbf{\hat{\theta}}_{2} = \mathbf{\hat{\theta}}_{2} \left( \mathbf{\theta}_{1} \right) }$ can be determined explicitly, concentration reduces computational burden of the original maximization problem.[24]

For instance, in a linear regression with normally distributed errors, $\displaystyle{ \mathbf{y} = \mathbf{X} \beta + u }$, the coefficient vector could be partitioned into $\displaystyle{ \beta = \left[ \beta_{1} : \beta_{2} \right] }$ (and consequently the design matrix $\displaystyle{ \mathbf{X} = \left[ \mathbf{X}_{1} : \mathbf{X}_{2} \right] }$). Maximizing with respect to $\displaystyle{ \beta_{2} }$ yields an optimal value function $\displaystyle{ \beta_{2} (\beta_{1}) = \left( \mathbf{X}_{2}^{\mathsf{T}} \mathbf{X}_{2} \right)^{-1} \mathbf{X}_{2}^{\mathsf{T}} \left( \mathbf{y} - \mathbf{X}_{1} \beta_{1} \right) }$. Using this result, the maximum likelihood estimator for $\displaystyle{ \beta_{1} }$ can then be derived as

$\displaystyle{ \hat{\beta}_{1} = \left( \mathbf{X}_{1}^{\mathsf{T}} \left( \mathbf{I} - \mathbf{P}_{2} \right) \mathbf{X}_{1} \right)^{-1} \mathbf{X}_{1}^{\mathsf{T}} \left( \mathbf{I} - \mathbf{P}_{2} \right) \mathbf{y} }$

where $\displaystyle{ \mathbf{P}_{2} = \mathbf{X}_{2} \left( \mathbf{X}_{2}^{\mathsf{T}} \mathbf{X}_{2} \right)^{-1} \mathbf{X}_{2}^{\mathsf{T}} }$ is the projection matrix of $\displaystyle{ \mathbf{X}_{2} }$. This result is known as the Frisch–Waugh–Lovell theorem.

Since graphically the procedure of concentration is equivalent to slicing the likelihood surface along the ridge of values of the nuisance parameter $\displaystyle{ \beta_{2} }$ that maximizes the likelihood function, creating an isometric profile of the likelihood function for a given $\displaystyle{ \beta_{1} }$, the result of this procedure is also known as profile likelihood.[25][26] In addition to being graphed, the profile likelihood can also be used to compute confidence intervals that often have better small-sample properties than those based on asymptotic standard errors calculated from the full likelihood.[27][28]

### Conditional likelihood

Sometimes it is possible to find a sufficient statistic for the nuisance parameters, and conditioning on this statistic results in a likelihood which does not depend on the nuisance parameters.[29]

One example occurs in 2×2 tables, where conditioning on all four marginal totals leads to a conditional likelihood based on the non-central hypergeometric distribution. This form of conditioning is also the basis for Fisher's exact test.

### Marginal likelihood

Main page: Marginal likelihood

Sometimes we can remove the nuisance parameters by considering a likelihood based on only part of the information in the data, for example by using the set of ranks rather than the numerical values. Another example occurs in linear mixed models, where considering a likelihood for the residuals only after fitting the fixed effects leads to residual maximum likelihood estimation of the variance components.

### Partial likelihood

A partial likelihood is an adaption of the full likelihood such that only a part of the parameters (the parameters of interest) occur in it.[30] It is a key component of the proportional hazards model: using a restriction on the hazard function, the likelihood does not contain the shape of the hazard over time.

## Products of likelihoods

The likelihood, given two or more independent events, is the product of the likelihoods of each of the individual events:

$\displaystyle{ \Lambda(A \mid X_1 \land X_2) = \Lambda(A \mid X_1) \cdot \Lambda(A \mid X_2) }$

This follows from the definition of independence in probability: the probabilities of two independent events happening, given a model, is the product of the probabilities.

This is particularly important when the events are from independent and identically distributed random variables, such as independent observations or sampling with replacement. In such a situation, the likelihood function factors into a product of individual likelihood functions.

The empty product has value 1, which corresponds to the likelihood, given no event, being 1: before any data, the likelihood is always 1. This is similar to a uniform prior in Bayesian statistics, but in likelihoodist statistics this is not an improper prior because likelihoods are not integrated.

## Log-likelihood

Log-likelihood function is a logarithmic transformation of the likelihood function, often denoted by a lowercase l or $\displaystyle{ \ell }$, to contrast with the uppercase L or $\displaystyle{ \mathcal{L} }$ for the likelihood. Because logarithms are strictly increasing functions, maximizing the likelihood is equivalent to maximizing the log-likelihood. But for practical purposes it is more convenient to work with the log-likelihood function in maximum likelihood estimation, in particular since most common probability distributions—notably the exponential family—are only logarithmically concave,[31][32] and concavity of the objective function plays a key role in the maximization.

Given the independence of each event, the overall log-likelihood of intersection equals the sum of the log-likelihoods of the individual events. This is analogous to the fact that the overall log-probability is the sum of the log-probability of the individual events. In addition to the mathematical convenience from this, the adding process of log-likelihood has an intuitive interpretation, as often expressed as "support" from the data. When the parameters are estimated using the log-likelihood for the maximum likelihood estimation, each data point is used by being added to the total log-likelihood. As the data can be viewed as an evidence that support the estimated parameters, this process can be interpreted as "support from independent evidence adds", and the log-likelihood is the "weight of evidence". Interpreting negative log-probability as information content or surprisal, the support (log-likelihood) of a model, given an event, is the negative of the surprisal of the event, given the model: a model is supported by an event to the extent that the event is unsurprising, given the model.

A logarithm of a likelihood ratio is equal to the difference of the log-likelihoods:

$\displaystyle{ \log \frac{L(A)}{L(B)} = \log L(A) - \log L(B) = \ell(A) - \ell(B). }$

Just as the likelihood, given no event, being 1, the log-likelihood, given no event, is 0, which corresponds to the value of the empty sum: without any data, there is no support for any models.

### Likelihood equations

If the log-likelihood function is smooth, its gradient with respect to the parameter, known as the score and written $\displaystyle{ s_{n}(\theta) \equiv \nabla_{\theta} \ell_{n}(\theta) }$, exists and allows for the application of differential calculus. The basic way to maximize a differentiable function is to find the stationary points (the points where the derivative is zero); since the derivative of a sum is just the sum of the derivatives, but the derivative of a product requires the product rule, it is easier to compute the stationary points of the log-likelihood of independent events than for the likelihood of independent events.

The equations defined by the stationary point of the score function serve as estimating equations for the maximum likelihood estimator.

$\displaystyle{ s_{n}(\theta) = \mathbf{0} }$

In that sense, the maximum likelihood estimator is implicitly defined by the value at $\displaystyle{ \mathbf{0} }$ of the inverse function $\displaystyle{ s_{n}^{-1}: \mathbb{E}^{d} \to \Theta }$, where $\displaystyle{ \mathbb{E}^{d} }$ is the d-dimensional Euclidean space, and $\displaystyle{ \Theta }$ is the parameter space. Using the inverse function theorem, it can be shown that $\displaystyle{ s_{n}^{-1} }$ is well-defined in an open neighborhood about $\displaystyle{ \mathbf{0} }$ with probability going to one, and $\displaystyle{ \hat{\theta}_{n} = s_{n}^{-1}(\mathbf{0}) }$ is a consistent estimate of $\displaystyle{ \theta }$. As a consequence there exists a sequence $\displaystyle{ \left\{ \hat{\theta}_{n} \right\} }$ such that $\displaystyle{ s_{n}(\hat{\theta}_{n}) = \mathbf{0} }$ asymptotically almost surely, and $\displaystyle{ \hat{\theta}_{n} \xrightarrow{\text{p}} \theta_{0} }$.[33] A similar result can be established using Rolle's theorem.[34][35]

The second derivative evaluated at $\displaystyle{ \hat{\theta} }$, known as Fisher information, determines the curvature of the likelihood surface,[36] and thus indicates the precision of the estimate.[37]

### Exponential families

The log-likelihood is also particularly useful for exponential families of distributions, which include many of the common parametric probability distributions. The probability distribution function (and thus likelihood function) for exponential families contain products of factors involving exponentiation. The logarithm of such a function is a sum of products, again easier to differentiate than the original function.

An exponential family is one whose probability density function is of the form (for some functions, writing $\displaystyle{ \langle -, - \rangle }$ for the inner product):

$\displaystyle{ p(x \mid \boldsymbol \theta) = h(x) \exp\Big(\langle \boldsymbol\eta({\boldsymbol \theta}), \mathbf{T}(x)\rangle -A({\boldsymbol \theta}) \Big). }$

Each of these terms has an interpretation,[lower-alpha 2] but simply switching from probability to likelihood and taking logarithms yields the sum:

$\displaystyle{ \ell(\boldsymbol \theta \mid x) = \langle \boldsymbol\eta({\boldsymbol \theta}), \mathbf{T}(x)\rangle - A({\boldsymbol \theta}) + \log h(x). }$

The $\displaystyle{ \boldsymbol \eta(\boldsymbol \theta) }$ and $\displaystyle{ h(x) }$ each correspond to a change of coordinates, so in these coordinates, the log-likelihood of an exponential family is given by the simple formula:

$\displaystyle{ \ell(\boldsymbol \eta \mid x) = \langle \boldsymbol\eta, \mathbf{T}(x)\rangle - A({\boldsymbol \eta}). }$

In words, the log-likelihood of an exponential family is inner product of the natural parameter $\displaystyle{ \boldsymbol\eta }$ and the sufficient statistic $\displaystyle{ \mathbf{T}(x) }$, minus the normalization factor (log-partition function) $\displaystyle{ A({\boldsymbol \eta}) }$. Thus for example the maximum likelihood estimate can be computed by taking derivatives of the sufficient statistic T and the log-partition function A.

#### Example: the gamma distribution

The gamma distribution is an exponential family with two parameters, $\displaystyle{ \alpha }$ and $\displaystyle{ \beta }$. The likelihood function is

$\displaystyle{ \mathcal{L} (\alpha, \beta \mid x) = \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha-1} e^{-\beta x}. }$

Finding the maximum likelihood estimate of $\displaystyle{ \beta }$ for a single observed value $\displaystyle{ x }$ looks rather daunting. Its logarithm is much simpler to work with:

$\displaystyle{ \log \mathcal{L}(\alpha,\beta \mid x) = \alpha \log \beta - \log \Gamma(\alpha) + (\alpha-1) \log x - \beta x. \, }$

To maximize the log-likelihood, we first take the partial derivative with respect to $\displaystyle{ \beta }$:

$\displaystyle{ \frac{\partial \log \mathcal{L}(\alpha,\beta \mid x)}{\partial \beta} = \frac{\alpha}{\beta} - x. }$

If there are a number of independent observations $\displaystyle{ x_1, \ldots, x_n }$, then the joint log-likelihood will be the sum of individual log-likelihoods, and the derivative of this sum will be a sum of derivatives of each individual log-likelihood:

\displaystyle{ \begin{align} & \frac{\partial \log \mathcal{L}(\alpha,\beta \mid x_1, \ldots, x_n)}{\partial \beta} \\ = {} & \frac{\partial \log \mathcal{L}(\alpha,\beta \mid x_1)}{\partial \beta} + \cdots + \frac{\partial \log \mathcal{L}(\alpha,\beta \mid x_n)}{\partial \beta} = \frac{n \alpha} \beta - \sum_{i=1}^n x_i. \end{align} }

To complete the maximization procedure for the joint log-likelihood, the equation is set to zero and solved for $\displaystyle{ \beta }$:

$\displaystyle{ \widehat\beta = \frac{\alpha}{\bar{x}}. }$

Here $\displaystyle{ \widehat\beta }$ denotes the maximum-likelihood estimate, and $\displaystyle{ \textstyle \bar{x} = \frac{1}{n} \sum_{i=1}^n x_i }$ is the sample mean of the observations.

## Background and interpretation

### Historical remarks

The term "likelihood" has been in use in English since at least late Middle English.[38] Its formal use to refer to a specific function in mathematical statistics was proposed by Ronald Fisher,[39] in two research papers published in 1921[40] and 1922.[41] The 1921 paper introduced what is today called a "likelihood interval"; the 1922 paper introduced the term "method of maximum likelihood". Quoting Fisher:

The concept of likelihood should not be confused with probability as mentioned by Sir Ronald Fisher

Fisher's invention of statistical likelihood was in reaction against an earlier form of reasoning called inverse probability.[44] His use of the term "likelihood" fixed the meaning of the term within mathematical statistics.

A. W. F. Edwards (1972) established the axiomatic basis for use of the log-likelihood ratio as a measure of relative support for one hypothesis against another. The support function is then the natural logarithm of the likelihood function. Both terms are used in phylogenetics, but were not adopted in a general treatment of the topic of statistical evidence.[45]

### Interpretations under different foundations

Among statisticians, there is no consensus about what the foundation of statistics should be. There are four main paradigms that have been proposed for the foundation: frequentism, Bayesianism, likelihoodism, and AIC-based.[46] For each of the proposed foundations, the interpretation of likelihood is different. The four interpretations are described in the subsections below.

#### Bayesian interpretation

In Bayesian inference, although one can speak about the likelihood of any proposition or random variable given another random variable: for example the likelihood of a parameter value or of a statistical model (see marginal likelihood), given specified data or other evidence,[47][48][49][50] the likelihood function remains the same entity, with the additional interpretations of (i) a conditional density of the data given the parameter (since the parameter is then a random variable) and (ii) a measure or amount of information brought by the data about the parameter value or even the model.[47][48][49][50][51] Due to the introduction of a probability structure on the parameter space or on the collection of models, it is possible that a parameter value or a statistical model have a large likelihood value for given data, and yet have a low probability, or vice versa.[49][51] This is often the case in medical contexts.[52] Following Bayes' Rule, the likelihood when seen as a conditional density can be multiplied by the prior probability density of the parameter and then normalized, to give a posterior probability density.[47][48][49][50][51] More generally, the likelihood of an unknown quantity $\displaystyle{ X }$ given another unknown quantity $\displaystyle{ Y }$ is proportional to the probability of $\displaystyle{ Y }$ given $\displaystyle{ X }$.[47][48][49][50][51]

#### Likelihoodist interpretation

In frequentist statistics, the likelihood function is itself a statistic that summarizes a single sample from a population, whose calculated value depends on a choice of several parameters θ1 ... θp, where p is the count of parameters in some already-selected statistical model. The value of the likelihood serves as a figure of merit for the choice used for the parameters, and the parameter set with maximum likelihood is the best choice, given the data available.

The specific calculation of the likelihood is the probability that the observed sample would be assigned, assuming that the model chosen and the values of the several parameters θ give an accurate approximation of the frequency distribution of the population that the observed sample was drawn from. Heuristically, it makes sense that a good choice of parameters is those which render the sample actually observed the maximum possible post-hoc probability of having happened. Wilks' theorem quantifies the heuristic rule by showing that the difference in the logarithm of the likelihood generated by the estimate's parameter values and the logarithm of the likelihood generated by population's "true" (but unknown) parameter values is asymptotically χ2 distributed.

Each independent sample's maximum likelihood estimate is a separate estimate of the "true" parameter set describing the population sampled. Successive estimates from many independent samples will cluster together with the population's "true" set of parameter values hidden somewhere in their midst. The difference in the logarithms of the maximum likelihood and adjacent parameter sets' likelihoods may be used to draw a confidence region on a plot whose co-ordinates are the parameters θ1 ... θp. The region surrounds the maximum-likelihood estimate, and all points (parameter sets) within that region differ at most in log-likelihood by some fixed value. The χ2 distribution given by Wilks' theorem converts the region's log-likelihood differences into the "confidence" that the population's "true" parameter set lies inside. The art of choosing the fixed log-likelihood difference is to make the confidence acceptably high while keeping the region acceptably small (narrow range of estimates).

As more data are observed, instead of being used to make independent estimates, they can be combined with the previous samples to make a single combined sample, and that large sample may be used for a new maximum likelihood estimate. As the size of the combined sample increases, the size of the likelihood region with the same confidence shrinks. Eventually, either the size of the confidence region is very nearly a single point, or the entire population has been sampled; in both cases, the estimated parameter set is essentially the same as the population parameter set.

#### AIC-based interpretation

Under the AIC paradigm, likelihood is interpreted within the context of information theory.[53][54][55]

## Notes

1. While often used synonymously in common speech, the terms "likelihood" and "probability" have distinct meanings in statistics. Probability is a property of the sample, specifically how probable it is to obtain a particular sample for a given value of the parameters of the distribution; likelihood is a property of the parameter values. See Valavanis, Stefan (1959), "Probability and Likelihood", Econometrics : An Introduction to Maximum Likelihood Methods, New York: McGraw-Hill, pp. 24–28, OCLC 6257066

## References

1. Casella, George; Berger, Roger L. (2002). Statistical Inference (2nd ed.). Duxbury. p. 290. ISBN 0-534-24312-6.
2. Berger, James O.; Wolpert, Robert L. (1988), The Likelihood Principle, Hayward: Institute of Mathematical Statistics, p. 19, ISBN 0-940600-13-7
3. Zellner, Arnold (1971). An Introduction to Bayesian Inference in Econometrics. New York: Wiley. pp. 13–14. ISBN 0-471-98165-6.
4. Billingsley, Patrick (1995), Probability and Measure (Third ed.), John Wiley & Sons, pp. 422–423
5. Shao, Jun (2003), Mathematical Statistics (2nd ed.), Springer, §4.4.1
6. Gouriéroux, Christian; Monfort, Alain (1995). Statistics and Econometric Models. New York: Cambridge University Press. p. 161. ISBN 0-521-40551-3.
7. Mäkeläinen, Timo; Schmidt, Klaus; Styan, George P.H. (1981). "On the existence and uniqueness of the maximum likelihood estimate of a vector-valued parameter in fixed-size samples". Annals of Statistics 9 (4): 758–767. doi:10.1214/aos/1176345516.
8. Mascarenhas, W.F. (2011). "A mountain pass lemma and its implications regarding the uniqueness of constrained minimizers". Optimization 60 (8–9): 1121–1159. doi:10.1080/02331934.2010.527973.
9. Chanda, K.C. (1954). "A note on the consistency and maxima of the roots of likelihood equations". Biometrika 41 (1–2): 56–61. doi:10.2307/2333005.
10. Greenberg, Edward; Webster, Charles E., Jr. (1983). Advanced Econometrics: A Bridge to the Literature. New York, NY: John Wiley & Sons. pp. 24–25. ISBN 0-471-09077-8.
11. Kass, Robert E.; Tierney, Luke; Kadane, Joseph B. (1990). "The Validity of Posterior Expansions Based on Laplace's Method". in Geisser, S.; Hodges, J. S.; Press, S. J. et al.. Bayesian and Likelihood Methods in Statistics and Econometrics. Elsevier. pp. 473–488. ISBN 0-444-88376-2.
12. Buse, A. (1982). "The Likelihood Ratio, Wald, and Lagrange Multiplier Tests: An Expository Note". The American Statistician 36 (3a): 153–157. doi:10.1080/00031305.1982.10482817.
13. Kalbfleisch, J. G. (1985), Probability and Statistical Inference, Springer  (§9.3).
14. Azzalini, A. (1996), Statistical Inference—Based on the likelihood, Chapman & Hall, ISBN 9780412606502  (§1.4.2).
15. Sprott, D. A. (2000), Statistical Inference in Science, Springer (chap. 2).
16. Davison, A. C. (2008), Statistical Models, Cambridge University Press (§4.1.2).
17. Held, L.; Sabanés Bové, D. S. (2014), Applied Statistical Inference—Likelihood and Bayes, Springer  (§2.1).
18. Rossi, R. J. (2018), Mathematical Statistics, Wiley, p. 267 .
19. Hudson, D. J. (1971), "Interval estimation from the likelihood function", Journal of the Royal Statistical Society, Series B 33 (2): 256–262 .
20. Pawitan, Yudi (2001). In All Likelihood: Statistical Modelling and Inference Using Likelihood. Oxford University Press.
21. Wen Hsiang Wei. "Generalized Linear Model - course notes". Taichung, Taiwan: Tunghai University. pp. Chapter 5.
22. Amemiya, Takeshi (1985). "Concentrated Likelihood Function". Advanced Econometrics. Cambridge: Harvard University Press. pp. 125–127. ISBN 978-0-674-00560-0.
23. Davidson, Russell; MacKinnon, James G. (1993). "Concentrating the Loglikelihood Function". Estimation and Inference in Econometrics. New York: Oxford University Press. pp. 267–269. ISBN 978-0-19-506011-9.
24. Gourieroux, Christian; Monfort, Alain (1995). "Concentrated Likelihood Function". Statistics and Econometric Models. New York: Cambridge University Press. pp. 170–175. ISBN 978-0-521-40551-5.
25. Pickles, Andrew (1985), An Introduction to Likelihood Analysis, Norwich: W. H. Hutchins & Sons, pp. 21–24, ISBN 0-86094-190-6
26. Bolker, Benjamin M. (2008). Ecological Models and Data in R. Princeton University Press. pp. 187–189. ISBN 978-0-691-12522-0.
27. Aitkin, Murray (1982), "Direct Likelihood Inference", GLIM 82: Proceedings of the International Conference on Generalised Linear Models, Springer, pp. 76–86, ISBN 0-387-90777-7
28. Venzon, D. J.; Moolgavkar, S. H. (1988), "A Method for Computing Profile-Likelihood-Based Confidence Intervals", Journal of the Royal Statistical Society, Series C (Applied Statistics) 37 (1): 87–94, doi:10.2307/2347496
29. Kalbfleisch, J. D.; Sprott, D. A. (1973). "Marginal and Conditional Likelihoods". Sankhyā: The Indian Journal of Statistics. Series A 35 (3): 311–328.
30. "Partial likelihood", Biometrika 62 (2): 269–276, 1975, doi:10.1093/biomet/62.2.269
31. Kass, Robert E.; Vos, Paul W. (1997), Geometrical Foundations of Asymptotic Inference, New York: John Wiley & Sons, p. 14, ISBN 0-471-82668-5
32. Papadopoulos, Alecos (September 25, 2013). "Why we always put log() before the joint pdf when we use MLE (Maximum likelihood Estimation)?". Stack Exchange.
33. Foutz, Robert V. (1977). "On the Unique Consistent Solution to the Likelihood Equations". Journal of the American Statistical Association 72 (357): 147–148. doi:10.1080/01621459.1977.10479926.
34. Tarone, Robert E.; Gruenhage, Gary (1975). "A Note on the Uniqueness of Roots of the Likelihood Equations for Vector-Valued Parameters". Journal of the American Statistical Association 70 (352): 903–904. doi:10.1080/01621459.1975.10480321.
35. Rai, Kamta; Van Ryzin, John (1982). "A Note on a Multivariate Version of Rolle's Theorem and Uniqueness of Maximum Likelihood Roots". Communications in Statistics. Theory and Methods 11 (13): 1505–1510. doi:10.1080/03610928208828325.
36. Rao, B. Raja (1960), "A formula for the curvature of the likelihood surface of a sample drawn from a distribution admitting sufficient statistics", Biometrika 47 (1–2): 203–207, doi:10.1093/biomet/47.1-2.203
37. Ward, Michael D.; Ahlquist, John S. (2018), Maximum Likelihood for Social Science : Strategies for Analysis, Cambridge University Press, pp. 25–27
38. "likelihood", Shorter Oxford English Dictionary (2007).
39. "On the "probable error" of a coefficient of correlation deduced from a small sample", Metron 1: 3–32, 1921
40. "On the mathematical foundations of theoretical statistics", Philosophical Transactions of the Royal Society A 222 (594–604): 309–368, 1922, doi:10.1098/rsta.1922.0009, Bibcode1922RSPTA.222..309F
41. Klemens, Ben (2008), Modeling with Data: Tools and Techniques for Scientific Computing, Princeton University Press, p. 329
42. Fisher, Ronald (1930), "Inverse Probability", Mathematical Proceedings of the Cambridge Philosophical Society 26 (4): 528–535, doi:10.1017/S0305004100016297, Bibcode1930PCPS...26..528F
43. Fienberg, Stephen E (1997), "Introduction to R.A. Fisher on inverse probability and likelihood", Statistical Science 12 (3): 161, doi:10.1214/ss/1030037905
44. Royall, R. (1997), Statistical Evidence, Chapman & Hall
45. Bandyopadhyay, P. S., ed. (2011), Philosophy of Statistics, North-Holland Publishing
46. I. J. Good: Probability and the Weighing of Evidence (Griffin 1950), §6.1
47. H. Jeffreys: Theory of Probability (3rd ed., Oxford University Press 1983), §1.22
48. E. T. Jaynes: Probability Theory: The Logic of Science (Cambridge University Press 2003), §4.1
49. D. V. Lindley: Introduction to Probability and Statistics from a Bayesian Viewpoint. Part 1: Probability (Cambridge University Press 1980), §1.6
50. A. Gelman, J. B. Carlin, H. S. Stern, D. B. Dunson, A. Vehtari, D. B. Rubin: Bayesian Data Analysis (3rd ed., Chapman & Hall/CRC 2014), §1.3
51. Sox, H. C.; Higgins, M. C.; Owens, D. K. (2013), Medical Decision Making (2nd ed.), Wiley, chapters 3–4, doi:10.1002/9781118341544, ISBN 9781118341544
52. Akaike, H. (1985), "Prediction and entropy", in Atkinson, A. C.; Fienberg, S. E., A Celebration of Statistics, Springer, pp. 1–24
53. Akaike Information Criterion Statistics, D. Reidel, 1986, Part I
54. Burnham, K. P.; Anderson, D. R. (2002), Model Selection and Multimodel Inference: A practical information-theoretic approach (2nd ed.), Springer-Verlag, chap. 7