Search

Search papers and lessons

Wald Test

Level 3 · 11 min read

The Wald test checks a claim about a parameter by measuring how far the fitted estimate sits from the claimed value, in units of its estimated standard error, then squaring that distance.

On this page

  • Colour = topic mix
  • Probability
  • Calculus
  • Discrete math
  • Inference
  • Linear algebra
  • Sampling
  • ReadReady to readNot yet

TL;DR

The Wald test asks whether a parameter could really equal a claimed value, such as zero, given the data. It takes the fitted estimate, subtracts the claimed value, and divides by the estimated standard error, so the answer is in units of noise. Squaring that number gives the Wald statistic, which is compared with a chi-squared distribution.

It is the standard test printed next to every coefficient in regression software, and it needs only the one model that was fitted, which is why it is so widely used.

Builds on: Null Hypothesis, Maximum Likelihood Estimation, Fisher Information · Leads to: Logistic Regression, DESeq2, and the likelihood ratio test

Where it's used

Logistic regression in medicine and epidemiology. A study of whether a drug is linked to a side effect fits a logistic model and reports one coefficient for the drug. The Wald test asks whether that coefficient differs from zero. Software reports its z value and p-value directly, so a reader can see whether the link is distinguishable from chance. The test says nothing about whether the link is causal; that depends on the study design.

Gene expression. The DESeq2 method for comparing gene activity between two conditions fits a generalised linear model for each gene. Its default test for the difference in log fold change is a Wald test, and the statistic, with its standard error, gives each gene a p-value. The same test is applied thousands of times, so the results are corrected for multiple testing.

Econometrics. Economists fit probit, Poisson and other maximum likelihood models and report Wald statistics for each coefficient. A coefficient for education in a wage model, for example, is tested against zero using its estimated standard error, with no need to refit the model.

How it works

Take a coin whose chance of heads, pp, is unknown. We flip it 100 times and get 60 heads. Test the claim that the coin is fair, H0:p=0.5H_0: p = 0.5. Use the usual 5 percent level, where the chi-squared critical value with one degree of freedom is 3.84.

  1. The data and the model. Each flip is a Bernoulli trial, so the number of heads is binomial with n=100n = 100. The estimate of pp comes from maximum likelihood. Check: nothing has been computed yet; this step only fixes what the test is about.

  2. The estimate. The maximum likelihood estimate is the observed proportion, p^=60/100=0.6\hat p = 60/100 = 0.6. Check: 0.6 is the value that makes the observed data most probable under the model.

  3. How much one flip reveals. The Fisher information for one flip is I(p)=1p(1−p)I(p) = \dfrac{1}{p(1-p)}. At p^=0.6\hat p = 0.6, it is 10.24≈4.167\dfrac{1}{0.24} \approx 4.167 per flip. For 100 flips, the total is 416.7416.7. Check: information adds over independent flips, so 100 times 4.167 gives 416.7.

  4. The variance of the estimate. The estimated variance of p^\hat p is the inverse of the information: 1/416.7=0.00241/416.7 = 0.0024. The standard error is the square root, 0.0024≈0.049\sqrt{0.0024} \approx 0.049. Check: this is the same as p^(1−p^)/n=0.6×0.4/100=0.0024\hat p(1-\hat p)/n = 0.6 \times 0.4/100 = 0.0024.

  5. The Wald statistic. The distance from the claim is 0.6−0.5=0.10.6 - 0.5 = 0.1. Square it and divide by the variance: W=0.12/0.0024=0.01/0.0024≈4.17W = 0.1^2 / 0.0024 = 0.01/0.0024 \approx 4.17. Check: the z value is 0.1/0.049≈2.040.1/0.049 \approx 2.04, and 2.042≈4.172.04^2 \approx 4.17, the same number.

  6. Compare with the chi-squared distribution. Under the claim, WW is approximately chi-squared with one degree of freedom. The 5 percent critical value is 3.84. Since 4.17>3.844.17 \gt 3.84, the claim of a fair coin is rejected at the 5 percent level. Check: the two-sided p-value for z=2.04z = 2.04 is about 0.04, which is below 0.05 and agrees with the decision.

  7. Interpret. The data are too unlikely for a fair coin to be the whole story. If the coin really were fair, a result at least this far from 50 heads would occur only about 4 times in 100 repeats of the experiment.

The plot shows the chi-squared curve with one degree of freedom, the rejection threshold, and the observed statistic.

flowchart LR
  A[Fit the model by maximum likelihood] --> B[Estimate theta-hat and its variance]
  B --> C[Distance from claim divided by standard error]
  C --> D[Square it to get W]
  D --> E[Compare W with chi-squared critical value]
  E --> F[Reject or keep the claim]
1234567800.10.20.30.40.5Wald statistic Wdensity
  • chi-squared, 1 degree of freedom
The observed W = 4.17 sits in the right tail. The 5 percent critical value is 3.84, and the area of the curve beyond it is 5 percent. The point marks the observed statistic.

The math

Step 1 in symbols: the estimator

Let θ\theta be a parameter, possibly a vector, and let θ^\hat\theta be its maximum likelihood estimate. Under the usual regularity conditions and for large samples, the central limit theorem for likelihoods gives an approximately normal sampling distribution:

θ^≈N ⁣(θ,  In(θ)−1),\hat\theta \approx \mathcal{N}\!\left(\theta,\; I_n(\theta)^{-1}\right),

where In(θ)I_n(\theta) is the Fisher information in the whole sample, the sum of the information from each observation. This is the fact that makes the test work. The estimated variance is V^=In(θ^)−1\hat V = I_n(\hat\theta)^{-1}, evaluated at the estimate.

Step 2 in symbols: one parameter

Let the claim be H0:θ=θ0H_0: \theta = \theta_0. Define the standard error SE^=V^\widehat{\mathrm{SE}} = \sqrt{\hat V} and the z statistic

z=θ^−θ0SE^.z = \frac{\hat\theta - \theta_0}{\widehat{\mathrm{SE}}}.

The Wald statistic is its square,

W=z2=(θ^−θ0)2V^=(θ^−θ0)2 In(θ^).W = z^2 = \frac{(\hat\theta - \theta_0)^2}{\hat V} = (\hat\theta - \theta_0)^2\, I_n(\hat\theta).

Under H0H_0, WW is approximately chi-squared with one degree of freedom. The variance is evaluated at θ^\hat\theta, the estimate from the unrestricted model. This is the choice that makes the test a Wald test and not a score test.

Step 3 in symbols: the coin

For nn Bernoulli trials with xx heads, the log-likelihood is ℓ(p)=xln⁡p+(n−x)ln⁡(1−p)\ell(p) = x \ln p + (n-x) \ln(1-p). Setting its derivative to zero gives p^=x/n\hat p = x/n. The second derivative has expectation −n/(p(1−p))-n/(p(1-p)), so

In(p)=np(1−p),V^=p^(1−p^)n.I_n(p) = \frac{n}{p(1-p)}, \qquad \hat V = \frac{\hat p(1-\hat p)}{n}.

This is step 3 and step 4 of the walkthrough. Then W=(p^−p0)2⋅n/(p^(1−p^))W = (\hat p - p_0)^2 \cdot n / (\hat p(1-\hat p)), which at p^=0.6\hat p = 0.6, p0=0.5p_0 = 0.5, n=100n = 100 is 0.01×100/0.24≈4.170.01 \times 100/0.24 \approx 4.17.

Step 4 in symbols: several parameters

Suppose the claim is a set of qq linear restrictions, H0:Rθ=rH_0: R\theta = r, where RR is a q×pq \times p matrix. Then

W=(Rθ^−r)⊤(R V^ R⊤)−1(Rθ^−r),W = (R\hat\theta - r)^{\top} \left(R\,\hat V\, R^{\top}\right)^{-1} (R\hat\theta - r),

which is a Quadratic Form built from the estimate and its Covariance Matrix. Under H0H_0, WW is approximately chi-squared with qq degrees of freedom. With one restriction, this is the same as step 2.

Worked examples

Example
1. Tiny: ten flips

Ten flips give 6 heads. Test H0:p=0.5H_0: p = 0.5.

  1. Estimate: p^=6/10=0.6\hat p = 6/10 = 0.6.
  2. Variance: p^(1−p^)/n=0.6×0.4/10=0.024\hat p(1-\hat p)/n = 0.6 \times 0.4/10 = 0.024.
  3. Standard error: 0.024≈0.155\sqrt{0.024} \approx 0.155.
  4. Distance from claim: 0.6−0.5=0.10.6 - 0.5 = 0.1.
  5. Wald statistic: W=0.12/0.024=0.4167W = 0.1^2/0.024 = 0.4167.
  6. Compare with 3.84: 0.42<3.840.42 \lt 3.84, so the claim is not rejected.

Interpretation: six heads in ten flips is not unusual for a fair coin. The sample is too small for the estimate to be distinguished from 0.5.

Example
2. Standard: the walkthrough with four times the data

Keep the same proportion but flip the coin 400 times, with 240 heads. Test H0:p=0.5H_0: p = 0.5.

  1. Estimate: p^=240/400=0.6\hat p = 240/400 = 0.6.
  2. Variance: 0.6×0.4/400=0.00060.6 \times 0.4/400 = 0.0006.
  3. Standard error: 0.0006≈0.0245\sqrt{0.0006} \approx 0.0245.
  4. Distance from claim: 0.10.1.
  5. Wald statistic: W=0.01/0.0006≈16.67W = 0.01/0.0006 \approx 16.67.
  6. Compare with 3.84: 16.67>3.8416.67 \gt 3.84, so the claim is rejected. The p-value is well below 0.001.

Interpretation: the estimate is the same, 0.6, but the variance is a quarter of its size because nn is four times larger. The Wald statistic is four times larger too, and the evidence against the fair coin is much stronger. The test measures evidence, which depends on sample size as well as on the estimate.

Example
3. Realistic: a coefficient in logistic regression

A logistic model of a disease outcome gives a coefficient β^=0.8\hat\beta = 0.8 for an exposure, with estimated standard error 0.3 from the software output. Test H0:β=0H_0: \beta = 0.

  1. Distance from claim: 0.8−0=0.80.8 - 0 = 0.8.
  2. z value: 0.8/0.3≈2.6670.8 / 0.3 \approx 2.667.
  3. Wald statistic: W=2.6672≈7.11W = 2.667^2 \approx 7.11.
  4. Compare with 3.84: 7.11>3.847.11 \gt 3.84, so the claim that the coefficient is zero is rejected at the 5 percent level. The two-sided p-value is about 0.008.
  5. Odds ratio: e0.8≈2.23e^{0.8} \approx 2.23. The odds of the outcome are about 2.2 times higher for each unit of exposure, according to the model.
  6. Interpretation: the Wald test shows the association is unlikely to be zero in the model. It does not say how large the effect is in a population, and the estimate carries the uncertainty given by its standard error. A confidence interval reports that uncertainty directly.

Try it: a coefficient β^=0.5\hat\beta = 0.5 with standard error 0.4. Is the coefficient significant at the 5 percent level? Answer: z=1.25z = 1.25, W=1.5625W = 1.5625, which is below 3.84, so it is not significant. The two-sided p-value is about 0.21.

Common mistakes and tradeoffs

It is tempting to think a large Wald statistic proves that the effect is large. In fact WW grows with the sample size even when the effect is small, as the second example showed. Report the estimate and its confidence interval alongside the test.

It is tempting to think the Wald test and the likelihood ratio test always agree. In fact they are asymptotically equivalent, but in small samples they can give different answers. The Wald test can be unreliable when the estimate is near the edge of its range, for example a proportion near 0 or 1, or when a logistic regression separates the outcomes perfectly.

It is tempting to think that a Wald test on pp and one on ln⁡(p/(1−p))\ln(p/(1-p)) give the same answer for the same null. In fact the Wald statistic depends on how the hypothesis is written, because the variance is evaluated at the estimate and not under the null. Small samples can give different decisions for the same claim, which the likelihood ratio test avoids.

The three classical tests trade simplicity against accuracy in different ways:

TestFits neededStrengthWeakness
WaldOnly the unrestricted modelPrinted by software; needs no refittingSensitive to parameterisation; weak at edges and in small samples
Likelihood ratioBoth modelsOften more accurate in moderate samples; invariant to reparameterisationNeeds the restricted model refitted
ScoreOnly the restricted modelUseful when the full model is hard to fitLess common in software; can be less accurate

History

Ronald Fisher's work in the 1920s set up maximum likelihood estimation and the information measure that appears in the variance of the estimate. The chi-squared approximation for likelihood-based statistics was developed in the same period and later.

In 1943, Abraham Wald published a general method for testing several parameters at once in large samples. The test that bears his name is built on the approximate normality of the estimate and the quadratic form in its covariance. It was one of a family of large-sample tests that Wald developed, alongside his work on sequential analysis during the Second World War.

The Wald test became common in applied work because it needs only the fitted model. Software has printed a Wald statistic and p-value next to each coefficient for decades, which is why most users meet it first in regression output.

Recap

  • The Wald test divides the distance between an estimate and a claimed value by the estimated standard error, then squares it.
  • For one parameter, the Wald statistic is the square of the z value, and under the claim it is approximately chi-squared with one degree of freedom.
  • The variance is evaluated at the maximum likelihood estimate, so only the unrestricted model is needed.
  • For several restrictions, the statistic is a quadratic form in the estimates and their covariance, with degrees of freedom equal to the number of restrictions.
  • Next, read the Logistic Regression lesson to see the test in use, and the DESeq2 paper for a large-scale application.

Check yourself

QuestionAn estimate is 2.0 with standard error 0.5. What is the Wald statistic for the claim that the parameter equals zero?Show answer

The z value is (2.0−0)/0.5=4(2.0 - 0)/0.5 = 4. The Wald statistic is z2=16z^2 = 16, which is far above the 5 percent chi-squared critical value of 3.84.

QuestionWhy is the Wald test's variance taken at the estimate rather than at the value in the claim?Show answer

The estimate is the best available information about the variance, and the Wald test uses only the unrestricted model. Evaluating the variance at the claimed value would require fitting the model under the claim, which is what the score test does.

QuestionTwo studies find the same estimate of 0.1 for an effect. One has a standard error of 0.05 and the other of 0.02. Which has the larger Wald statistic, and why?Show answer

The second study has W=(0.1/0.02)2=25W = (0.1/0.02)^2 = 25, against (0.1/0.05)2=4(0.1/0.05)^2 = 4 for the first. The smaller standard error comes from more data or less noise, so the same estimate is stronger evidence against the claim of no effect.

QuestionA researcher says that a Wald p-value of 0.3 proves that a drug has no effect. What is wrong with this?Show answer

A large p-value means the data do not reject the claim of no effect; it does not prove the claim is true. The study may simply have too little data to detect a real effect, so the confidence interval for the effect should be reported.

Sources