Why Test a Mean Difference by Its Length?
In a multivariate mean problem, the difference between two population means is a vector. A natural way to summarize its overall size is its squared Euclidean length: it adds the squared coordinate differences without requiring an inverse covariance matrix. This makes a quadratic statistic attractive when the dimension is large, including settings where the classical Hotelling statistic is difficult to use.
The same construction is particularly relevant when many coordinates each shift only a little. A small change in each coordinate may be hard to detect one coordinate at a time, yet the combined squared length can be appreciable. The statistic also has an important limitation: even when the population means agree, random sample means usually differ, so their squared distance is positive on average. Understanding that noise contribution is essential before interpreting the statistic as a test.
Definition and Basic Decomposition
Suppose \(X_1,\ldots,X_{n_1}\) and \(Y_1,\ldots,Y_{n_2}\) are independent samples of \(p\)-dimensional random vectors, with respective means \(\mu_1,\mu_2\) and covariance matrices \(\Sigma_1,\Sigma_2\). Define the sample means \(\bar X\) and \(\bar Y\), and write \(\delta=\mu_1-\mu_2\). The two-sample null hypothesis is \(H_0:\delta=0\).
Let \(D=\bar X-\bar Y\). Independence of the samples gives \(E[D]=\delta\) and \(\operatorname{Cov}(D)=V\). The basic expectation formula is
The first term is the squared population mean difference. The second is the expected squared distance generated by sampling noise. Under the null, therefore, \(E[Q_2]=\operatorname{tr}(V)\), not zero. A large observed value cannot be judged against zero; it must be compared with an appropriate null distribution or calibrated threshold.
Worked Example: Computing the Signal and Noise Contributions
Let \(p=3\), \(n_1=8\), \(n_2=12\), and suppose \(\Sigma_1=\operatorname{diag}(1,2,2)\) and \(\Sigma_2=\operatorname{diag}(2,1,3/2)\). Take \(\delta=(0.2,0.2,0.2)^\mathsf{T}\). Find \(V\), the two contributions to \(E[Q_2]\), and the expectation.
Compute each diagonal entry of \(V=\Sigma_1/8+\Sigma_2/12\):
Thus \(\operatorname{tr}(V)=7/24+1/3+3/8=7/24+8/24+9/24=1\). The squared signal length is \(\|\delta\|^2=3(0.2)^2=0.12=3/25\). Hence
Under the null with the same sample sizes and covariance matrices, the expectation would instead be \(1\). The difference \(0.12\) is the signal contribution; it is not the full expected statistic under the alternative.
Gaussian Distribution and Variance
An exact distributional description is available when the observations in both samples are multivariate normal. Then \(D\sim N(\delta,V)\), including the possibility that \(V\) is singular. Let \(\lambda_1,\ldots,\lambda_p\) be the eigenvalues of \(V\), counting zero eigenvalues. Under the null, orthogonal diagonalization of \(V\) gives
where the \(Z_k\) are independent \(N(0,1)\) random variables. This is generally a weighted sum of chi-square variables, not a chi-square variable with a single degrees-of-freedom parameter. Under the alternative, the corresponding normal coordinates can have nonzero means, so the squared terms are generally noncentral.
To prove the variance formula, write \(D=\delta+\varepsilon\), where \(\varepsilon\sim N(0,V)\) has mean zero. Expand:
The constant has zero variance. The linear term has variance \(4\operatorname{Var}(\delta^\mathsf{T}\varepsilon)=4\delta^\mathsf{T}V\delta\). For the quadratic term, diagonalize \(V=U\Lambda U^\mathsf{T}\), with \(U\) orthogonal and \(\Lambda=\operatorname{diag}(\lambda_1,\ldots,\lambda_p)\). The coordinates of \(U^\mathsf{T}\varepsilon\) are independent centered normals with variances \(\lambda_k\). Therefore \(\varepsilon^\mathsf{T}\varepsilon\) has the same distribution as \(\sum_k\lambda_k Z_k^2\). Since \(\operatorname{Var}(Z_k^2)=2\) and the terms are independent,
The covariance between the linear and quadratic terms is zero. Indeed, each term in \(E[(\delta^\mathsf{T}\varepsilon)(\varepsilon^\mathsf{T}\varepsilon)]\) is a third-order centered Gaussian moment, which is zero because a centered Gaussian vector has the same distribution as its negative. Combining the variances proves the result. Also, \(E[\varepsilon^\mathsf{T}\varepsilon]=\operatorname{tr}(V)\), which gives the stated expectation after expanding \(Q_2\). \(\square\)
Under the null, the variance simplifies to \(2\operatorname{tr}(V^2)\). Under an alternative, the additional term \(4\delta^\mathsf{T}V\delta\) reflects how the signal aligns with directions of sampling variability. These formulas describe the statistic; they do not by themselves specify a valid test when \(V\) is unknown.
Worked Example: Verifying the Gaussian Variance
Continue with \(V=\operatorname{diag}(7/24,1/3,3/8)\) and \(\delta=(0.2,0.2,0.2)^\mathsf{T}\). Calculate the Gaussian variance of \(Q_2\).
First,
Because each squared coordinate of \(\delta\) is \(0.04=1/25\), the other required quantity is
The variance formula now yields
Under the null, the second contribution would be zero and the variance would be \(97/144\). The calculation also shows why the full matrix \(V\), not just its trace, matters for variability: the variance involves \(\operatorname{tr}(V^2)\).
Why Diffuse Alternatives Can Produce a Signal
A quadratic norm collects contributions across coordinates. For example, suppose the mean difference has \(p\) equal nonzero coordinates, each \(a/\sqrt p\). Every coordinate shift tends to zero as \(p\) grows, but
Thus a fixed total signal can be distributed over many individually small changes. This is the central geometric reason a squared-norm statistic is a natural candidate for alternatives with many nonzero coordinates. The statement concerns the signal in the expectation, not a guarantee of power: detectability also depends on sampling variability, dimension, covariance structure, and calibration.
Worked Example: Many Small Shifts with a Fixed Total Norm
Suppose \(p=100\), \(n_1=n_2=25\), and both samples have covariance matrix \(I_{100}\). Compare the null \(\delta=0\) with an alternative having all 100 coordinates equal to \(0.1\). Compute the covariance of the mean difference, the squared signal, and the expectations.
Here \(V=I_{100}/25+I_{100}/25=(2/25)I_{100}\). The alternative has \(\|\delta\|^2=100(0.1)^2=1\), even though each coordinate shift is only \(0.1\). Also, \(\operatorname{tr}(V)=100(2/25)=8\). Consequently,
The null variance in the Gaussian model is \(2\operatorname{tr}(V^2)=2\cdot100(2/25)^2=1.28\). Under this alternative, \(\delta^\mathsf{T}V\delta=(2/25)\|\delta\|^2=0.08\), so the variance is \(1.28+4(0.08)=1.60\). These numbers separate the one-unit mean signal from the noise level; they are not, without a threshold, a decision rule.
Calibration, Interpretation, and a Common Pitfall
When \(V\) is known and the Gaussian model holds, the null representation \(Q_2\overset{d}{=}\sum_k\lambda_kZ_k^2\) specifies how to choose a critical value for a test that rejects for large \(Q_2\). If \(V\) is unknown, a testing procedure must account for estimating or otherwise handling the null distribution. A raw squared norm is not automatically a calibrated test statistic, and using a generic chi-square cutoff without justification can give an incorrect rejection probability. The appropriate treatment of null limits and variance estimation requires additional analysis.
A related pitfall is to assume that two alternatives with the same Euclidean norm must yield identical behavior in every problem. In the isotropic example above, the expectation depends on the signal only through its norm. With anisotropic \(V\), however, the Gaussian variance includes \(\delta^\mathsf{T}V\delta\), which can differ for equal-norm shifts in different directions.
Worked Example: Equal-Length Shifts, Different Variability
Let \(n_1=n_2=2\), and let each sample have covariance matrix \(\Sigma_1=\Sigma_2=\operatorname{diag}(1/4,1)\). Then \(V=\Sigma_1/2+\Sigma_2/2=\operatorname{diag}(1/4,1)\). Compare the equal-length shifts \(\delta_A=(1,0)^\mathsf{T}\) and \(\delta_B=(0,1)^\mathsf{T}\).
Both shifts have squared norm \(1\), and \(\operatorname{tr}(V)=5/4\). Thus both give \(E[Q_2]=1+5/4=9/4\). But \(\operatorname{tr}(V^2)=1/16+1=17/16\), while \(\delta_A^\mathsf{T}V\delta_A=1/4\) and \(\delta_B^\mathsf{T}V\delta_B=1\). Their variances are therefore
The equal expectations do not imply equal variances. In particular, the noise geometry changes how variable the statistic is around its mean, so a norm-only description of the signal is not a complete description of its testing behavior.
Check Your Understanding
Use the definitions and Gaussian formulas above to answer the following.
- Why is \(E[Q_2]\) generally positive under the null?
- If all \(p\) coordinates of \(\delta\) equal \(a/\sqrt p\), what is \(\|\delta\|^2\), and what happens to each individual coordinate as \(p\) increases?
- Under the Gaussian null, why is \(Q_2\) generally a weighted sum of chi-square variables rather than an ordinary chi-square variable?
- Which term in the Gaussian variance formula can differ for two alternatives with the same Euclidean norm?
- Why is a raw observed value of \(Q_2\) not, by itself, a calibrated testing decision?