Test a multivariate mean with covariance-scaled distance, an exact F reference law and a confidence ellipsoid; see why normal sampling and invertibility matter.
Hotelling T-squared test
The Hotelling T-squared test tests a population mean vector against a specified vector, using the sample covariance to measure the discrepancy jointly. For a quant checking two model errors, it asks whether the pair of average errors is inconsistent with the target pair after allowing for their scales and co-movement. This article develops the one-sample test; comparing two independent samples needs a different covariance estimate and calibration.
One null hypothesis for the whole vector
Let X1,…,Xn be independent, identically distributed p-dimensional observations. Coordinates within an observation may be correlated. Write the sample mean as Xˉ and use the unbiased covariance matrix:
S=n−11i=1∑n(Xi−Xˉ)(Xi−Xˉ)⊤.
For H0:μ=μ0 against any different mean vector, the statistic is
T2=n(Xˉ−μ0)⊤S−1(Xˉ−μ0).
The inverse covariance discounts deviations along noisy directions and gives more weight to deviations along precisely measured directions. Correlation matters: two coordinates moving together need not provide two independent pieces of evidence. For p=1, this becomes the ordinary one-sample t statistic squared, n(Xˉ−μ0)2/s2. NIST gives this univariate-to-multivariate construction.
Geometrically, T2=nDS2(Xˉ,μ0), where DS is the Mahalanobis distance computed with S. Equivalently, T2 is the squared distance using S/n, the estimated covariance of the sample mean. The factor n belongs here because the object being tested is an average, rather than an individual observation. Stanford's one-sample notes explain this covariance scaling.
The exact reference distribution has conditions
For the finite-sample result below, assume the observation vectors are i.i.d. from a multivariate normal distribution with a fixed mean and a positive-definite population covariance Σ. Require n>p and an invertible S. Under this continuous normal model, n>p makes S invertible with probability one; exact collinearity in actual data still prevents the calculation.
Under H0,
F=p(n−1)n−pT2∼Fp,n−p.
Reject for a large value of F, using its upper tail. Here Fa,b;1−α denotes the (1−α) quantile, so the critical value for T2 is
cα=n−pp(n−1)Fp,n−p;1−α.
Estimating the covariance creates extra uncertainty. Replacing this finite-sample calibration with a chi-square cutoff can matter substantially when n is small. The normal theory uses the independence of the sample mean and sample covariance, with (n−1)S having a Wishart distribution. Stanford derives that distributional construction; NIST states the one-sample F transformation.
A fictional desk checks two pricing errors
Suppose a model-validation desk has ten independent paired pricing-error observations, measured in basis points, from the stated bivariate normal model. These are invented sample summaries, not market data. The target mean is zero for both instruments:
n=10,p=2,xˉ=(12),μ0=(00),S=(4009).
The covariance entries have units of squared basis points. Since this particular S is diagonal,
The upper-tail p-value from F2,8 is approximately 0.1015. At a preselected 5% level, the F cutoff is 4.4590, or T2=10.0327: the desk does not reject the zero mean vector. This does not establish that both biases are zero, nor that the model is accurate enough for its intended use. Ten observations leave substantial uncertainty.
Turn the test into a confidence ellipsoid
Invert the same test over candidate mean vectors μ. Under the same assumptions, the exact 100(1−α)% confidence region is
{μ:n(xˉ−μ)⊤S−1(xˉ−μ)≤cα}.
It is an ellipse for two coordinates and an ellipsoid in higher dimensions. Its centre is the sample mean; the covariance determines its orientation and relative axis lengths. This follows by solving the preceding test inequality for μ. The confidence level describes repeated-sample coverage of the whole true vector, just as a confidence interval describes coverage in one dimension.
The fictional 95% confidence ellipse is centred at mean errors (1, 2) basis points. Its semiaxes are about 2.0033 and 3.0049 basis points. The zero vector is inside because its T-squared is 6.9444, below the boundary value 10.0327.
The joint 95% region contains zero, matching the test's failure to reject at 5%. This is uncertainty about the population mean vector, not a prediction region for a future pricing-error observation.
The ellipse also makes a useful distinction from separate t tests. A collection of unadjusted coordinate-wise intervals does not automatically have the same joint coverage, and a joint rejection does not by itself identify which coordinates differ. Stanford discusses Hotelling's test through its search across linear combinations.
Where the classical test stops
Serially dependent returns or overlapping backtest observations do not satisfy the independent-row model. Their sample-mean covariance need not equal Σ/n. Volatility changes and heavy tails also undermine the exact normal calibration. A dependence-aware covariance estimator or resampling design needs its own justified reference distribution; inserting it into T2 does not preserve the displayed exact F law.
Dimension is another constraint. The centred sample covariance has rank at most n−1, so it is necessarily singular when p≥n. Even with p<n, nearly redundant variables can make the inverse unstable. A pseudoinverse or shrinkage estimator changes the procedure and requires separate calibration. Adding more instruments is not a free increase in evidence.
For the underlying test/interval duality and careful interpretation of a non-rejection, see Confidence Intervals and Hypothesis Testing (public preview; full lesson requires membership).