Likelihood Ratio Tests
Suppose you fit two nested models to the same data. One is a simple model with free parameters. The other is a richer model with . Suppose the richer model fits noticeably better. Is the improvement real? Or could it plausibly be explained by chance alone under the simpler model? This is the single most common question in applied statistics. It arises in genetics (does adding an interaction term help?). It arises in econometrics (does a restricted regression suffice?). It also arises in machine learning (is a mixture-of-two-Gaussians better than one Gaussian?). The likelihood ratio test (LRT) answers it with a universal recipe. Compare the maximum likelihood attainable under the small model to the maximum likelihood attainable under the big model. Then calibrate the resulting ratio against a chi-squared distribution. The idea traces back to the Neyman-Pearson Lemma. It shows that for testing one simple hypothesis against another, the likelihood ratio is the optimal test statistic. The generalization to composite hypotheses is due to Samuel Wilks in 1938. Composite hypotheses pin down a parameter only up to a lower-dimensional constraint, rather than to a single point. This generalization is one of the great unifying results of statistical theory. It explains why so many "different" classical tests are really the same idea in disguise. These include the -test, the -test for nested linear models, and the chi-squared test of independence in contingency tables. Each is a special or asymptotic case of the generalized likelihood ratio statistic. The big picture is this: maximum likelihood estimation gives us, for any model, a well-defined "best fit" score. Nested models can be compared by how much that score improves. We check this improvement when we allow the extra parameters to move. Wilks's theorem says that under mild regularity conditions, something remarkable happens. Twice the log of this improvement converges, as the sample size grows, to a chi-squared distribution. Its degrees of freedom equal exactly the number of extra parameters, . This is remarkable: the same asymptotic distribution applies essentially universally. This holds regardless of the specific parametric family. It requires only that the null hypothesis lies in the interior of the parameter space. It also requires that the usual smoothness conditions for Maximum Likelihood Estimation hold. This article builds the generalized likelihood ratio statistic from first principles. It states and proves Wilks's theorem via a careful Taylor expansion argument. It works through two genuinely asymmetric numerical examples: an exponential rate test and a multinomial goodness-of-fit test. Finally, it shows exactly what breaks — and why — when the regularity conditions fail.
- The likelihood ratio statistic compares the best achievable likelihood under to the best achievable likelihood under the full (unrestricted) model.
- Wilks's theorem: under regularity conditions, in distribution under , where is the number of constraints imposed by .
- The test rejects for large values of ; it reduces to familiar , , and tests in classical exponential-family settings.
- The proof rests on a second-order Taylor expansion of the log-likelihood around the MLE, using consistency and asymptotic normality of the MLE.
- Regularity matters: if the true parameter sits on the boundary of the parameter space, or the model is non-identifiable, the chi-squared limit fails outright.
- LRTs underlie model-selection tools (AIC, deviance tests in GLMs) and generalize the classical tests you already know into one master framework.
- Key idea: the log-likelihood surface's curvature near its maximum encodes exactly how much evidence the data carry against a constraint, and that curvature is universally chi-squared in the large-sample limit.
Where this lives today
The likelihood ratio test is the backbone of deviance-based model comparison in generalized linear models: the "deviance" reported by any GLM software (logistic regression, Poisson regression, etc.) is precisely comparing a fitted model to the saturated model, and nested-model comparisons (does adding a covariate help?) are literally likelihood ratio tests, referenced against . In genetics, LOD scores in linkage analysis are rescaled likelihood ratio statistics, and genome-wide association studies routinely use LRTs to compare additive vs. dominance models. In econometrics, LR, Wald, and Lagrange-multiplier (score) tests form a standard trio taught alongside the classical -test for linear restrictions, which is the exact (non-asymptotic) analogue of the LRT in Gaussian linear models. In phylogenetics and evolutionary biology, likelihood ratio tests compare nested substitution models of DNA evolution to decide, for instance, whether a molecular clock assumption is justified. In signal processing and radar detection, the Neyman–Pearson-optimal detector for known signals in Gaussian noise is literally a likelihood ratio test, and its generalized version underlies detection theory when signal parameters are unknown (GLRT detectors). In machine learning, likelihood ratio ideas underlie information criteria (AIC is derived from an asymptotic bias-correction to the likelihood ratio) and permeate work on model selection, anomaly detection, and hypothesis testing for mixture and latent-variable models — precisely the boundary cases where the classical theorem, as the counterexample above shows, must be modified. The theorem's asymptotic universality is also the conceptual bridge to Bayesian Inference: An Introduction, where Bayes factors serve an analogous "evidence comparison" role but replace the maximized likelihood with an integrated likelihood over a prior.
Ask the tutor: How does the likelihood ratio test connect to Bayesian model comparison via Bayes factors?
Let be i.i.d. observations with joint density/mass function , . Let denote the likelihood function and the log-likelihood. Consider testing
where is a restricted (typically lower-dimensional) subset of the parameter space. The generalized likelihood ratio is
Since , we have . Small values of indicate that the data are much better explained by some outside than by any inside it, i.e. evidence against . The likelihood ratio test at nominal size rejects when
where is chosen (exactly or asymptotically) so that . In the important nested case where has dimension , is defined by fixing smooth functionally independent constraints (so has dimension ), the test statistic is usually reported as
where is the unrestricted MLE and is the restricted MLE.
Intuition
Think of the log-likelihood function as a hill over the parameter space. The unrestricted MLE sits at the summit. The null hypothesis carves out a lower-dimensional slice of the landscape — a subspace, curve, or hyperplane — and is the highest point on that slice. If happens to pass near the true summit, then will be almost as large as , and the drop in log-likelihood, , will be small. If cuts through a region far from the summit, the drop is large. The remarkable fact — Wilks's insight — is that near the summit, a smooth log-likelihood behaves like a (multivariate) downward-opening parabola, because the first-order term in a Taylor expansion vanishes at the maximum. The "drop in height" when restricting to a -dimensional slice through (approximately) the same point is then a quadratic form in Gaussian-distributed estimation errors — exactly the structure that produces a chi-squared distribution with degrees of freedom, being the codimension of the slice.
Central theorem
Let be i.i.d. with density , an open set. Assume: 1. (Identifiability) implies (as densities/mass functions, a.e.). 2. (Smoothness) The support of does not depend on , and is three times continuously differentiable in in a neighborhood of the true value , with third derivatives dominated by an integrable function (regularity conditions sufficient for the standard MLE asymptotics). 3. (Nonsingular Fisher information) The Fisher information matrix
exists and is finite and positive definite in a neighborhood of . 4. (Interior null) for a function that is continuously differentiable with Jacobian of full rank at , and the true parameter lies in and is an interior point of (not on the boundary of or of relative to ). 5. (Consistency) The unrestricted MLE and restricted MLE exist, are consistent for , and are interior local maximizers with probability tending to 1. Then, under , as ,
where is the number of independent constraints imposed by (the codimension of in ).
We use the standard Taylor-expansion technique for MLE asymptotics, applied twice: once at the unrestricted MLE, once at the restricted MLE, then combined via a change of coordinates that separates the "free" and "constrained" directions.
Step 1: Reduction to a linear constraint via reparametrization. Since has Jacobian of rank at , the implicit function theorem lets us choose (locally, in a neighborhood of ) a smooth reparametrization such that is a diffeomorphism near and
Write with free and the constrained block, so becomes . Because likelihood ratios and MLEs are invariant under smooth reparametrization ( evaluated at the corresponding point is unchanged), it suffices to prove the theorem in this new coordinate system with a genuinely linear constraint . Relabel for the true parameter value in the new coordinates.
Step 2: Asymptotic normality of the unrestricted MLE. Under conditions 2–3, the standard MLE consistency and asymptotic normality theorem (proved via a Taylor expansion of the score equation around ) gives
where is the Fisher information matrix in the -coordinates (which exists and is positive definite by condition 3 and the chain rule for Fisher information under diffeomorphisms). This is a prerequisite result from Maximum Likelihood Estimation, not re-derived here, but we use its proof technique — a second-order Taylor expansion of around the true parameter — again below.
Step 3: Second-order expansion of around . Let be the unrestricted MLE in the new coordinates. Because is three times continuously differentiable and (first-order condition at an interior maximizer, which holds with probability by condition 5), Taylor's theorem gives, for any near ,
where and uniformly over in a shrinking neighborhood of , by the dominated third-derivative condition (condition 2) together with in probability (condition 5) and . By the law of large numbers and continuity, .
Step 4: Evaluate at the restricted MLE. The restricted MLE maximizes over . Substituting into Step 3's expansion and re-maximizing over (equivalently, directly re-expanding around restricted to the subspace) yields, after minimizing the quadratic form over the free block ,
where denotes the block of corresponding to the -coordinates. This is the standard fact that minimizing a positive-definite quadratic form over the -block, for fixed -block, produces the Schur-complement quadratic form in alone; this is a direct algebraic computation from block matrix inversion, not an appeal to any unproved result.
Step 5: Distribution of the quadratic form. By Step 2 (applied to the -block, using that marginals of jointly asymptotically normal vectors are asymptotically normal),
since under . Also implies (by continuity of matrix inversion and the Schur complement, both continuous maps on the relevant open set of nonsingular matrices)
Let . Then
by Slutsky's theorem, where , applying the continuous mapping theorem to the pair converging jointly (in distribution for , in probability for the matrix) to .
Step 6: Identify the quadratic form as . Since is a positive definite matrix (it is a principal-block inverse of the positive definite matrix , hence positive definite), write with symmetric positive definite. Set . Then , and
a sum of independent squared standard normals — precisely the definition of a random variable (this is the standard construction of the chi-squared law from Standard Tests: t, Chi-Squared, and F). Combining Steps 5 and 6,
which completes the proof.
∎When is a one-parameter exponential family and is a simple hypothesis (), the LRT statistic is asymptotically equivalent (to first order) to the squared Wald statistic
which itself converges to , matching the square of the classical -statistic. This recovers, asymptotically, the familiar one-parameter tests as a special case of Wilks's theorem.
Worked examples
Example 1 — Exponential rate parameter, asymmetric numbers. Suppose lifetimes are i.i.d. with density , . We test
with data observations having sample mean (so ). The log-likelihood is . The unrestricted MLE solves , giving
Under , is a single point, so trivially. Here , and has dimension , so . Compute the two log-likelihoods (dropping no constants, since they cancel in the difference but we track them for clarity):
(We used exactly, since .) The test statistic is
Compare to : the critical value is . Since , we fail to reject at the level; the -value is , so the observed rate is quite compatible with . As a sanity check, note the Wald approximation: , and the Wald statistic squared is
which is close to but not identical to — exactly as expected, since the LRT and Wald statistics agree only asymptotically, and is a moderate sample.
Example 2 — Multinomial goodness-of-fit with unequal cell counts. A genetics-style cross is predicted (under a proposed model ) to produce four phenotype categories in ratio . From offspring, the observed counts are
Under the general multinomial model, with is unrestricted (except for the simplex constraint), so free parameters. Under , is fixed at , so is a single point: constraints. The unrestricted MLE of a multinomial probability is simply the sample proportion, :
The multinomial log-likelihood (up to the multinomial coefficient, which is the same under both models and cancels) is . So
Compute term by term (natural log):
Sum: . Under , :
Sum: . The LRT statistic is
Comparing to (critical value at is ), gives ; the model fits comfortably. This matches the classical Pearson chi-squared statistic
which computes to
close to — the two statistics are asymptotically equivalent (both converge to under ), a second-order Taylor-expansion fact connecting the LRT statistic to Pearson's statistic in multinomial models.
Wilks's theorem requires that the true parameter be an interior point of 's ambient space relative to — i.e., the null hypothesis must not force the parameter to the boundary of the parameter space. Drop this hypothesis and the chi-squared limit fails.
Concrete failure. Let be i.i.d. with known variance , and suppose the parameter space is restricted on physical grounds to (e.g. represents a concentration or an intensity that cannot be negative). Test
with sitting on the boundary of . The unrestricted MLE over is , since the unconstrained maximizer of the Gaussian log-likelihood is , projected onto when . The restricted MLE under is simply . The likelihood ratio statistic is
Under (), . So with probability (whenever ), is exactly zero, and with probability , converges to the square of a standard normal, i.e. . The limiting distribution of is therefore
a 50–50 mixture of a point mass at zero and a — not itself. Using the naive critical value for a nominal test actually yields an asymptotic size of only , half the intended level. This single example (due essentially to Chernoff, 1954) shows precisely what the interior-null hypothesis buys you: without it, the quadratic Taylor expansion around is no longer valid on both sides, because the restricted maximizer is forced to the edge and cannot move freely in all directions — the "free directions" argument in Step 4 of the proof breaks down, since (here, the sign-constrained ) cannot range over an open neighborhood of .
Scope, edge cases & common traps
| Situation | What happens | Fix / correct approach |
|---|---|---|
| Null parameter on boundary of | Limit is a mixture of chi-squareds, not pure | Use Chernoff/Self-Korn theory for boundary problems, or reparametrize |
| Non-identifiable model under (e.g. testing number of mixture components) | Fisher information degenerates; limit is a supremum of a Gaussian process, not | Use specialized theory (e.g. Davies' test) for mixture order selection |
| Small | is only an asymptotic approximation; exact small-sample distribution may differ substantially | Use exact tests (e.g. exact Poisson/binomial LRTs) or bootstrap the null distribution |
| Nuisance parameters present in both models | Still fine — counts only the constrained dimensions, nuisance parameters are "profiled out" automatically | Compute , by maximizing over all free coordinates including nuisance ones |
| Non-nested models | — the ratio is not even guaranteed to lie in | Use Vuong's test or information criteria (AIC/BIC) instead |
The mathematician behind it
Origins · 1 minSamuel S. Wilks and how this was discovered
Samuel Stanley Wilks was an American mathematical statistician whose 1938 paper "The Large-Sample Distribution of the Likelihood Ratio for Testing Composite Hypotheses" established the theorem that bears his name. Wilks worked at Princeton for his entire career, where he built one of the first serious American graduate programs in mathematical statistics, trained influential students (including John Tukey), and was a founding force behind the Annals of Mathematical Statistics. His broader body of work — on multivariate analysis, statistical tables, and the mathematical foundations of experimental design — helped establish statistics as a rigorous mathematical discipline in the United States in the mid-20th century, moving it beyond its earlier home in applied biology and agriculture.
Why is used instead of itself?
Taking transforms a ratio bounded in (awkward to calibrate directly) into a nonnegative quantity that, by Wilks's theorem, has a clean, sample-size-independent asymptotic distribution: . The factor of is not arbitrary — it exactly cancels the that appears from the second-order Taylor expansion of the log-likelihood around its maximum (where the Hessian contributes a factor of to the quadratic approximation). Without the , the limiting distribution would be a chi-squared variable scaled by , which is a needless complication; with it, tables and software can report the statistic directly against standard quantiles.
How does the likelihood ratio test relate to the Neyman-Pearson lemma?
The Neyman-Pearson Lemma proves that for testing one simple hypothesis against another simple alternative , the likelihood ratio gives the uniformly most powerful test at any level . The generalized likelihood ratio test extends this idea to composite hypotheses, where and are not single points but sets, by replacing each hypothesis's likelihood with its supremum over the relevant parameter set. The GLRT is generally not exactly optimal (no uniformly most powerful test typically exists for composite alternatives), but it retains excellent large-sample power properties and reduces to the exact Neyman-Pearson test in the simple-vs-simple special case.
Is the likelihood ratio test the same as the Wald test or the score test?
No, but they are asymptotically equivalent under the null hypothesis and under Wilks's regularity conditions. The Wald test uses only the unrestricted MLE and its estimated standard error (a quadratic approximation around ); the score (Lagrange multiplier) test uses only the restricted MLE and the score function evaluated there (a quadratic approximation around ); the LRT uses both fitted models. All three converge to the same limit, but they can differ noticeably in finite samples, as seen in Example 1 above where the Wald statistic () and LRT statistic () were close but not identical.
Does the likelihood ratio test require nested models?
Yes, in its classical form: must be a subset of for the ratio to be well-defined and bounded by , and Wilks's theorem is stated and proved specifically for this nested setting. For comparing non-nested models (e.g., a lognormal model versus a gamma model for the same data), the ratio of maximized likelihoods is still computable, but it is no longer bounded by and Wilks's limit does not apply. Non-nested comparisons instead use tools like Vuong's test, the Akaike Information Criterion, or the Bayesian Information Criterion, which are built on related but distinct theoretical foundations.
What role does the number of degrees of freedom play in practice, and how do I count it correctly?
is the number of independent scalar equality constraints that imposes relative to the unrestricted model — equivalently, . In a regression setting, testing whether specific coefficients are simultaneously zero gives ; testing a single coefficient gives . In the multinomial example, testing that all four cell probabilities equal specified values under a model with free probabilities (since they must sum to ) gives , not . Miscounting — a very common error — leads to comparing against the wrong chi-squared distribution and hence to an incorrect -value.
What happens to the likelihood ratio test in exact, non-asymptotic Gaussian linear models?
In the classical linear model with , testing a linear restriction on (with unknown and estimated) produces a likelihood ratio statistic that is a strictly increasing function of the classical -statistic from Standard Tests: t, Chi-Squared, and F. In this special case the exact finite-sample null distribution of a monotone transform of is known exactly (an distribution), rather than only asymptotically — a rare instance where the LRT machinery yields an exact, not merely asymptotic, classical test.
Can the likelihood ratio test statistic ever be negative, or can come out negative in practice?
No: since , the unrestricted maximum likelihood can never be smaller than the restricted maximum likelihood, so and always, by construction. If a computed comes out negative in an implementation, this signals a numerical or optimization error — most commonly, that the "unrestricted" optimizer failed to find the true global maximum (got stuck in a local optimum with lower likelihood than the constrained fit), which is a common practical pitfall with iterative MLE routines in nonlinear or high-dimensional models.