Skip to main content

Applications of the delta method

Archive 2011–2014
Asymptotic statistics
R
The sample variance, the non-robustness of the chi-square test for variances, and variance-stabilizing transformations, with simulations in R.
Author

Maikol Solís

Published

October 5, 2012

Modified

November 30, 2026

This post belongs to a series of study notes I first published in 2012, during my PhD. I revised it in 2026: the mathematics was checked and corrected, the text rewritten, and the simulations redone in R. The examples follow van der Vaart (1998, chap. 3); the presentation and comments are mine.

This post shows three applications of the delta method:

  1. the limit distribution of the sample variance;
  2. why the classical chi-square test for a variance is not robust to non-normality;
  3. variance-stabilizing transformations, with Fisher’s \(z\)-transform of the correlation coefficient as the main example.

The multivariate central limit theorem

We need the central limit theorem for random vectors.

Theorem 1 Let \(Y_1, Y_2, \ldots\) be i.i.d. random vectors in \(\mathbb{R}^k\) with mean \(\mu\) and covariance matrix \(\Sigma = \mathbb{E}\big((Y_1 - \mu)(Y_1 - \mu)^\top\big)\). Then \(\sqrt n(\bar Y_n - \mu) \rightsquigarrow N_k(0, \Sigma)\).

Proof. Let \(Z_n = \sqrt n(\bar Y_n - \mu)\) and fix \(t \in \mathbb{R}^k\). The variables \(t^\top Y_i\) are i.i.d. with mean \(t^\top\mu\) and variance \(t^\top \Sigma t\), so the univariate CLT gives \(t^\top Z_n \rightsquigarrow N(0, t^\top \Sigma t)\), the law of \(t^\top Z\) with \(Z \sim N_k(0, \Sigma)\). By the Cramér–Wold device, convergence in distribution of \(t^\top Z_n\) to \(t^\top Z\) for every \(t\) is equivalent to \(Z_n \rightsquigarrow Z\). The device is itself a direct consequence of Lévy’s theorem, since \(\phi_{Z_n}(st) = \phi_{t^\top Z_n}(s)\).

The sample variance

Let \(X_1, \ldots, X_n\) be i.i.d. with finite fourth moment, and write \(\mu_j = \mathbb{E} X_1^j\). The sample variance

\[ S_n^2 = \frac1n\sum_{i=1}^n (X_i - \bar X_n)^2 = \overline{X^2_n} - \bar X_n^2 \]

is a smooth function of the two sample moments: \(S_n^2 = \phi\big(\bar X_n, \overline{X^2_n}\big)\) with \(\phi(x, y) = y - x^2\). Applying the multivariate CLT to \(Y_i = (X_i, X_i^2)\),

\[ \sqrt n\left(\begin{pmatrix}\bar X_n \\ \overline{X^2_n}\end{pmatrix} - \begin{pmatrix}\mu_1 \\ \mu_2\end{pmatrix}\right) \rightsquigarrow N_2\left(0,\ \begin{pmatrix}\mu_2 - \mu_1^2 & \mu_3 - \mu_1\mu_2 \\ \mu_3 - \mu_1\mu_2 & \mu_4 - \mu_2^2\end{pmatrix}\right). \]

The map \(\phi\) is differentiable with \(\phi'(x, y) = (-2x,\ 1)\). By the delta method, \(\sqrt n\big(S_n^2 - (\mu_2 - \mu_1^2)\big)\) is asymptotically normal with mean zero and variance

\[ (-2\mu_1,\ 1)\, \Sigma\, (-2\mu_1,\ 1)^\top = \mu_4 - \mu_2^2 - 4\mu_1\mu_3 + 8\mu_1^2\mu_2 - 4\mu_1^4 . \]

\(S_n^2\) does not change if we replace \(X_i\) by \(X_i - \mu_1\), so we may assume \(\mu_1 = 0\) without loss of generality. Then \(\mu_2 = \sigma^2\) and

\[ \sqrt n\big(S_n^2 - \mu_2\big) \rightsquigarrow N\big(0,\ \mu_4 - \mu_2^2\big), \qquad \text{equivalently}\qquad \sqrt n\left( \frac{S_n^2}{\mu_2} - 1 \right) \rightsquigarrow N(0,\ \kappa + 2), \tag{1}\]

where \(\kappa = \mu_4/\mu_2^2 - 3\) is the excess kurtosis of \(X_1\) (with \(\mu_1 = 0\)). For normal data \(\kappa = 0\) and the asymptotic variance is 2.

The same limit holds for the unbiased version \(\frac{1}{n - 1}\sum_i (X_i - \bar X_n)^2\). It differs from \(S_n^2\) by \(S_n^2/(n - 1)\), and \(\sqrt n\, S_n^2/(n - 1) \xrightarrow{P} 0\), so Slutsky’s lemma applies.

The chi-square test for a variance is not robust

Recall two facts:

  • If \(X_i \sim N(\mu, \sigma^2)\), then \(nS_n^2/\sigma^2 \sim \chi^2_{n-1}\).
  • By the central limit theorem, \(\big(\chi^2_{n-1} - (n - 1)\big)/\sqrt{2(n - 1)} \rightsquigarrow N(0, 1)\), since a \(\chi^2_{n-1}\) variable is a sum of \(n - 1\) independent \(\chi^2_1\) variables with mean 1 and variance 2.

To test \(H_0 : \sigma^2 \le 1\), the classical test rejects when \(nS_n^2\) exceeds \(c_{n,\alpha}\), the upper \(\alpha\)-quantile of the \(\chi^2_{n-1}\) distribution. For normal data its level is exactly \(\alpha\). What if the data are not normal?

Let \(z_\alpha\) be the upper \(\alpha\)-quantile of \(N(0, 1)\). By the second fact, \(\big(c_{n,\alpha} - (n - 1)\big)/\sqrt{2(n - 1)} \to z_\alpha\), hence \((c_{n,\alpha} - n)/\sqrt n \to \sqrt2\, z_\alpha\). At the boundary \(\sigma^2 = 1\), Equation 1 gives

\[ \mathbb{P}\big(nS_n^2 > c_{n,\alpha}\big) = \mathbb{P}\left( \sqrt n\big(S_n^2 - 1\big) > \frac{c_{n,\alpha} - n}{\sqrt n} \right) \to 1 - \Phi\left( \frac{\sqrt 2\, z_\alpha}{\sqrt{\kappa + 2}} \right). \]

The asymptotic level equals \(\alpha\) if and only if \(\kappa = 0\). For heavy-tailed data (\(\kappa > 0\)) the test rejects too often, and for light-tailed data (\(\kappa < 0\)) too rarely. Unlike the \(t\) test for a mean, which is asymptotically valid for any distribution with finite variance, the chi-square test for a variance depends on normality even for large samples.

The following simulation compares the asymptotic level with the empirical rejection rate at nominal level \(\alpha = 0.05\) and \(n = 500\). All four distributions are scaled to have variance 1, so \(H_0\) holds at the boundary.

set.seed(2012)
alpha <- 0.05
n <- 500
reps <- 4000

samplers <- list(
  "Uniform" = function(n) runif(n, -sqrt(3), sqrt(3)),
  "Normal" = function(n) rnorm(n),
  "Laplace" = function(n) (rexp(n) - rexp(n)) / sqrt(2),
  "Student t5" = function(n) rt(n, df = 5) / sqrt(5 / 3)
)
kappa <- c(-1.2, 0, 3, 6)

crit <- qchisq(1 - alpha, df = n - 1)
empirical <- sapply(samplers, function(r) {
  mean(replicate(reps, {
    x <- r(n)
    sum((x - mean(x))^2) > crit
  }))
})
asymptotic <- 1 - pnorm(sqrt(2) * qnorm(1 - alpha) / sqrt(kappa + 2))

knitr::kable(
  data.frame(
    distribution = names(samplers),
    kappa = kappa,
    asymptotic = round(asymptotic, 3),
    empirical = round(empirical, 3)
  ),
  row.names = FALSE,
  col.names = c(
    "Distribution",
    "Excess kurtosis",
    "Asymptotic level",
    "Empirical level"
  )
)
Distribution Excess kurtosis Asymptotic level Empirical level
Uniform -1.2 0.005 0.006
Normal 0.0 0.050 0.056
Laplace 3.0 0.149 0.150
Student t5 6.0 0.205 0.159

With Laplace data, a test with nominal level 5% actually rejects a true null about 15% of the time. For the \(t_5\) distribution the empirical level is still below its asymptotic value at \(n = 500\). Its fourth moment is barely finite, and the convergence is slow.

Variance-stabilizing transformations

Suppose that for every \(\theta\) in a set \(\Theta \subseteq \mathbb{R}\),

\[ \sqrt n(T_n - \theta) \rightsquigarrow N\big(0, \sigma^2(\theta)\big) \]

when \(\theta\) is the true parameter. The asymptotic confidence interval

\[ \left( T_n - z_{\alpha/2}\,\frac{\sigma(\theta)}{\sqrt n},\ T_n + z_{\alpha/2}\,\frac{\sigma(\theta)}{\sqrt n} \right) \]

has level \(1 - \alpha\), but it depends on the unknown \(\theta\) through \(\sigma(\theta)\). One fix is to plug in \(\sigma(T_n)\), which is justified by Slutsky’s lemma. Another is to transform the problem so that the asymptotic variance no longer depends on \(\theta\).

For a differentiable \(\phi\), the delta method gives

\[ \sqrt n\big(\phi(T_n) - \phi(\theta)\big) \rightsquigarrow N\big(0,\ \phi'(\theta)^2 \sigma^2(\theta)\big). \]

We choose \(\phi\), when possible, such that \(\phi'(\theta)\,\sigma(\theta) \equiv 1\), that is,

\[ \phi(\theta) = \int \frac{1}{\sigma(\theta)}\, d\theta . \]

Then \(\phi(T_n) \pm z_{\alpha/2}/\sqrt n\) is an asymptotic \(1 - \alpha\) confidence interval for \(\eta = \phi(\theta)\) that does not involve \(\theta\). Since \(\phi' = 1/\sigma > 0\), \(\phi\) is strictly increasing, and applying \(\phi^{-1}\) to both endpoints gives an interval for \(\theta\).

Example: the correlation coefficient

Let \((X_1, Y_1), \ldots, (X_n, Y_n)\) be a sample from a bivariate normal distribution with correlation \(\rho\), and let \(\hat\rho_n\) be the sample correlation coefficient. Another application of the delta method, this time to the five sample moments involved, shows that

\[ \sqrt n(\hat\rho_n - \rho) \rightsquigarrow N\big(0, (1 - \rho^2)^2\big). \]

Here \(\sigma(\rho) = 1 - \rho^2\), and

\[ \phi(\rho) = \int \frac{d\rho}{1 - \rho^2} = \frac12\int \left( \frac{1}{1 - \rho} + \frac{1}{1 + \rho} \right) d\rho = \frac12 \log\frac{1 + \rho}{1 - \rho} = \operatorname{arctanh}\rho . \]

This is Fisher’s \(z\)-transform (Fisher 1915). It gives the interval

\[ \left[ \tanh\!\left( \operatorname{arctanh}\hat\rho_n - \frac{z_{\alpha/2}}{\sqrt n} \right),\ \tanh\!\left( \operatorname{arctanh}\hat\rho_n + \frac{z_{\alpha/2}}{\sqrt n} \right) \right]. \]

In practice \(\sqrt n\) is often replaced by \(\sqrt{n - 3}\), which is asymptotically equivalent and slightly more accurate in small samples.

The transformation does more than remove the dependence on \(\rho\): it also makes the distribution much closer to normal. The simulation below uses \(n = 20\) and \(\rho = 0.6\).

set.seed(1921)
n <- 20
rho <- 0.6
reps <- 5000
z <- qnorm(0.975)

rho_hat <- replicate(reps, {
  x <- rnorm(n)
  y <- rho * x + sqrt(1 - rho^2) * rnorm(n)
  cor(x, y)
})

wald_cover <- mean(abs(rho_hat - rho) <= z * (1 - rho_hat^2) / sqrt(n))
fisher_cover <- mean(abs(atanh(rho_hat) - atanh(rho)) <= z / sqrt(n))
Code
par(mfrow = c(1, 2), mar = c(4, 4, 1, 1))
hist(
  rho_hat,
  breaks = 40,
  freq = FALSE,
  main = "",
  xlab = expression(hat(rho)),
  col = "grey85",
  border = "white"
)
curve(
  dnorm(x, rho, (1 - rho^2) / sqrt(n)),
  add = TRUE,
  lwd = 2,
  col = "#c0392b"
)
hist(
  atanh(rho_hat),
  breaks = 40,
  freq = FALSE,
  main = "",
  xlab = expression(arctanh(hat(rho))),
  col = "grey85",
  border = "white"
)
curve(dnorm(x, atanh(rho), 1 / sqrt(n)), add = TRUE, lwd = 2, col = "#1f4e79")
Figure 1: Sample correlations from 5000 bivariate normal samples of size 20 with ρ = 0.6 (left), and their Fisher z-transform (right), with the corresponding normal approximations.

The sample correlation is clearly skewed, because it is bounded by one. Its \(z\)-transform is nearly symmetric and close to the normal approximation. The coverage of the nominal 95% intervals shows the same: 89.3% for the plug-in interval \(\hat\rho_n \pm z_{\alpha/2}(1 - \hat\rho_n^2)/\sqrt n\), against 92.2% for the Fisher interval.

References

Fisher, R. A. 1915. “Frequency Distribution of the Values of the Correlation Coefficient in Samples from an Indefinitely Large Population.” Biometrika 10 (4): 507–21. https://doi.org/10.2307/2331838.
van der Vaart, A. W. 1998. Asymptotic Statistics. Cambridge University Press.

Series: Asymptotic statistics · Previous: The delta method