Tutorials › Generalized Linear Models › Test Disagreement in Small and Sparse Samples

Wald Score and Likelihood-Ratio Tests · Tutorial 279 of 981

Test Disagreement in Small and Sparse Samples

Use sparse-data examples to diagnose when Wald, score, and likelihood-ratio tests give different answers and why their usual approximations may be unreliable.

Intermediate 9 min read

What You'll Learn

  • Derive the three test statistics for a one-parameter binomial model.
  • Distinguish canonical-logit Wald statistics from probability-scale Wald statistics.
  • Identify what changes when a binomial maximum-likelihood estimate lies on the boundary.
  • Calculate and compare Wald, score, and likelihood-ratio statistics for a sparse Poisson count.
  • Explain why weak curvature and large parameter shifts undermine local quadratic approximations.
  • Interpret chi-square p-values cautiously in small or sparse samples.

Why Test Statistics Separate in Sparse Data

Wald, score, and likelihood-ratio tests are often introduced as three routes to a similar large-sample conclusion. Their agreement is approximate: it relies on a likelihood that is well behaved near the null and has enough information for a local quadratic approximation to be useful. With only a few successes or events, the likelihood may be asymmetric, the fitted value may be close to a boundary, or the unrestricted estimate may lie far from the null. In these settings, the three statistics can differ substantially.

The point is not that one formula is universally correct and the others are defective. They measure departure from the null in different ways. Wald uses the estimated parameter and curvature at the unrestricted fit; the score test uses the slope and curvature at the null; the likelihood-ratio test compares the maximized likelihoods. Sparse data can make those reference points and approximations matter.

Definition: For a scalar null hypothesis \(H_0:\theta=\theta_0\), the Wald statistic uses the unrestricted estimate and its estimated variance, the score statistic uses the likelihood derivative and information evaluated under \(H_0\), and the likelihood-ratio statistic compares the unrestricted and null maximized likelihoods. Under regularity conditions and large samples, each is commonly compared with a chi-square distribution with one degree of freedom. That reference distribution is an approximation, not an exact small-sample calibration.

A Binomial Model: Three Different Reference Points

Let \(Y\sim\operatorname{Binomial}(n,p)\), with observed count \(y\), and test \(H_0:p=p_0\), where \(0<p_0<1\). Write \(\hat p=y/n\). For an interior estimate \(0<y<n\), the canonical parameter is the logit \(\eta=\log\{p/(1-p)\}\), with null value \(\eta_0=\log\{p_0/(1-p_0)\}\). The Wald statistic below is specifically the Wald statistic for \(\eta\).

Result: When \(0<y<n\), the canonical-logit Wald, score, and likelihood-ratio statistics are
$$ W_\eta=n\hat p(1-\hat p)\{\operatorname{logit}(\hat p)-\operatorname{logit}(p_0)\}^2,\qquad S=\frac{n(\hat p-p_0)^2}{p_0(1-p_0)}, $$
$$ G^2=2n\left\{\hat p\log\frac{\hat p}{p_0}+(1-\hat p)\log\frac{1-\hat p}{1-p_0}\right\}. $$
The probability-scale Wald statistic, if \(p\) itself is used as the parameter, is instead \(W_p=n(\hat p-p_0)^2/\{\hat p(1-\hat p)\}\). It is not the canonical-logit Wald statistic.

To derive these expressions, ignore the binomial coefficient, which is constant in \(p\), and write \(\ell(p)=y\log p+(n-y)\log(1-p)\). The score in the canonical parameter is \(U(\eta)=y-np\), and the information is \(I(\eta)=np(1-p)\). Thus the score statistic is \(U(\eta_0)^2/I(\eta_0)=n^2(\hat p-p_0)^2/\{np_0(1-p_0)\}\). At the unrestricted maximum, \(p=\hat p\), so the estimated variance of \(\hat\eta\) is \(1/\{n\hat p(1-\hat p)\}\); substituting it into the Wald formula gives \(W_\eta\). Finally, twice the log-likelihood difference between \(p=\hat p\) and \(p=p_0\) gives \(G^2\) above. This derives the three statistics and also shows why the probability-scale and logit-scale Wald statistics need not agree.

Worked Example: One Success in Five Binomial Trials

Suppose \(n=5\), \(y=1\), and the null is \(p_0=0.5\). Then \(\hat p=0.2\). The canonical estimate is \(\operatorname{logit}(0.2)=\log(0.2/0.8)=-\log 4\), while \(\operatorname{logit}(0.5)=0\).

Canonical-logit Wald. The estimated information is \(5(0.2)(0.8)=0.8\). Therefore

$$ W_\eta=0.8(-\log 4)^2 =0.8(1.921812\ldots) \approx1.53745. $$

Score. The null information is \(5(0.5)(0.5)=1.25\), and the score at the null is \(1-5(0.5)=-1.5\). Hence

$$ S=\frac{(-1.5)^2}{1.25}=1.8. $$

Likelihood ratio. Substitution into the binomial deviance gives

$$ G^2=10\{0.2\log(0.4)+0.8\log(1.6)\} \approx10\{-0.183258+0.376003\} \approx1.92745. $$

Using a one-degree-of-freedom chi-square reference distribution, the approximate p-values are about \(0.215\), \(0.180\), and \(0.165\), respectively. The probability-scale Wald statistic would be \(5(0.2-0.5)^2/\{0.2(0.8)\}=2.8125\), not \(1.53745\). These are materially different calculations even in this small example; the choice of Wald parameterization must be stated.

What Happens at a Boundary?

When \(y=0\) or \(y=n\), the binomial maximum-likelihood estimate is on the boundary of the probability parameter space. A finite logit estimate no longer exists. The score and likelihood-ratio statistics can still be calculated for an interior null value, but the ordinary canonical-logit Wald statistic cannot be formed from a finite unrestricted estimate and its standard error.

Result: If \(y=0\), \(n>0\), and \(0<p_0<1\), then the score and likelihood-ratio statistics are
$$ S=\frac{np_0}{1-p_0},\qquad G^2=-2n\log(1-p_0). $$
Derivation: At the null, the canonical score is \(U=-np_0\) and the information is \(np_0(1-p_0)\), so \(S=U^2/I=np_0/(1-p_0)\). The unrestricted likelihood at \(\hat p=0\) has log-likelihood \(0\), omitting the constant term; the null log-likelihood is \(n\log(1-p_0)\). Twice their difference is \(-2n\log(1-p_0)\). The logit of the unrestricted estimate is \(-\infty\), so a finite canonical-logit Wald statistic is unavailable. \(\square\)

Worked Example: No Successes in Five Trials

Suppose \(n=5\), \(y=0\), and test \(p_0=0.2\). The fitted probability is \(\hat p=0\), which is a boundary estimate.

The score statistic is

$$ S=\frac{5(0.2)}{0.8}=1.25. $$

The likelihood-ratio statistic is

$$ G^2=-2(5)\log(0.8)=-10\log(0.8)\approx2.23144. $$

Their one-degree-of-freedom chi-square p-value approximations are about \(0.264\) and \(0.135\). The usual canonical-logit Wald calculation is unavailable: \(\operatorname{logit}(\hat p)=-\infty\), not a finite estimate with a finite estimated standard error. The probability-scale Wald expression also has a zero denominator at \(\hat p=0\). The finite score and likelihood-ratio values do not make their chi-square approximations exact; with five trials, their calibration should be treated cautiously.

Sparse Poisson Counts and Extreme Fitted Means

The same issue arises in a Poisson model. Let \(Y\sim\operatorname{Poisson}(\mu)\), where \(\mu=E\lambda\) is the expected count for exposure \(E>0\) and rate \(\lambda>0\). To test a specified mean \(\mu_0>0\), use the canonical log-mean parameter \(\theta=\log\mu\). For an observed count \(y>0\), the unrestricted estimate is \(\hat\mu=y\), which may be far from \(\mu_0\) when counts are sparse.

Result: For \(y>0\), the canonical-log-mean Wald, score, and likelihood-ratio statistics for \(H_0:\mu=\mu_0\) are
$$ W_\theta=y\{\log(y/\mu_0)\}^2,\qquad S=\frac{(y-\mu_0)^2}{\mu_0},\qquad G^2=2\left\{y\log(y/\mu_0)-(y-\mu_0)\right\}. $$
Derivation: Apart from the constant \(-\log(y!)\), the log-likelihood is \(\ell(\theta)=y\theta-\exp(\theta)\). Its score is \(y-\mu\), and its information is \(\mu\). At the null, these give \(S=(y-\mu_0)^2/\mu_0\). At the unrestricted maximum, \(\hat\mu=y\), so the estimated information for \(\theta\) is \(y\) and the Wald statistic is \(y(\hat\theta-\theta_0)^2=y\{\log(y/\mu_0)\}^2\). The log-likelihood difference between \(\hat\mu=y\) and \(\mu_0\) gives the stated \(G^2\). \(\square\)

Worked Example: One Event When the Null Mean Is Ten

Consider a Poisson count with exposure \(E=1\), observed count \(y=1\), and null mean \(\mu_0=10\). The unrestricted mean estimate is \(1\), a tenfold difference from the null.

Wald. The fitted log-mean is \(\log 1=0\), the null log-mean is \(\log 10\), and the estimated information is \(1\). Thus

$$ W_\theta=1\{\log(1/10)\}^2=(\log 10)^2\approx5.30190. $$

Score. At the null, the score is \(1-10=-9\) and the information is \(10\), giving

$$ S=\frac{(-9)^2}{10}=8.1. $$

Likelihood ratio. The deviance is

$$ G^2=2\{1\log(1/10)-(1-10)\} =2\{-2.302585+9\} \approx13.39483. $$

The corresponding one-degree-of-freedom chi-square p-value approximations are approximately \(0.021\), \(0.0044\), and \(0.00025\). A single count has led to very different apparent evidence against the null. The log-mean estimate differs from the null by \(\log(10)\), while the estimated information at the fit is only \(1\). A local quadratic approximation centered at the fit is therefore being used over a large parameter displacement. The small-count setting also makes reliance on a large-sample chi-square calibration questionable.

Diagnosing Disagreement

A useful diagnosis asks where each statistic gets its information and how far the fit lies from the null. The Wald statistic relies on the unrestricted estimate and its local estimated variance. When the estimate is near a boundary, its standard error may be unstable or undefined; when curvature at the fit is weak, a large parameter displacement can produce a Wald statistic that poorly represents the shape of the likelihood elsewhere. The score statistic evaluates slope and curvature at the null, so its behavior can differ when the null is far from the maximum. The likelihood-ratio statistic uses the full log-likelihood difference, but its usual chi-square reference is also an asymptotic approximation.

The local equivalence of the three tests under regular large-sample conditions does not imply finite-sample identity. In particular, a small p-value from one statistic and a larger p-value from another should not be resolved by silently choosing the preferred answer. Report the test and parameterization, inspect the fitted and null values, and consider whether the asymptotic approximation is credible for the available data.

Common Mistakes

  • Calling every Wald formula “the” Wald statistic. In the binomial example, the canonical-logit statistic is \(1.53745\), whereas the probability-scale statistic is \(2.8125\). State the parameter used for the Wald calculation.
  • Treating boundary estimates as ordinary interior fits. With zero binomial successes, the fitted logit is not finite. Do not substitute it into an interior Wald formula and report a finite statistic.
  • Assuming a finite statistic guarantees a reliable p-value. Score and likelihood-ratio statistics can be computed at a boundary, but the chi-square calibration remains approximate and may be poor in sparse samples.
  • Expecting asymptotic equivalence to mean equal answers in small samples. Equivalence is a large-sample, local result. Sparse counts and large shifts from the null are precisely situations where its approximation can be weak.
Key takeaway: When the three tests disagree, check the parameterization of the Wald test, the location of the unrestricted estimate, the amount of information or curvature, and the validity of the chi-square approximation. Disagreement is a diagnostic of finite-sample geometry, not proof that one formula was calculated incorrectly.

Check Your Understanding

Use the formulas and diagnostics in this tutorial to answer the following questions.

  1. For a binomial model with \(n=5\), \(y=1\), and \(p_0=0.5\), why is the probability-scale Wald statistic not the canonical-logit Wald statistic?
  2. For zero successes in \(n\) binomial trials, explain why the score statistic is finite for an interior null probability while the canonical-logit Wald statistic is unavailable.
  3. In the Poisson example with \(y=1\) and \(\mu_0=10\), which statistic uses information evaluated at the null, and what is that information?
  4. Why can a large difference between the fitted and null log-means make local quadratic reasoning questionable?
  5. Does a finite likelihood-ratio statistic imply that its chi-square p-value is an exact small-sample p-value? Explain.
Clinical Biostats