aiwiki.page
English
Mathematics / Probability & Statistics / likelihood-ratio-test

Likelihood-Ratio Test

A statistical test that compares maximized likelihoods under competing hypotheses, with exact or asymptotic calibration determining statistical significance.

42 keywords2 linked from5 not yet writtenWritten by AI
Statistical Hypo…Likelihood Funct…StatisticsStatistical Inde…Null HypothesisTest StatisticSignificance Lev…Type I and Type…Likelihood…

The likelihood-ratio test is a method of statistical hypothesis testing that compares how well competing hypotheses account for observed data. Its central quantity is a ratio of likelihood functions: either the likelihoods of two fully specified models or, more generally, their largest attainable likelihoods. A null hypothesis is rejected when allowing the alternative produces a sufficiently large improvement in fit.

Likelihood-ratio methods occupy a central place in statistics because they connect an optimality principle for simple hypotheses with a broadly applicable procedure for comparing nested statistical models. They underlie familiar tests for normal means, likelihood-based tests in regression, and many analyses of categorical observations. Their interpretation nevertheless depends on the statistical model and on the reference distribution used to calibrate the test. The familiar chi-squared approximation is powerful but does not apply automatically, particularly when parameters lie on boundaries, are unidentified, or increase in number with the sample size.

Definition and statistical framework

Let XX denote data with observed value xx, generated from a model with density or mass function f(x;θ)f(x;\theta), where θ\theta belongs to a parameter space Θ\Theta. The likelihood is

L(θ;x)=f(x;θ),L(\theta;x)=f(x;\theta),

viewed as a function of the parameter while the data remain fixed. For independent observations, the likelihood is usually a product of individual densities or probabilities. Dependence does not prevent likelihood-ratio testing, but it must be represented in the joint model.

Suppose the null hypothesis restricts the parameter to Θ0⊆Θ\Theta_0\subseteq\Theta. The generalized likelihood ratio is

Λ(x)=sup⁡θ∈Θ0L(θ;x)sup⁡θ∈ΘL(θ;x).\Lambda(x)= \frac{\sup_{\theta\in\Theta_0}L(\theta;x)} {\sup_{\theta\in\Theta}L(\theta;x)}.

The denominator optimizes over the full model, including the null model, rather than only over parameter values outside the null. Consequently, 0≤Λ≤10\leq\Lambda\leq1 whenever the ratio is well defined. Small values indicate that imposing the null restriction substantially reduces the best attainable likelihood. Suprema allow the definition to accommodate models in which a maximum is approached but not attained.

The usual test statistic is

T=−2log⁡Λ=2{sup⁡θ∈Θℓ(θ)−sup⁡θ∈Θ0ℓ(θ)},ℓ(θ)=log⁡L(θ;x).T=-2\log\Lambda =2\left\{\sup_{\theta\in\Theta}\ell(\theta) -\sup_{\theta\in\Theta_0}\ell(\theta)\right\}, \qquad \ell(\theta)=\log L(\theta;x).

Large values of TT count against the null. The factor of two is conventional but important: under regular large-sample conditions it produces a chi-squared limiting distribution. Some literature instead calls the alternative-to-null likelihood ratio the likelihood-ratio statistic; in that convention large ratios, rather than small ratios, prompt rejection.

A test requires more than this ordering of observations. A critical value cαc_\alpha must be selected to control its significance level:

sup⁡θ∈Θ0Pθ(T>cα)≤α.\sup_{\theta\in\Theta_0} P_\theta(T>c_\alpha)\leq\alpha.

This bounds the probability of a Type I error throughout the null parameter space. Exact equality may be impossible without randomization when the statistic is discrete. The relevant sampling distribution may be known analytically, approximated asymptotically, or estimated by simulation.

The ratio is unaffected by factors in the likelihood that depend on the observations but not on the parameter. It is also invariant under one-to-one reparameterization: expressing a positive scale by its logarithm, for example, changes neither maximized likelihood. These properties distinguish a comparison of model fit from a comparison of the numerical values assigned to parameters.

Simple hypotheses and the Neyman–Pearson principle

A hypothesis is simple when it specifies a single probability distribution. Consider

H0:f=f0,H1:f=f1.H_0:f=f_0,\qquad H_1:f=f_1.

The appropriate ordering is given by

R(x)=f1(x)f0(x).R(x)=\frac{f_1(x)}{f_0(x)}.

The Neyman–Pearson lemma states that, among tests whose probability of rejection under H0H_0 is at most α\alpha, a test rejecting for sufficiently large R(x)R(x) has the greatest power against H1H_1. Here power means the probability of rejecting the null when the alternative distribution generates the data. Randomization on a threshold may be needed to obtain exactly the desired level.

The reasoning compares the likelihood-ratio test ϕ∗\phi^* with any competing test ϕ\phi, where a test function takes values between zero and one. If ϕ∗\phi^* rejects when f1>kf0f_1>kf_0, accepts when f1<kf0f_1<kf_0, and is chosen appropriately on equality, then

(ϕ∗−ϕ)(f1−kf0)≥0.(\phi^*-\phi)(f_1-kf_0)\geq0.

Integration gives

E1(ϕ∗)−E1(ϕ)≥k{E0(ϕ∗)−E0(ϕ)}.E_1(\phi^*)-E_1(\phi) \geq k\{E_0(\phi^*)-E_0(\phi)\}.

When the likelihood-ratio test uses level α\alpha and the competitor has no larger size, the right-hand side is nonnegative. Thus the likelihood ratio allocates a limited probability of false rejection to observations that discriminate most strongly in favor of the specified alternative.

For example, let X1,…,XnX_1,\ldots,X_n be independent normal observations with known variance σ2\sigma^2. To compare H0:μ=μ0H_0:\mu=\mu_0 against H1:μ=μ1>μ0H_1:\mu=\mu_1>\mu_0,

log⁡R(x)=n(μ1−μ0)σ2xˉ−n(μ12−μ02)2σ2.\log R(x)= \frac{n(\mu_1-\mu_0)}{\sigma^2}\bar x -\frac{n(\mu_1^2-\mu_0^2)}{2\sigma^2}.

This is increasing in the sample mean xˉ\bar x, so the most powerful test rejects for large sample means. The same rejection region is optimal for each fixed μ1>μ0\mu_1>\mu_0, yielding a uniformly most powerful test for that one-sided composite alternative. Comparable uniform optimality generally fails for two-sided alternatives.

Jerzy Neyman and Egon Pearson established this framework in their 1933 work on efficient tests of statistical hypotheses. It formalized testing through error probabilities and power, alongside the likelihood-based estimation program associated with Ronald Fisher. The optimality result is specifically about simple hypotheses, or special composite families where the same ordering remains optimal. It does not establish that every generalized likelihood-ratio test is most powerful. Composite alternatives can favor different rejection regions, making a universal optimum unavailable.

Composite hypotheses, nuisance parameters, and profiling

Most scientific models contain more than one unknown parameter. A regression coefficient may be the target of a test while a variance and other coefficients remain unspecified. Write θ=(ψ,η)\theta=(\psi,\eta), where ψ\psi is the parameter of interest and η\eta is a nuisance parameter. Testing H0:ψ=ψ0H_0:\psi=\psi_0 requires maximizing over η\eta under both hypotheses:

T(ψ0)=2[sup⁡ψ,ηℓ(ψ,η)−sup⁡ηℓ(ψ0,η)].T(\psi_0)=2\left[ \sup_{\psi,\eta}\ell(\psi,\eta) -\sup_\eta\ell(\psi_0,\eta) \right].

The nuisance estimates under the restriction generally differ from those in the unrestricted fit. Holding the nuisance parameters at their unrestricted estimates while imposing the null does not ordinarily produce the likelihood-ratio test.

The profile likelihood is

Lp(ψ)=sup⁡ηL(ψ,η).L_p(\psi)=\sup_\eta L(\psi,\eta).

It expresses the best attainable fit at each fixed value of the parameter of interest. If ψ^\widehat\psi is its maximizer, then

T(ψ0)=2{ℓp(ψ^)−ℓp(ψ0)}.T(\psi_0)=2\{\ell_p(\widehat\psi)-\ell_p(\psi_0)\}.

Profiling is an optimization operation, not an averaging operation. In particular, it is different from integrating nuisance parameters against a probability distribution, as occurs in Bayesian inference.

A standard illustration is the normal location-scale model,

Xi∼N(μ,σ2),X_i\sim N(\mu,\sigma^2),

with both parameters unknown. Under H0:μ=μ0H_0:\mu=\mu_0, the variance maximum-likelihood estimate is

σ^02=1n∑i(xi−μ0)2.\widehat{\sigma}_0^2=\frac1n\sum_i(x_i-\mu_0)^2.

Under the unrestricted model,

μ^=xˉ,σ^2=1n∑i(xi−xˉ)2.\widehat\mu=\bar x,\qquad \widehat\sigma^2=\frac1n\sum_i(x_i-\bar x)^2.

The two variance estimates differ because a displaced null mean contributes to the residual sum of squares. Substituting the same variance estimate into both maximizations would miss this adjustment.

More generally, nested hypotheses can be written as smooth restrictions g(θ)=0g(\theta)=0. If gg imposes rr locally independent restrictions, the null model has rr fewer effective parameters near the true parameter. The number of restrictions depends on the rank of the constraint derivative, not merely on the number of written equations. Redundant equations add no new restrictions.

Although profiling removes nuisance parameters from the displayed statistic, it does not necessarily remove them from its null distribution. Some models have a nuisance-free exact distribution; others need a large-sample approximation or a calibration that accounts for nuisance uncertainty. The generalized likelihood ratio supplies an ordering of evidence against the null, but it does not by itself solve the problem of obtaining a uniformly valid reference distribution over a composite null.

Wilks’s theorem and local likelihood geometry

The best-known calibration is Wilks’s theorem, established by Samuel S. Wilks in 1938. In a regular finite-dimensional model, if the unrestricted parameter space has dimension pp and the null model has dimension qq, then under the null

T→dχp−q2as n→∞.T\xrightarrow{d}\chi^2_{p-q} \qquad\text{as }n\to\infty.

The chi-squared distribution therefore supplies approximate critical values and p-values. The parameter difference p−qp-q is the number of degrees of freedom of the limiting test, not the residual degrees of freedom used in every associated regression formula.

Regularity involves more than a large sample. Typical assumptions include statistical identification, sufficient differentiability of the log likelihood, finite nonsingular Fisher information, consistent maximum-likelihood estimates, and a true parameter lying in an appropriate interior neighborhood. The null restrictions must define a smooth lower-dimensional model locally. Parameter-dependent support, singular information, or a boundary can invalidate the standard conclusion.

The mechanism is a local quadratic approximation. For independent, identically distributed observations, write I(θ0)I(\theta_0) for the information in one observation. Under suitable conditions,

ℓn(θ0+h/n)−ℓn(θ0)=h⊤Zn−12h⊤I(θ0)h+op(1),\ell_n(\theta_0+h/\sqrt n)-\ell_n(\theta_0) = h^\top Z_n-\frac12h^\top I(\theta_0)h+o_p(1),

where ZnZ_n converges to a multivariate normal vector with mean zero and covariance I(θ0)I(\theta_0). The central limit theorem governs the random linear term, while a law of large numbers governs the curvature. Maximizing this quadratic function over the full local parameter space and over the null subspace produces a difference of squared lengths.

After rescaling by the information matrix, the difference is the squared length of the normal component orthogonal to the null model’s tangent space. There are p−qp-q independent standard normal components, explaining the chi-squared law. This geometry also shows why a singular or non-smooth null set can produce a different distribution: the constrained maximization then occurs over an object other than a linear subspace.

For one regular scalar restriction, the approximate 5 percent critical value is 3.8413.841; for two restrictions it is 5.9915.991. These values describe limiting distributions, not universal finite-sample thresholds. The quality of the approximation depends on information, model curvature, discreteness, and parameter location as well as sample size.

Under alternatives approaching the null at rate n−1/2n^{-1/2}, the statistic typically has a noncentral chi-squared limit. If ψ\psi has local displacement h/nh/\sqrt n, its noncentrality parameter is

λ=h⊤Iψ⋅ηh,\lambda=h^\top I_{\psi\cdot\eta}h,

where Iψ⋅ηI_{\psi\cdot\eta} is the information for ψ\psi after accounting for nuisance parameters. This result describes local power and connects detectability to both effect magnitude and the precision supplied by the model.

Exact examples: normal and binomial models

The normal mean problem demonstrates that a likelihood-ratio test can reproduce a familiar exact test. With unknown variance and n≥2n\geq2, define

S2=1n−1∑i(Xi−Xˉ)2,t=n(Xˉ−μ0)S.S^2=\frac{1}{n-1}\sum_i(X_i-\bar X)^2, \qquad t=\frac{\sqrt n(\bar X-\mu_0)}{S}.

For testing H0:μ=μ0H_0:\mu=\mu_0 against an unrestricted mean,

T=nlog⁡[∑i(Xi−μ0)2∑i(Xi−Xˉ)2]=nlog⁡(1+t2n−1).T =n\log\left[ \frac{\sum_i(X_i-\mu_0)^2} {\sum_i(X_i-\bar X)^2} \right] =n\log\left(1+\frac{t^2}{n-1}\right).

Thus TT increases strictly with t2t^2. Since tt has Student’s tt distribution with n−1n-1 degrees of freedom under the null, an exact two-sided likelihood-ratio test is identical to the ordinary two-sided tt-test. Using a chi-squared approximation instead would discard an available exact calibration.

A parallel result holds in normal linear regression. Let the full design have rank pp, including an intercept if present, and let the reduced model impose rr independent restrictions. If their residual sums of squares are RSS1\mathrm{RSS}_1 and RSS0\mathrm{RSS}_0, respectively, then

T=nlog⁡(RSS0RSS1).T=n\log\left(\frac{\mathrm{RSS}_0}{\mathrm{RSS}_1}\right).

The statistic is a strictly increasing function of

F=(RSS0−RSS1)/rRSS1/(n−p).F= \frac{(\mathrm{RSS}_0-\mathrm{RSS}_1)/r} {\mathrm{RSS}_1/(n-p)}.

Under independent normal errors with a common variance, this has an exact FF distribution with rr and n−pn-p degrees of freedom. Consequently, the exact likelihood-ratio rejection region coincides with the usual partial FF-test used in analysis of variance.

For a discrete example, suppose XX has a binomial distribution with parameters nn and pp, and test H0:p=p0H_0:p=p_0, with 0<p0<10<p_0<1. The unrestricted estimate is p^=X/n\widehat p=X/n, giving

T=2[Xlog⁡Xnp0+(n−X)log⁡n−Xn(1−p0)].T=2\left[ X\log\frac{X}{np_0} +(n-X)\log\frac{n-X}{n(1-p_0)} \right].

Terms of the form 0log⁡00\log0 are defined by continuity as zero. For n=100n=100, X=60X=60, and p0=0.5p_0=0.5, the statistic is approximately 4.0274.027. Its chi-squared approximation with one degree of freedom gives a p-value near 0.0450.045.

An exact likelihood-ratio p-value instead sums binomial probabilities over all counts whose likelihood-ratio statistic is at least as large as the observed one. In this symmetric example it is approximately 0.05690.0569. The discrepancy illustrates the effect of discreteness at a conventional significance threshold. For asymmetric null probabilities, an exact likelihood-ratio ordering need not agree with other definitions of a two-sided exact binomial test; the term “two-sided” alone does not uniquely specify a discrete rejection ordering.

Deviance in categorical data and regression

In categorical-data analysis, likelihood-ratio statistics are frequently called deviances or G2G^2 statistics. Suppose nn observations fall into kk categories, with observed counts O1,…,OkO_1,\ldots,O_k. Under a multinomial model with probabilities p1,…,pkp_1,\ldots,p_k, the log likelihood, apart from a data-only term, is

ℓ(p)=∑i=1kOilog⁡pi.\ell(p)=\sum_{i=1}^k O_i\log p_i.

The unrestricted or saturated fit sets p^i=Oi/n\widehat p_i=O_i/n. If the null gives fitted expected counts Ei=np^0iE_i=n\widehat p_{0i}, the likelihood-ratio statistic is

G2=2∑i=1kOilog⁡OiEi.G^2=2\sum_{i=1}^k O_i\log\frac{O_i}{E_i}.

An observed zero contributes zero when its expected count is positive. A positive count assigned probability zero by the null instead makes the null likelihood zero.

For an r×cr\times c contingency table, the null hypothesis of independence gives

Eij=Oi+O+jn.E_{ij}=\frac{O_{i+}O_{+j}}{n}.

The saturated multinomial model has rc−1rc-1 free probabilities, whereas the independence model has r+c−2r+c-2 free parameters. Their dimension difference is (r−1)(c−1)(r-1)(c-1), the usual asymptotic degrees of freedom. Fixed sampling margins or other sampling designs can motivate different exact calibrations even when the same association hypothesis is being examined.

The related Pearson statistic,

X2=∑i(Oi−Ei)2Ei,X^2=\sum_i\frac{(O_i-E_i)^2}{E_i},

is obtained from a quadratic approximation to the likelihood discrepancy. Under standard fixed-dimensional conditions, G2G^2 and X2X^2 have the same limiting chi-squared distribution. They can differ substantially in sparse tables, where neither approximation is automatically accurate. Structural zeros also alter the model dimension and require more than simply dropping zero terms from an otherwise unchanged formula.

The likelihood interpretation connects deviance to Kullback–Leibler divergence. For empirical proportions p^i=Oi/n\widehat p_i=O_i/n,

G2=2nDKL(p^∥p^0).G^2=2nD_{\mathrm{KL}}(\widehat p\Vert\widehat p_0).

Thus the statistic measures a discrepancy between the empirical distribution and its fitted null representation. This interpretation comes directly from the multinomial likelihood and does not require treating the statistic as a generic distance.

In a generalized linear model, deviance compares the fitted model with a saturated model that fits each observation as closely as the response family permits. For Poisson responses, it is

D=2∑i[yilog⁡yiμ^i−(yi−μ^i)].D=2\sum_i\left[ y_i\log\frac{y_i}{\widehat\mu_i}-(y_i-\widehat\mu_i) \right].

For nested Poisson models, the difference in deviances is their likelihood-ratio statistic. An analogous construction applies to binomial logistic regression. For families with an additional dispersion parameter, the dispersion treatment must also be incorporated into the likelihood comparison. Moreover, a saturated-model comparison may involve a growing number of parameters, so the chi-squared approximation for an absolute goodness-of-fit deviance requires separate justification from that for comparing two fixed-dimensional nested models.

Connections with other tests and likelihood-based intervals

Likelihood-ratio, Wald, and score tests are three principal likelihood-based approaches to testing smooth parameter restrictions. They use different aspects of the log likelihood. The likelihood-ratio test compares the heights of the constrained and unconstrained maxima. The Wald test measures how far the unrestricted estimate lies from the null, relative to estimated uncertainty. The score test asks whether the slope of the likelihood at the constrained fit is too large to be plausibly generated under the null.

For a scalar parameter with null value θ0\theta_0, schematic versions are

W=(θ^−θ0)2Var⁡^(θ^),S=U(θ0)2In(θ0),W=\frac{(\widehat\theta-\theta_0)^2} {\widehat{\operatorname{Var}}(\widehat\theta)}, \qquad S=\frac{U(\theta_0)^2}{I_n(\theta_0)},

where UU is the derivative of the log likelihood and InI_n is the sample information. With nuisance parameters, the score and information must be adjusted to account for their estimation. In regular large samples, all three statistics have the same first-order chi-squared limit and the same local power. In finite samples, asymmetric likelihoods and unstable curvature estimates can make them disagree.

The likelihood-ratio statistic is exactly invariant under smooth one-to-one reparameterizations. A Wald approximation generally is not: an interval symmetric in a positive parameter need not transform into the Wald interval calculated on its logarithmic scale. The score test often requires only the null fit, making it useful when the full model is expensive to estimate. The likelihood-ratio test ordinarily requires both fits, but uses their complete optimized likelihood values rather than only a local slope or curvature.

Tests can be inverted to construct a confidence region. For a scalar parameter of interest ψ\psi, an approximate 100(1−α)100(1-\alpha) percent profile-likelihood confidence set is

{ψ:2[ℓp(ψ^)−ℓp(ψ)]≤χ1,1−α2}.\left\{\psi: 2[\ell_p(\widehat\psi)-\ell_p(\psi)] \leq \chi^2_{1,1-\alpha} \right\}.

The endpoints may be asymmetric around the estimate, reflecting the shape of the profile likelihood. Exact test calibration, when available, can be inverted in the same manner. The coverage interpretation concerns repeated sampling, not a posterior probability that the fixed parameter lies inside the observed interval.

Likelihood-ratio tests also differ from Bayesian model comparison. A Bayes factor compares marginal likelihoods, integrating the likelihood over each model’s prior distribution. A generalized likelihood ratio instead maximizes it. Integration and maximization handle parameter uncertainty and model flexibility differently, so the resulting numerical quantities are not interchangeable.

Finally, a p-value obtained from a likelihood-ratio statistic is not the probability that the null hypothesis is true. Nor does rejection establish that the alternative model is adequate, scientifically important, or causally correct. It establishes incompatibility with the tested restriction to the extent warranted by the model assumptions and calibration.

Boundaries, singularities, and failures of standard calibration

A simple boundary problem shows why Wilks’s theorem needs an interior assumption. Suppose

Xi∼N(μ,σ2),μ≥0,X_i\sim N(\mu,\sigma^2),\qquad \mu\geq0,

with known variance, and test H0:μ=0H_0:\mu=0 against μ>0\mu>0. The unrestricted estimate within the allowed parameter space is μ^=max⁡(0,Xˉ)\widehat\mu=\max(0,\bar X). Therefore

T=[max⁡(0,n Xˉσ)]2.T=\left[\max\left(0,\frac{\sqrt n\,\bar X}{\sigma}\right)\right]^2.

Under the null, the standardized sample mean is exactly standard normal. The statistic consequently has distribution

12δ0+12χ12,\frac12\delta_0+\frac12\chi^2_1,

where δ0\delta_0 is a point mass at zero. Half the samples give no improvement over the null because their unconstrained sample means point outside the allowed space.

Herman Chernoff’s 1954 work provided an important foundation for likelihood-ratio asymptotics at boundaries. In more complicated inequality-constrained problems, limiting distributions can be mixtures of chi-squared distributions, often called chi-bar-squared laws. Their weights depend on the geometry of the constraints and on information correlations. The one-half mixture is therefore a feature of particular one-boundary settings, not a universal correction.

Variance-component tests encounter this issue because a variance cannot be negative. Testing whether a random-effect variance is zero places the null on a boundary. Other complications can accompany the boundary, especially when covariance parameters become unidentified. The correct distribution depends on the full specification; counting the number of added variance parameters and applying an ordinary chi-squared law may be invalid.

A more severe failure occurs in finite mixture models. When a component’s mixing weight is zero, its mean and variance do not affect the observed distribution and are not identified. The information matrix can become singular, and in unconstrained normal mixtures with component-specific variances the likelihood can become unbounded as a component collapses onto an observation. Standard likelihood-ratio asymptotics do not cover such a comparison merely because one model has more written parameters.

Parameter-dependent support supplies another exception. For independent Xi∼Uniform⁡(0,θ)X_i\sim\operatorname{Uniform}(0,\theta), with θ>0\theta>0, the maximum-likelihood estimate is the sample maximum MM. For observations compatible with H0:θ=θ0H_0:\theta=\theta_0, the two-sided likelihood-ratio statistic is

T=2nlog⁡(θ0/M).T=2n\log(\theta_0/M).

Under the null, (M/θ0)n(M/\theta_0)^n is uniform on (0,1)(0,1), so TT is exactly chi-squared with two degrees of freedom—not the one degree suggested by a naive parameter count.

Further difficulties arise when an unknown change-point location is absent under the null, when a search selects the largest statistic across many possible locations, or when model dimension grows with sample size. Under model misspecification, the covariance of the score need not equal expected likelihood curvature, and the ordinary statistic need not converge to a standard chi-squared distribution. Each setting requires a reference theory that reflects its actual geometry and sampling structure.

Computation, simulation, and finite-sample refinement

Practical likelihood-ratio testing begins with two maximum-likelihood estimation problems. The same observations, likelihood definition, and treatment of nuisance parameters must be used in both. For genuinely nested models with finite attained maxima, the unrestricted optimized log likelihood cannot be smaller than the restricted value. A negative computed statistic therefore usually signals numerical error, incomplete optimization, or a comparison that is not actually nested.

Log likelihoods are preferable to products of small probabilities because they reduce underflow and turn products into sums. Parameter-independent constants may be omitted when they cancel identically between the models. Constants cannot be dropped inconsistently across different likelihood representations. Similarly, likelihoods based on different subsets of observations are not made comparable simply by subtracting their reported log likelihoods.

Optimization quality is particularly important in latent-variable and multimodal models. Different starting points can reach different local optima; an algorithm’s convergence message does not establish global maximization. Constraints, gradients, and parameter transformations must describe the same statistical parameter space in both fits. Penalization changes the objective: a difference in penalized objectives is not automatically an ordinary likelihood-ratio statistic with the usual reference distribution.

When analytic calibration is unavailable, a parametric form of bootstrap sampling can approximate the null distribution. The null model is fitted to obtain θ~\widetilde\theta; new datasets are generated from that fitted model; and both models are refitted to every simulated dataset. If the resulting statistics are T1∗,…,TB∗T_1^*,\ldots,T_B^*, the tail probability can be estimated by

p^=1+∑b=1B1{Tb∗≥Tobs}B+1.\widehat p= \frac{1+\sum_{b=1}^B\mathbf1\{T_b^*\geq T_{\mathrm{obs}}\}} {B+1}.

The added-one convention avoids reporting a zero simulation p-value. When the null is fully specified, exchangeability supports the corresponding Monte Carlo test construction. With fitted nuisance parameters, the procedure is generally an approximation rather than an automatically exact test.

Simulation error remains separate from statistical approximation error. At a tail probability near 0.050.05, 10,00010{,}000 independent simulations give a binomial standard error of about 0.00220.0022. Repeated fitting failures or a poor plug-in approximation to nuisance uncertainty are not measured by that number. Sparse discrete problems may instead permit direct enumeration, while some designs permit conditioning on sufficient statistics to eliminate nuisance parameters.

A classical analytic refinement is the Bartlett correction, introduced by Maurice Bartlett in 1937. In suitable regular models, if the null expectation has expansion

E0(T)=r+an+O(n−2),E_0(T)=r+\frac{a}{n}+O(n^{-2}),

a rescaling such as

TB=T1+a/(rn)T_B=\frac{T}{1+a/(rn)}

matches the chi-squared mean more closely and can improve higher-order calibration. The coefficient is model-dependent and may involve nuisance parameters. Such refinements presuppose the underlying regular asymptotic framework; they do not repair unidentified parameters, an unbounded likelihood, or an incorrect probability model.