Lecture 25 Likelihood-Ratio Tests
Lecture 23 ended with a gap: the Neyman–Pearson lemma covers only simple hypotheses, and for the two-sided alternative no uniformly most powerful test exists. In this lecture we extend the likelihood ratio to composite hypotheses by comparing maximised likelihoods. We will see that the large-sample behaviour of the resulting test, described by Wilks’ theorem, follows from the asymptotic theory of lecture 17.
25.1 The Generalised Likelihood Ratio
As in lecture 23, we write for the likelihood of the data and for the log-likelihood, where the parameter space is now allowed to be a subset of . We consider the following testing problem:
for a subset , where both hypotheses can be composite.
The Neyman–Pearson test compares the likelihoods of two parameter values. A composite hypothesis contains many parameter values, and the natural extension is to represent each hypothesis by the value in it which fits the data best, i.e. by the maximum of the likelihood over the hypothesis. For the alternative we use a small modification of this idea, which we explain after the definition.
The generalised likelihood ratio for testing against is given by
The generalised likelihood-ratio test at level rejects , if , where the constant is chosen so that the size
is as large as possible without exceeding .
The definition contains one choice which may look surprising: the denominator maximises the likelihood over all of , rather than only over the alternative . With this choice the denominator is , the likelihood at the maximum likelihood estimator from lecture 5. Also, since the numerator maximises over the smaller set , we always have .
Maximising over the alternative instead would lead to the same test. To see this, let be the ratio with the supremum over in the denominator. The supremum over is the larger of the suprema over and , and thus . Since , a critical value would reject for every dataset, and thus only is of interest. For every the events and coincide.
The ratio also shows how the new test relates to the test from lecture 23. If we restrict the model to the two parameter values of that lecture, the generalised likelihood-ratio test becomes the Neyman–Pearson test. Indeed, for and we have and , where is the likelihood ratio from lecture 23. Thus for the test rejects if , and this is the most powerful test of theorem 23.2 with threshold . For composite hypotheses no such optimality is guaranteed.
We now return to the general case and consider what the value of tells us about the data. The numerator of is the likelihood at the restricted maximum likelihood estimator , the best fit within . If is simple, then and the numerator is just . A value of close to one means that imposing costs little in fit. A value close to zero means that fits the data much worse than the full model, and this is the evidence against .
Since we usually work with log-likelihoods, it is convenient to express the test on the log scale. We call
the generalised likelihood-ratio statistic. It is twice the drop in the maximised log-likelihood when is imposed. Since is decreasing, we have if and only if , and thus the test rejects for large values of .
As a first example, we apply the test to the two-sided problem from lecture 23, for which no uniformly most powerful test exists. When the variance is known, the distribution of under can be found exactly.
Let be i.i.d. with known and consider the null hypothesis against the alternative . Thus we have and . From example 5.4 we know that the log-likelihood
attains its maximum over at . Since the null hypothesis is simple, the restricted maximiser is and using formula (25.1) we find
Using the identity (2.1) from lecture 2, where is substituted for , we find that the difference of the two sums of squares is . Thus we have
The test rejects for large values of , i.e. for large values of . Thus we have recovered the two-sided -test, which example 22.8 derived by common sense.
Under , the statistic is standard normally distributed by proposition A.4 and thus, by definition A.2, its square satisfies for every sample size . Let be the -quantile of the distribution. Then the level test rejects if . Since , the value is the -quantile of and thus we have ; from the tables we find . For , , and observed mean , for the data from lecture 22, we find , which is larger than and thus is rejected at level . The -value is , which is the same value as obtained for the two-sided test in section 22.5.
One more property follows directly from the definition. If is a one-to-one reparametrisation, the suprema in the definition of do not change and thus and do not depend on the choice of parametrisation of the model. This is the same invariance as in proposition 5.6, and exercise 25.3 verifies it in an example.
25.2 Wilks’ Theorem
In example 25.2 the statistic is exactly distributed under , because is exactly normal. Wilks’ theorem shows that in regular models has approximately a chi-squared distribution under for large samples.
The theorem is stated for hypotheses which fix some coordinates of the parameter. Let be open, write for the coordinates of the parameter and let the null hypothesis fix the first coordinates at given values,
where . For the null hypothesis is simple, and for the free coordinates are nuisance parameters, unknown parameters about which the hypothesis says nothing. The number of constraints is the difference between the dimensions of and .
Let be i.i.d. from a model with parameter which is regular enough for the vector form of theorem 17.1, stated without its conditions in section 17.6, to hold. Let be of the form (25.3), suppose that with probability tending to one the restricted maximum likelihood estimator is the unique root of the likelihood equations over , and let be the generalised likelihood-ratio statistic for a sample of size . Then for every we have
under as .
We only give a proof sketch for the simplest case , a one-dimensional parameter with a simple null hypothesis, which shows where the chi-squared distribution comes from.
In this case we write the null hypothesis as , where is the value from (25.3), and we have . We will expand the log-likelihood around the maximum likelihood estimator (MLE) instead of around as in lecture 17: using Taylor’s theorem with the Lagrange form of the remainder we find
for some between and . Under the conditions of the theorem, solves the likelihood equation with probability tending to one. On this event the first derivative at is zero. When we rearrange, the factor in cancels the factor of the remainder term, and we get
Now assume that is true. By theorem 17.1 we have , and thus, by the continuous mapping theorem, proposition A.17, the second factor converges in distribution to , where is standard normally distributed. The first factor is the term from the proof of theorem 17.1, which converges in probability to by the law of large numbers, proposition A.14, but evaluated at instead of . Since is between and the consistent estimator , the bound (R4) on the third derivative shows, as for the observed information in section 17.3, that this factor still converges in probability to . Finally, by Slutsky’s theorem, proposition A.16, we find
by definition A.2. Since the Fisher information cancels, the limit is independent of the details of the model. This completes the proof sketch. ∎
The proof for the general case is more challenging: the expansion will be in variables and will use the vector version of theorem 17.1, and the limit which replaces will be the sum of independent, squared standard normal variables, one for each constraint. This is the origin of the number of degrees of freedom in the theorem. We omit this proof here.
25.3 Using the Theorem
Wilks’ theorem turns the generalised likelihood-ratio test into a recipe: compute the statistic from the two maximised log-likelihoods, found numerically if need be as in lecture 18; count the degrees of freedom ; reject at approximate level , if ; and report the approximate -value for the observed value . Only the counting of degrees of freedom requires some care: nuisance parameters are unrestricted under both hypotheses and do not count.
The theorem is a limit statement and there are three cases where problems can occur when applying the theorem to a fixed . First, the approximation may be poor for small sample size, as exercise 25.1 shows, and lecture 27 uses simulation to show how it improves as increases. Whenever the exact distribution of or of an equivalent test statistic is known, this distribution should be used, and lecture 31 does so for the standard tests. Secondly, if the regularity conditions are violated, for example if the support of the distribution depends on the parameter or if the model requires and the null hypothesis is , the expansion (25.4) will break down and the limit will not be . Finally, the theorem only describes under . The theorem gives the size of the test, but the power of the test must be determined separately.
-
•
For hypotheses against , the generalised likelihood ratio is , and the generalised likelihood-ratio test rejects for small , i.e. for large .
-
•
For a two-point parameter space the test is the Neyman–Pearson test; in general it is unchanged by reparametrisation.
-
•
For a normal mean with known variance and , the statistic is , which is exactly under and the test is the two-sided -test.
-
•
Wilks’ theorem states that, under regularity conditions, if fixes of the parameters, then under . The theorem is given without proof. For , a Taylor expansion of around together with theorem 17.1 shows why the limit is .
-
•
To use the theorem, compute from the two maximised log-likelihoods, count , reject if . The approximation can be poor for small , the test fails if the regularity conditions are violated, and the power must be determined separately.
Let be i.i.d. , where both parameters are unknown. Consider the hypothesis against the alternative , where is a nuisance parameter. Let , and .
-
1.
Following example 5.4, show that the maximised log-likelihood function over is given by
-
2.
Show that, restricting ourselves to the region , the maximum of the likelihood function is attained for and find an expression for in terms of and using the identity (2.1).
-
3.
Deduce that
and that the generalised likelihood-ratio test rejects for large values of .
-
4.
State the approximate distribution of under given by theorem 25.3 and justify your answer for the degrees of freedom. Recall that, under , the statistic follows the distribution by definition A.5 and proposition A.4. For , determine the value of above which the approximate test with critical value rejects and compare your result with the -quantile of the distribution. Comment upon your result.
An experiment with possible outcomes is repeated times independently. The number of times each outcome occurs is given by for outcome . Thus, is multinomially distributed with probability weights
for all with , where satisfies and . We test for a given vector with for all and against the alternative .
-
1.
Show that the log-likelihood function is up to an additive constant and use the Lagrange multiplier method, with constraint , to show that the maximum of the likelihood function is at .
-
2.
Show that
where .
-
3.
Explain why theorem 25.3 gives under .
-
4.
A die is thrown times and the six faces appear , , , , and times, respectively. Test the hypothesis that the die is fair at level , using .
-
5.
Let so that . Show that, by expanding the logarithm to second order in , we find
This is Pearson’s chi-squared statistic. Compute the value for the die in the previous part of the question.
Let be i.i.d. with Bernoulli distribution, i.e. with success probability . Furthermore, let and and consider the hypothesis against the alternative .
-
1.
Show that
where we use the convention .
-
2.
Determine the approximate distribution of under for large and use the resulting distribution to derive a test at level .
-
3.
In trials, we observed successes. Test the hypothesis at level and determine the approximate -value.
-
4.
In exercise 17.2, the model was reparametrised using the log-odds . Show that the generalised likelihood-ratio statistic for testing coincides with the one in the first part for , the value of the null proportion.