Likelihood-ratio test
In statistics, the likelihood-ratio test assesses the goodness of fit of two competing statistical models based on the ratio of their likelihoods, specifically one found by maximization over the entire parameter space and another found after imposing some constraint. If the constraint is supported by the observed data, the two likelihoods should not differ by more than sampling error. 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 is the oldest of the three classical approaches to hypothesis testing, together with the Lagrange multiplier test and the Wald test. In fact, the latter two can be conceptualized as approximations to the likelihood-ratio test, and are asymptotically equivalent. 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.
Definition
General
Suppose that we have a statistical model with parameter space. A null hypothesis is often stated by saying that the parameter is in a specified subset of. The alternative hypothesis is thus that is in the complement of, i.e. in, which is denoted by. The likelihood ratio test statistic for the null hypothesis is given by:where the quantity inside the brackets is called the likelihood ratio. Here, the notation refers to the supremum function. As all likelihoods are positive, and as the constrained maximum cannot exceed the unconstrained maximum, the likelihood ratio is bounded between zero and one.
Often the likelihood-ratio test statistic is expressed as a difference between the log-likelihoods
where
is the logarithm of the maximized likelihood function, and is the maximal value in the special case that the null hypothesis is true and
denote the respective arguments of the maxima and the allowed ranges they're embedded in. Multiplying by −2 ensures mathematically that converges asymptotically to being ²-distributed if the null hypothesis happens to be true. The finite sample distributions of likelihood-ratio tests are generally unknown.
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.
Case of simple hypotheses
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 :In this case, under either hypothesis, the distribution of the data is fully specified: there are no unknown parameters to estimate. For this case, a variant of the likelihood-ratio test is available:
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:
The values and are usually chosen to obtain a specified significance level, via the relation
The Neyman–Pearson lemma states that this likelihood-ratio test is the most powerful among all level tests for this case.
Interpretation
The likelihood ratio is a function of the data ; therefore, it is a statistic, although unusual in that the statistic's value depends on a parameter,. 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.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.
An example
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
With some calculation, it can then be shown that
where is the -statistic with degrees of freedom. Hence we may use the known exact distribution of to draw inferences.
Asymptotic 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. 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 approaches Infinity|, the test statistic asymptotically will be chi-squared distributed with degrees of freedom equal to the difference in dimensionality of and. This implies that for a great variety of hypotheses, we can calculate the likelihood ratio for the data and then compare to the value corresponding to a desired statistical significance as an approximate statistical test. Other extensions exist.