
This article has multiple issues. Please help improve it or discuss these issues on the talk page. 
 This article needs attention from an expert in Statistics. Please add a reason or a talk parameter to this template to explain the issue with the article. WikiProject Statistics (or its Portal) may be able to help recruit an expert. (November 2008) 
 
In statistics, a likelihood ratio test is a statistical test used to compare the fit of two models, one of which (the null model) is a special case of the other (the alternative model). The test is based on the likelihood ratio, which expresses how many times more likely the data are under one model than the other. This likelihood ratio, or equivalently its logarithm, can then be used to compute a pvalue, or compared to a critical value to decide whether to reject the null model in favour of the alternative model. When the logarithm of the likelihood ratio is used, the statistic is known as a loglikelihood ratio statistic, and the probability distribution of this test statistic, assuming that the null model is true, can be approximated using Wilks' theorem.
In the case of distinguishing between two models, each of which has no unknown parameters, use of the likelihood ratio test can be justified by the Neyman–Pearson lemma, which demonstrates that such a test has the highest power among all competitors.^{[1]}
Use
Each of the two competing models, the null model and the alternative model, is separately fitted to the data and the loglikelihood recorded. The test statistic (often denoted by D) is twice the difference in these loglikelihoods:
 $$
\begin{align}
D & = 2\ln\left( \frac{\text{likelihood for null model}}{\text{likelihood for alternative model}} \right) \\
&= 2\ln(\text{likelihood for null model}) + 2\ln(\text{likelihood for alternative model}) \\
\end{align}
The model with more parameters will always fit at least as well (have an equal or greater loglikelihood). Whether it fits significantly better and should thus be preferred is determined by deriving the probability or pvalue of the difference D. Where the null hypothesis represents a special case of the alternative hypothesis, the probability distribution of the test statistic is approximately a chisquared distribution with degrees of freedom equal to df2 − df1 .^{[2]} Symbols df1 and df2 represent the number of free parameters of models 1 and 2, the null model and the alternative model, respectively.
The test requires nested models, that is: models in which the more complex one can be transformed into the simpler model by imposing a set of constraints on the parameters.^{[3]}
For example: if the null model has 1 free parameter and a loglikelihood of −8024 and the alternative model has 3 degrees of freedom and a loglikelihood of −8012, then the probability of this difference is that of chisquared value of +2·(8024 − 8012) = 24 with 3 − 1 = 2 degrees of freedom. Certain assumptions must be met for the statistic to follow a chisquared distribution and often empirical pvalues are computed.
Background
The likelihood ratio, often denoted by $\backslash Lambda$ (the capital Greek letter lambda), is the ratio of the likelihood function varying the parameters over two different sets in the numerator and denominator.
A likelihood ratio test is a statistical test for making a decision between two hypotheses based on the value of this ratio.
It is central to the Neyman–Pearson approach to statistical hypothesis testing, and, like statistical hypothesis testing in general, is both widely used and criticized.
Simplevssimple hypotheses
A statistical model is often a parametrized family of probability density functions or probability mass functions $f(x\backslash theta)$. A simplevssimple hypotheses test has completely specified models under both the null and alternative hypotheses, which for convenience are written in terms of fixed values of a notional parameter $\backslash theta$:
 $$
\begin{align}
H_0 &:& \theta=\theta_0 ,\\
H_1 &:& \theta=\theta_1 .
\end{align}
Note that under either hypothesis, the distribution of the data is fully specified; there are no unknown parameters to estimate. The likelihood ratio test statistic can be written as:^{[4]}^{[5]}
 $$
\Lambda(x) = \frac{ L(\theta_0x) }{ L(\theta_1x) } = \frac{ f(x\theta_0) }{ f(x\theta_1) }
or
 $\backslash Lambda(x)=\backslash frac\{L(\backslash theta\_0\backslash mid\; x)\}\{\backslash sup\backslash \{\backslash ,L(\backslash theta\backslash mid\; x):\backslash theta\backslash in\backslash \{\backslash theta\_0,\backslash theta\_1\backslash \}\backslash \}\},$
where $L(\backslash thetax)$ is the likelihood function. Note that some references may use the reciprocal as the definition.^{[6]} In the form stated here, the likelihood ratio is small if the alternative model is better than the null model and the likelihood ratio test provides the decision rule as:
 If $\backslash Lambda\; >\; c$, do not reject $H\_0$;
 If $\backslash Lambda\; <\; c$, reject $H\_0$;
 Reject with probability $q$ if $\backslash Lambda\; =\; c\; .$
The values $c,\; \backslash ;\; q$ are usually chosen to obtain a specified significance level $\backslash alpha$, through the relation: $q\backslash cdot\; P(\backslash Lambda=c\; \backslash ;\backslash ;\; H\_0)\; +\; P(\backslash Lambda\; <\; c\; \backslash ;\; \; \backslash ;\; H\_0)\; =\; \backslash alpha$. The NeymanPearson lemma states that this likelihood ratio test is the most powerful among all level $\backslash alpha$ tests for this problem.^{[1]}
Definition (likelihood ratio test for composite hypotheses)
A null hypothesis is often stated by saying the parameter $\backslash theta$ is in a specified subset $\backslash Theta\_0$ of the parameter space $\backslash Theta$.
 $$
\begin{align}
H_0 &:& \theta \in \Theta_0\\
H_1 &:& \theta \in \Theta_0^{\complement}
\end{align}
The likelihood function is $L(\backslash thetax)\; =\; f(x\backslash theta)$ (with $f(x\backslash theta)$ being the pdf or pmf) is a function of the parameter $\backslash theta$ with $x$ held fixed at the value that was actually observed, i.e., the data. The likelihood ratio test statistic is ^{[7]}
 $\backslash Lambda(x)=\backslash frac\{\backslash sup\backslash \{\backslash ,L(\backslash theta\backslash mid\; x):\backslash theta\backslash in\backslash Theta\_0\backslash ,\backslash \}\}\{\backslash sup\backslash \{\backslash ,L(\backslash theta\backslash mid\; x):\backslash theta\backslash in\backslash Theta\backslash ,\backslash \}\}.$
Here, the $\backslash sup$ notation refers to the Supremum function.
A likelihood ratio test is any test with critical region (or rejection region) of the form $\backslash \{x\backslash Lambda\; \backslash le\; c\backslash \}$ where $c$ is any number satisfying $0\backslash le\; c\backslash le\; 1$. Many common test statistics such as the Ztest, the Ftest, Pearson's chisquared test and the Gtest are tests for nested models and can be phrased as loglikelihood ratios or approximations thereof.
Interpretation
Being a function of the data $x$, the LR is therefore a statistic. The likelihood ratio test rejects the null hypothesis if the value of this statistic is too small. How small is too small depends on the significance level of the test, i.e., on what probability of Type I error is considered tolerable ("Type I" errors consist of the rejection of a null hypothesis that is true).
The numerator corresponds to the maximum 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. The likelihood ratio hence is between 0 and 1. Low values of the likelihood ratio mean that the observed result was 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 compared to the alternative, and the null hypothesis cannot be rejected.
Distribution: 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 accept/reject the null hypothesis). In most cases, however, the exact distribution of the likelihood ratio corresponding to specific hypotheses is very difficult to determine. A convenient result, attributed to Samuel S. Wilks, says that as the sample size $n$ approaches $\backslash infty$, the test statistic $2\; \backslash log(\backslash Lambda)$ for a nested model will be asymptotically $\backslash chi^2$ distributed with degrees of freedom equal to the difference in dimensionality of $\backslash Theta$ and $\backslash Theta\_0$.^{[8]} This means that for a great variety of hypotheses, a practitioner can compute the likelihood ratio $\backslash Lambda$ for the data and compare $2\backslash log(\backslash Lambda)$ to the chi squared value corresponding to a desired statistical significance as an approximate statistical test.
Examples
Coin tossing
An example, in the case of Pearson's test, we might try to compare two coins to determine whether they have the same probability of coming up heads. Our observation can be put into a contingency table with rows corresponding to the coin and columns corresponding to heads or tails. The elements of the contingency table will be the number of times the coin for that row came up heads or tails. The contents of this table are our observation $X$.

Heads 
Tails 
Coin 1 
$k\_\{1H\}$ 
$k\_\{1T\}$ 
Coin 2 
$k\_\{2H\}$ 
$k\_\{2T\}$ 
Here $\backslash Theta$ consists of the parameters $p\_\{1H\}$, $p\_\{1T\}$, $p\_\{2H\}$, and $p\_\{2T\}$, which are the probability that coins 1 and 2 come up heads or tails. The hypothesis space $H$ is defined by the usual constraints on a distribution, $0\; \backslash le\; p\_\{ij\}\; \backslash le\; 1$, and $p\_\{iH\}\; +\; p\_\{iT\}\; =\; 1$. The null hypothesis $H\_0$ is the subspace where $p\_\{1j\}\; =\; p\_\{2j\}$. In all of these constraints, $i\; =\; 1,2$ and $j\; =\; H,T$.
Writing $n\_\{ij\}$ for the best values for $p\_\{ij\}$ under the hypothesis $H$, maximum likelihood is achieved with
 $n\_\{ij\}\; =\; \backslash frac\{k\_\{ij\}\}\{k\_\{iH\}+k\_\{iT\}\}.$
Writing $m\_\{ij\}$ for the best values for $p\_\{ij\}$ under the null hypothesis $H\_0$, maximum likelihood is achieved with
 $m\_\{ij\}\; =\; \backslash frac\{k\_\{1j\}+k\_\{2j\}\}\{k\_\{1H\}+k\_\{2H\}+k\_\{1T\}+k\_\{2T\}\},$
which does not depend on the coin $i$.
The hypothesis and null hypothesis can be rewritten slightly so that they satisfy the constraints for the logarithm of the likelihood ratio to have the desired nice distribution. Since the constraint causes the twodimensional $H$ to be reduced to the onedimensional $H\_0$, the asymptotic distribution for the test will be $\backslash chi^2(1)$, the $\backslash chi^2$ distribution with one degree of freedom.
For the general contingency table, we can write the loglikelihood ratio statistic as
 $2\; \backslash log\; \backslash Lambda\; =\; 2\backslash sum\_\{i,\; j\}\; k\_\{ij\}\; \backslash log\; \backslash frac\{n\_\{ij\}\}\{m\_\{ij\}\}.$
References
External links
 Practical application of likelihood ratio test described
 Richard Lowry's Predictive Values and Likelihood Ratios Online Clinical Calculator
This article was sourced from Creative Commons AttributionShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, EGovernment Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a nonprofit organization.