In statistics, the likelihood-ratio test is a hypothesis test that involves comparing the goodness of fit of two competing statistical models, typically one found by maximization over the entire parameter space and another found after imposing some constraint, based on the ratio of their likelihoods. If the more constrained model (i.e., the null hypothesis) is supported by the observed data, the two likelihoods should not differ by more than sampling error.[1] Thus the likelihood-ratio test tests whether this ratio is significantly different from one, or equivalently whether its natural logarithm is significantly different from zero.
The likelihood-ratio test, also known as Wilks test,[2] is the oldest of the three classical approaches to hypothesis testing, together with the Lagrange multiplier test and the Wald test.[3] In fact, the latter two can be conceptualized as approximations to the likelihood-ratio test, and are asymptotically equivalent.[4] [5] [6] In the case of comparing two models each of which has no unknown parameters, use of the likelihood-ratio test can be justified by the Neyman–Pearson lemma. The lemma demonstrates that the test has the highest power among all competitors.
\Theta
\theta
\Theta0
\Theta
\theta
\Theta0
\Theta~\backslash~\Theta0
c | |
\Theta | |
0 |
H0:\theta\in\Theta0
λLR=-2ln\left[
| |||||||
(\theta) |
~}{~\sup\thetal{L}(\theta)~}\right]
where the quantity inside the brackets is called the likelihood ratio. Here, the
\sup
Often the likelihood-ratio test statistic is expressed as a difference between the log-likelihoods
λLR=-2\left[~\ell(\theta0)-\ell(\hat{\theta})~\right]
\ell(\hat{\theta})\equivln\left[~\sup\thetal{L}(\theta)~\right]~
l{L}
\ell(\theta0)
l{L}
\theta0\in\Theta0 and \hat{\theta}\in\Theta~
λLR
The likelihood-ratio test requires that the models be nested - i.e. the more complex model can be transformed into the simpler model by imposing constraints on the former's parameters. Many common test statistics are tests for nested models and can be phrased as log-likelihood ratios or approximations thereof: e.g. the Z-test, the F-test, the G-test, and Pearson's chi-squared test; for an illustration with the one-sample t-test, see below.
If the models are not nested, then instead of the likelihood-ratio test, there is a generalization of the test that can usually be used: for details, see relative likelihood.
See main article: Neyman–Pearson lemma. A simple-vs.-simple hypothesis test has completely specified models under both the null hypothesis and the alternative hypothesis, which for convenience are written in terms of fixed values of a notional parameter
\theta
\begin{align} H0&:&\theta=\theta0,\\ H1&:&\theta=\theta1. \end{align}
Λ(x)=
~l{L | |
(\theta |
0\midx)~}{~l{L}(\theta1\midx)~}.
Some older references may use the reciprocal of the function above as the definition. Thus, the likelihood ratio is small if the alternative model is better than the null model.
The likelihood-ratio test provides the decision rule as follows:
If
~Λ>c~
H0
If
~Λ<c~
H0
If
~Λ=c~
H0
~q~
The values
c
q
\alpha
~q~
\operatorname{P}(Λ=c\midH0)~+~\operatorname{P}(Λ<c\midH0)~=~\alpha~.
\alpha
The likelihood ratio is a function of the data
x
\theta
The numerator corresponds to the likelihood of an observed outcome under the null hypothesis. The denominator corresponds to the maximum likelihood of an observed outcome, varying parameters over the whole parameter space. The numerator of this ratio is less than the denominator; so, the likelihood ratio is between 0 and 1. Low values of the likelihood ratio mean that the observed result was much less likely to occur under the null hypothesis as compared to the alternative. High values of the statistic mean that the observed outcome was nearly as likely to occur under the null hypothesis as the alternative, and so the null hypothesis cannot be rejected.
The following example is adapted and abridged from .
Suppose that we have a random sample, of size, from a population that is normally-distributed. Both the mean,, and the standard deviation,, of the population are unknown. We want to test whether the mean is equal to a given value, .
Thus, our null hypothesis is and our alternative hypothesis is . The likelihood function is
l{L}(\mu,\sigma\midx)=\left(2\pi\sigma2\right)-n/2\exp\left(
n | |
-\sum | |
i=1 |
(xi-\mu)2 | |
2\sigma2 |
\right).
With some calculation (omitted here), it can then be shown that
λLR=nln\left[1+
t2 | |
n-1 |
\right]
See main article: Wilks' theorem.
If the distribution of the likelihood ratio corresponding to a particular null and alternative hypothesis can be explicitly determined then it can directly be used to form decision regions (to sustain or reject the null hypothesis). In most cases, however, the exact distribution of the likelihood ratio corresponding to specific hypotheses is very difficult to determine.
Assuming is true, there is a fundamental result by Samuel S. Wilks: As the sample size
n
infty
λLR
\chi2
\Theta
\Theta0
λ
λLR
\chi2