Tutorials › Generalized Linear Models › One-Sided Tests and Directional Alternatives

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

One-Sided Tests and Directional Alternatives

You will construct one-sided tests for directional coefficient alternatives, interpret their signed statistics, and use the correct reference distributions and p-values.

Intermediate 10 min read

What You'll Learn

  • Formulate a directional coefficient test as a one-sided hypothesis about a scalar parameter or contrast.
  • Calculate a signed Wald statistic and obtain its upper-tail p-value.
  • Construct a one-sided score test using the efficient score and information at the null fit.
  • Use a constrained likelihood-ratio statistic and distinguish its mixture reference distribution from an ordinary chi-square reference.
  • Relate one-sided p-values and critical values to the signed statistics used for two-sided tests.

Why Direction Changes the Test

A two-sided test asks whether a coefficient differs from a specified value in either direction. A directional test asks whether it exceeds that value, or falls below it. That change affects which tail of the reference distribution is relevant. It also affects how a likelihood-ratio statistic is formed: evidence in the direction opposite to the alternative must not count as evidence for it.

Let \(\gamma\) be a scalar coefficient, or a scalar contrast of GLM coefficients, and let \(\gamma_0\) be its null boundary value. We develop the test for an increase; reversing the signs gives the corresponding test for a decrease. The Wald, score, and likelihood-ratio constructions use the same directional hypothesis but evaluate evidence in different ways.

Definition: For an upper-direction alternative, the hypotheses are \(H_0:\gamma\le\gamma_0\) versus \(H_1:\gamma>\gamma_0\). In regular models, calibration is at the boundary \(\gamma=\gamma_0\), which is the least-favourable null value for the usual one-sided test. The statistics below are oriented so positive values support \(H_1\).

Signed Wald and Score Statistics

Suppose \(\hat\gamma\) estimates \(\gamma\), and let \(\widehat{\operatorname{Var}}(\hat\gamma)\) be its estimated variance. The signed Wald statistic measures the estimated displacement from the null in standard-error units:

$$ Z_W=\frac{\hat\gamma-\gamma_0} {\sqrt{\widehat{\operatorname{Var}}(\hat\gamma)}}. $$

Under the null boundary, standard asymptotic normality gives \(Z_W\xrightarrow{d}N(0,1)\). The upper-tail one-sided p-value is therefore \(1-\Phi(Z_W)\), where \(\Phi\) is the standard normal distribution function. A large positive value supports an increase; a negative value points away from the specified alternative.

For a scalar coefficient \(\gamma\) and nuisance parameter vector \(\lambda\), the score test uses information after accounting for nuisance parameters. Write \(U_\gamma\) and \(U_\lambda\) for the score components and partition the Fisher information at the null fit as \(I_{\gamma\gamma}, I_{\gamma\lambda}, I_{\lambda\lambda}\). The efficient score and its information are

$$ U_{\mathrm{eff}} =U_\gamma-I_{\gamma\lambda}I_{\lambda\lambda}^{-1}U_\lambda, \qquad I_{\mathrm{eff}} =I_{\gamma\gamma}-I_{\gamma\lambda}I_{\lambda\lambda}^{-1}I_{\lambda\gamma}. $$

These quantities are evaluated at the restricted null fit. When the nuisance parameters have been maximized under the null, \(U_\lambda=0\), though the efficient information still accounts for their estimation. The signed score statistic is \(Z_S=U_{\mathrm{eff}}/\sqrt{I_{\mathrm{eff}}}\). Under regularity conditions—an interior null value for the nuisance parameters, positive efficient information, and the usual asymptotic normality of the score—\(Z_S\xrightarrow{d}N(0,1)\) at the null boundary.

Worked Example: A One-Sided Wald Test for a Binomial GLM Intercept

Suppose \(Y\sim\operatorname{Binomial}(20,p)\), with the intercept-only logistic GLM \(\operatorname{logit}(p)=\beta\). Test \(H_0:\beta\le0\) against \(H_1:\beta>0\) using the Wald statistic, and use the usual two-sided Wald reference to identify the one-sided p-value.

There are 14 successes, so \(\hat p=14/20=0.7\). The fitted intercept is \(\hat\beta=\log(0.7/0.3)=\log(7/3)\approx0.84730\). The estimated information for \(\beta\) is \(20\hat p(1-\hat p)=20(0.7)(0.3)=4.2\), giving standard error \(1/\sqrt{4.2}\approx0.48795\).

Thus \(Z_W=0.84730/0.48795\approx1.7364\). The one-sided p-value is \(1-\Phi(1.7365)\approx0.0412\). The corresponding two-sided Wald p-value is approximately \(2(0.0412)=0.0824\); because the observed statistic is positive, the one-sided value is half the two-sided value.

Relating One-Sided and Two-Sided Reference Distributions

The signed Wald and score statistics have standard normal reference distributions under the null boundary. Their squared values have a \(\chi^2_1\) reference distribution and correspond to the familiar two-sided tests. For a positive signed statistic \(z\), the one-sided p-value is half the two-sided p-value. For a negative \(z\), it is not: the evidence points in the opposite direction.

Result: If \(Z\) has a standard normal reference distribution and \(p_{\mathrm{two}}=2[1-\Phi(|Z|)]\), then the upper-tail one-sided p-value is \(1-\Phi(Z)\). It equals \(p_{\mathrm{two}}/2\) when \(Z>0\), and equals \(1-p_{\mathrm{two}}/2\) when \(Z<0\).

To verify the result, first take \(Z>0\). Then \(|Z|=Z\), so \(p_{\mathrm{two}}=2[1-\Phi(Z)]\), and division by two gives the upper-tail p-value. If \(Z<0\), symmetry of the standard normal distribution gives \(\Phi(Z)=1-\Phi(|Z|)\). Consequently, \(1-\Phi(Z)=\Phi(|Z|)=1-[1-\Phi(|Z|)]=1-p_{\mathrm{two}}/2\). For \(Z=0\), both one-sided tails equal \(1/2\). \(\square\)

For example, a positive statistic is compared with the upper standard-normal critical value \(z_{1-\alpha}\) in a level-\(\alpha\) test. Equivalently, its square is compared with the \((1-2\alpha)\) quantile of \(\chi^2_1\). This is not the same cutoff as the \((1-\alpha)\) quantile used for a two-sided \(\chi^2_1\) test.

Worked Example: A One-Sided Score Test at the Null Fit

Use the same binomial data, with 14 successes in 20 trials, to test \(H_0:\beta\le0\) against \(H_1:\beta>0\) by the score test. Under \(\beta_0=0\), the logistic model gives \(p_0=1/2\).

For the binomial log-likelihood, the score for \(\beta\) is \(U_\beta=y-np\), and the information is \(I_{\beta\beta}=np(1-p)\). At the null fit these are \(U_\beta=14-20(1/2)=4\) and \(I_{\beta\beta}=20(1/2)(1/2)=5\). There is no nuisance parameter in this intercept-only model.

The signed score statistic is \(Z_S=4/\sqrt{5}\approx1.7889\), and its upper-tail p-value is \(1-\Phi(1.7889)\approx0.0368\). The positive sign supports the specified increase. Squaring gives \(Z_S^2=16/5=3.2\), which has an asymptotic \(\chi^2_1\) reference for the corresponding two-sided score test.

Directional Likelihood-Ratio Tests

An ordinary likelihood-ratio statistic compares the unrestricted maximum likelihood with the maximum under the equality null. For a one-sided alternative, instead compare the null-boundary fit with the best fit restricted to the alternative side. Define \(\ell_p(\gamma)\) as the profile log-likelihood, maximized over nuisance parameters for fixed \(\gamma\). The directional statistic is

$$ Q_+=2\left\{\sup_{\gamma\ge\gamma_0}\ell_p(\gamma)-\ell_p(\gamma_0)\right\}. $$

It is nonnegative. If the unrestricted estimate lies above \(\gamma_0\), the constrained alternative includes it, and \(Q_+\) is the ordinary likelihood-ratio statistic. If the estimate lies below \(\gamma_0\), the constrained maximum is at the boundary in the usual unimodal regular case, and \(Q_+=0\). The sign and magnitude can also be represented by the signed root \(R=\operatorname{sign}(\hat\gamma-\gamma_0)\sqrt{Q}\), where \(Q\) is the unrestricted equality-null likelihood-ratio statistic. Then \(Q_+=\{\max(R,0)\}^2\) in this setting.

The one-sided likelihood-ratio statistic does not have an ordinary \(\chi^2_1\) null distribution. Under standard regularity conditions, its limiting distribution is a mixture: probability one-half at zero and probability one-half distributed as \(\chi^2_1\). The signed root, by contrast, has an asymptotic standard normal reference under the null boundary, so its upper-tail p-value is \(1-\Phi(R)\).

Theorem: Suppose the null boundary is regular, the nuisance parameters are identifiable and interior, the efficient information for the scalar target is positive, and the profile log-likelihood has a locally uniform quadratic expansion with a consistent root-\(n\) maximizer. Under the boundary null, the constrained directional likelihood-ratio statistic satisfies \(Q_+\xrightarrow{d}\{\max(Z,0)\}^2\), where \(Z\sim N(0,1)\). Its limiting distribution is \(\frac12\delta_0+\frac12\chi^2_1\), where \(\delta_0\) is point mass at zero.

To derive this, express a local alternative as \(\gamma=\gamma_0+h/\sqrt{n}\), with \(h\ge0\). Let \(I_{\mathrm{eff}}\) denote the total efficient information for the \(n\) observations, and write \(Z_n=U_{\mathrm{eff}}/\sqrt{I_{\mathrm{eff}}}\) for the normalized efficient score at the null. The quadratic expansion of the profile log-likelihood can then be written as \(tZ_n-t^2/2+o_p(1)\), where \(t=h\sqrt{I_{\mathrm{eff}}/n}\ge0\), and \(Z_n\xrightarrow{d}N(0,1)\). The local maximum is therefore the maximum of \(tZ_n-t^2/2\) over \(t\ge0\).

If \(Z\le0\), then \(tZ-t^2/2\le0\) for every \(t\ge0\), and the maximum is zero at \(t=0\). If \(Z>0\), completing the square gives \(tZ-t^2/2=Z^2/2-(t-Z)^2/2\), whose maximum over \(t\ge0\) occurs at \(t=Z\) and equals \(Z^2/2\). Twice the maximized log-likelihood difference is thus zero for \(Z\le0\) and \(Z^2\) for \(Z>0\). A standard normal variable is nonpositive with probability one-half; conditional on being positive, its square has the \(\chi^2_1\) distribution by symmetry. This proves the claimed mixture limit. \(\square\)

For a positive signed root \(R\), the one-sided likelihood-ratio p-value can be calculated as \(P(Z\ge R)=1-\Phi(R)\). Equivalently, for \(Q_+>0\), the mixture-tail p-value is one-half the \(\chi^2_1\) upper-tail probability at \(Q_+\). At \(Q_+=0\), the mixture places probability one-half at zero, so the one-sided p-value is not obtained by treating zero as an ordinary positive \(\chi^2\) observation.

Worked Example: One-Sided Likelihood Ratio for a Binomial Intercept

Return to \(y=14\) successes in \(n=20\) trials, with \(H_0:\beta\le0\) and \(H_1:\beta>0\). The null value \(\beta=0\) corresponds to \(p_0=0.5\), and the unrestricted estimate is \(\hat p=0.7\), which is on the alternative side.

Ignoring the binomial coefficient, which cancels in the likelihood ratio, the log-likelihood difference between the unrestricted and null fits is \(14\log(0.7/0.5)+6\log(0.3/0.5)\). Numerically, \(14\log(1.4)=4.71061\) and \(6\log(0.6)=-3.06495\), so the difference is \(1.64566\). Therefore \(Q_+=2(1.64566)=3.29132\), and the signed root is \(R=\sqrt{3.29132}\approx1.8142\).

The approximate upper-tail p-value is \(1-\Phi(1.8142)\approx0.03482\). Equivalently, the upper tail of \(\chi^2_1\) at \(3.29132\) is approximately \(0.06965\), and the mixture reference assigns half that tail probability, again giving approximately \(0.03482\). Using the ordinary two-sided \(\chi^2_1\) tail without the factor of one-half would answer a different question.

Choosing the Tail and Reporting the Result

For a directional test, the direction must be specified before examining the estimate. The one-sided Wald, score, and likelihood-ratio statistics are all oriented so that positive values support the stated alternative. Their asymptotic reference distributions give the same normal upper-tail calculation when expressed as signed statistics, although their finite-sample values need not agree.

TestStatistic for an upper alternativeOne-sided reference calculation
Wald\(Z_W\), estimate minus null value in standard-error units\(1-\Phi(Z_W)\)
Score\(Z_S\), efficient score divided by the square root of efficient information\(1-\Phi(Z_S)\)
Likelihood ratio\(Q_+\), or signed root \(R\)\(1-\Phi(R)\); equivalently, half the \(\chi^2_1\) tail for \(Q_+>0\)

In the binomial illustration, the three approximate p-values were about \(0.0412\), \(0.0368\), and \(0.03482\), respectively. These differences do not change which direction was tested; they arise because the tests use different estimates of evidence. Each calculation should report the alternative, the signed statistic or constrained statistic, and the reference distribution used.

Common Pitfall

  • Halving a two-sided p-value without checking the sign. The shortcut \(p_{\mathrm{one}}=p_{\mathrm{two}}/2\) applies only when the observed signed statistic is in the direction specified by the alternative. If it points the other way, the upper-tail one-sided p-value is \(1-p_{\mathrm{two}}/2\), not half the two-sided value.
  • Using an ordinary \(\chi^2_1\) tail for a directional likelihood ratio. The constrained statistic has a point mass at zero under its asymptotic null distribution. For a positive statistic, use half the ordinary \(\chi^2_1\) upper tail, or use the signed root and a standard normal upper tail.
  • Choosing a direction after seeing the estimate. A one-sided p-value is calibrated for an alternative specified in advance. Selecting whichever direction matches the data and then reporting a one-sided tail does not preserve the stated test level.
Key takeaway: Directional tests retain the sign of the evidence. Use an upper normal tail for signed Wald and score statistics, and use either the signed likelihood-ratio root or the correct mixture tail for the constrained likelihood-ratio statistic.

Check Your Understanding

Work through these questions using the upper-direction alternative unless stated otherwise.

  1. For \(Z_W=-1.5\), is the upper one-sided p-value half the corresponding two-sided p-value? Explain using the tail identity.
  2. Why is the score statistic evaluated at the restricted null fit rather than at the unrestricted estimate?
  3. For a positive signed likelihood-ratio root \(R\), give the equivalent one-sided p-value calculations using the normal and mixture references.
  4. What is the limiting probability that the constrained directional likelihood-ratio statistic equals zero at the null boundary, under the stated regularity conditions?
  5. A researcher observes a negative statistic for an alternative \(\gamma>\gamma_0\). What does its sign say about evidence for the specified direction?
Clinical Biostats