Likelihood-ratio test

# Overview
A likelihood-ratio test is a statistical test in which a ratio is computed between the maximum  probability of a result under two different hypotheses, so that statisticians can make a decision between two hypotheses based on the value of this ratio.
The numerator corresponds to the maximum probability of an observed result under the null hypothesis. The denominator corresponds to the maximum probability of an observed result under the alternative hypothesis. Under certain regularity conditions, the numerator of this ratio is less than the denominator.  The likelihood ratio under those conditions is between 0 and 1.  Lower values of the likelihood ratio mean that the observed result was less likely to occur under the null hypothesis.  Higher values mean that the observed result was more likely to occur under the null hypothesis.
The likelihood ratio, denoted as \Lambda (the Greek letter lambda), is a random variable with a probability distribution.  If the distribution of the likelihood ratio corresponding to a particular null and alternative hypothesis can be explicitly determined that, directly, can be used to form decision regions to reject or not 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, though, says that under certain regularity conditions the distribution of -2\log(\Lambda) will tend to be a chi squared distribution for large sized samples.  Meaning that for a great variety of hypothesis, a practitioner can take the likelihood ratio \Lambda, algebraically manipulate \Lambda into -2\log(\Lambda), compare the value of -2\log(\Lambda) given a particular result to the chi squared value corresponding to a desired statistical significance, and create a reasonable decision based on that comparison.

# Technical introduction
A likelihood-ratio test, also called LR test, is a statistical test in which the ratio is computed between the maximum of the likelihood function under the null hypothesis and the maximum with that constraint relaxed.  Many common test statistics such as the Z-test, the F-test, Pearson's chi-square test and the G-test can be phrased as log-likelihood ratios or approximations thereof.  For example, if the likelihood ratio is \Lambda and the null hypothesis holds, then for commonly occurring families of probability distributions, -2\log(\Lambda) has an asymptotic chi-square distribution.

# Details
A statistical model is often a parametrized family of probability density functions or probability mass functions f_{\theta}(x).  A null hypothesis is often stated by saying the parameter \theta is in a specified subset \Theta_0 of the parameter space  \Theta.  The likelihood function is L(\theta) = L(\theta|x) = p(x|\theta) = f_{\theta}(x) is a function of the parameter \theta with x held fixed at the value that was actually observed, i.e., the data.  The likelihood ratio is
This is a function of the data x, and is therefore a statistic.  The likelihood-ratio test rejects the null hypothesis if the value of this statistic is too small, and is justified by the Neyman-Pearson lemma.  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).
If the null hypothesis is true and the observation is a sequence of n independent identically distributed random variables, then as the sample size n approaches \infty, the test statistic -2 \log(\Lambda) will be asymptotically \chi^2 distributed with degrees of freedom equal to the difference in dimensionality of \Theta and \Theta_0.

# Example
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.
Here \Theta consists of the parameters p_{1H}, p_{1T}, p_{2H}, and p_{2T}, which are the probability that coin 1 (2) comes up heads (tails).  The hypothesis space H is defined by the usual constraints on a distribution, p_{ij} \ge 0, p_{ij} \le 1, and  p_{iH} + p_{iT} = 1 .  The null hypothesis H_0 is the sub-space 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
Writing m_{ij} for the best values for p_{ij} under the null hypothesis H_0, maximum likelihood is achieved with
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 two-dimensional H to be reduced to the one-dimensional H_0, the asymptotic distribution for the test will be \chi^2(1), the \chi^2 distribution with one degree of freedom.
For the general contingency table, we can write the log-likelihood ratio statistic as

# Interpretation in medicine
A large likelihood ratio, for example a value more than 10, helps rule in disease.  A small likelihood ratio, for example a value less than 0.1, helps rule out disease.

# Criticism
Bayesian criticisms of classical likelihood ratio tests focus on two issues:
- the supremum function in the calculation of the likelihood ratio, saying that this takes no account of the uncertainty about  and that using maximum likelihood estimates in this way can promote complicated alternative hypotheses with an excessive number of free parameters;
- testing the probability that the sample would produce a result as extreme or more extreme under the null hypothesis, saying that this bases the test on the probability of extreme events that did not happen.
Instead they put forward methods such as Bayes factors, which explicitly take uncertainty about the parameters into account, and which are based on the evidence that did occur.
In medicine, the use of likelihood ratio tests has been promoted to assist in interpreting diagnostic tests. However, physicians rarely make these calculations and make errors when they do attempt calculations. A randomized controlled trial compared how well physicians interpreted diagnostic tests that were presented as either sensitivity and specificity, a likelihood ratio, or an inexact graphic of the likelihood ratio, found no difference in ability to interpret test results.