Start With the Null Hypothesis and the Sampling Design
Choosing a covariance test is not a matter of selecting the most familiar name. First specify which covariance parameters the null hypothesis restricts, then identify how the observations were collected. A test for one population's covariance structure does not automatically apply to several independent groups, and a test of equal scalar variances does not test equality of whole covariance matrices.
For a \(p\)-dimensional random vector \(X\), write its covariance matrix as \(\Sigma\). In a one-population problem, the hypotheses may constrain \(\Sigma\) to one fixed matrix, to a structural family such as diagonal matrices, or to a scalar multiple of the identity. In a group comparison, each group has a covariance matrix \(\Sigma_g\), and the null may require some or all of these matrices to agree.
Match the Test to the Restriction
| Question and design | Null hypothesis | Typical test choice |
|---|---|---|
| One multivariate population; compare with a fixed target | \(\Sigma=\Sigma_0\), with \(\Sigma_0\) specified | Likelihood-ratio test for a specified covariance matrix |
| One multivariate population; ask whether all directions have the same variance and are uncorrelated | \(\Sigma=\sigma^2 I_p\), where \(\sigma^2\) is unknown | Sphericity test |
| One multivariate population; ask whether all off-diagonal covariances vanish | \(\Sigma\) is diagonal, with diagonal entries unrestricted | Test of a diagonal covariance matrix |
| One multivariate population; ask whether covariance is absent between prespecified variable blocks | \(\Sigma\) is block diagonal for a fixed partition | Block-diagonal covariance test |
| Several independent groups measured on one scalar outcome | \(\sigma_1^2=\cdots=\sigma_k^2\) | Bartlett’s test for equal variances |
| Several independent groups measured on \(p\)-dimensional vectors | \(\Sigma_1=\cdots=\Sigma_k\) | Box’s \(M\) test for equal covariance matrices |
These nulls are not interchangeable. Sphericity is more restrictive than diagonality: it requires both zero off-diagonal entries and equal variances. A diagonal covariance matrix allows the variances to differ. Block diagonality permits covariance within each specified block but rules out covariance between blocks; it is not a general test for independence of every pair of variables.
The group structure matters just as much. Bartlett’s equal-variance test concerns one scalar variance per group. Box’s \(M\) concerns all variances and covariances in each group. If a multivariate test is required but only equality of selected marginal variances is scientifically relevant, the null must be formulated accordingly rather than silently substituted with equality of full covariance matrices.
Likelihood-Ratio Calibration for One Population
For the one-population choices, a common starting point is a sample \(X_1,\ldots,X_n\) of independent observations from \(N_p(\mu,\Sigma)\), with unknown mean \(\mu\). Define the residual sum-of-products matrix \(A=\sum_{i=1}^n(X_i-\bar X)(X_i-\bar X)^\mathsf{T}\), the usual sample covariance \(S=A/(n-1)\), and the full-likelihood covariance estimate \(S_{\mathrm{ML}}=A/n\). Thus \(S_{\mathrm{ML}}=((n-1)/n)S\). The distinction between these two covariance estimates matters for the likelihood coefficient.
Derivation. For a fixed \(\Sigma\), maximizing the normal likelihood over \(\mu\) gives \(\hat\mu=\bar X\). Up to terms independent of \(\Sigma\), the resulting log-likelihood is
Over all positive-definite \(\Sigma\), this is maximized at \(\hat\Sigma=S_{\mathrm{ML}}\). Under the null, the only allowed value is \(\Sigma_0\). Subtracting the unrestricted maximum log-likelihood from the null maximum and multiplying by \(-2\) gives
Since \(\log|\Sigma_0|-\log|S_{\mathrm{ML}}|=-\log|\Sigma_0^{-1}S_{\mathrm{ML}}|\), this is the stated expression. Under the null, the usual Wilks approximation is chi-square with \(p(p+1)/2\) degrees of freedom when the model is regular and the sample is sufficiently large. This is an asymptotic calibration, not an exact finite-sample claim.
A different likelihood can arise if one models \(A\) directly as a Wishart random matrix with \(n-1\) degrees of freedom. Its likelihood-ratio calculation uses the residual covariance estimate \(S=A/(n-1)\) and a multiplier \(n-1\). That is not the profiled full normal-sample likelihood just derived. Before using a formula, check which likelihood and which covariance estimate it describes.
Worked Example: Testing a Fixed Target Matrix
Suppose \(n=30\) independent three-dimensional observations are modeled as multivariate normal, with unknown mean. The scientific target is the fixed covariance matrix \(\Sigma_0=I_3\). The observed usual sample covariance is \(S=\operatorname{diag}(1,2,3)\). Set up the correct full-sample likelihood-ratio statistic.
Here \(p=3\), \(S_{\mathrm{ML}}=(29/30)S=\operatorname{diag}(29/30,58/30,87/30)\), and \(\Sigma_0^{-1}=I_3\). The trace term is \(29/30+58/30+87/30=174/30=5.8\). The determinant of \(\Sigma_0^{-1}S_{\mathrm{ML}}\) is \((29/30)(58/30)(87/30)=5.420\) to three decimal places.
Therefore \(-2\log\Lambda=30\{5.8-\log(5.419777\ldots)-3\}\), approximately \(30(1.110)=33.30\). The comparison is with the specified-matrix null, not with a diagonal or equal-variance null. The asymptotic reference degrees of freedom are \(3(4)/2=6\). This calculation illustrates the full-normal coefficient \(n=30\); replacing it with \(n-1\) would describe a different likelihood calculation.
Sphericity Is a Particular Structural Null
For one multivariate population, sphericity means \(\Sigma=\sigma^2I_p\) for some unknown \(\sigma^2>0\). The variance level is not specified in advance; the hypothesis restricts the shape of the covariance matrix. Under the same independent multivariate-normal model with unknown mean, the full-sample likelihood-ratio statistic is
Derivation. Use the profiled likelihood above and write \(T=S_{\mathrm{ML}}\). On the sphericity null, the log-likelihood, apart from its constant, is \(-\frac n2\{p\log(\sigma^2)+\operatorname{tr}(T)/\sigma^2\}\). Differentiating the expression in braces with respect to \(\sigma^2\) gives \(p/\sigma^2-\operatorname{tr}(T)/(\sigma^2)^2\). Its zero occurs at \(\hat\sigma^2=\operatorname{tr}(T)/p\), which is positive when \(T\) is positive definite. Substitution gives the restricted log-likelihood term \(p\log(\operatorname{tr}(T)/p)+p\). Subtracting the unrestricted maximum, whose corresponding term is \(\log|T|+p\), yields
Because \(T=((n-1)/n)S\), the common scale cancels: \(p\log(\operatorname{tr}(T)/p)-\log|T|=p\log(\operatorname{tr}(S)/p)-\log|S|\). This proves the displayed formula. The sphericity null has one free covariance parameter, so its regular Wilks degrees of freedom are \(p(p+1)/2-1\).
Worked Example: Diagonal Does Not Mean Spherical
For \(n=20\) observations on two variables, suppose \(S=\operatorname{diag}(1,4)\). If the question is whether the two variables are uncorrelated, the observed covariance is already diagonal. If the question is whether the covariance is spherical, the variances must also be equal.
For the diagonal null, the unrestricted and restricted covariance estimates coincide for this observed matrix, so the likelihood-ratio statistic is zero. For sphericity, \(\operatorname{tr}(S)/p=(1+4)/2=2.5\), and \(|S|=4\). The full-normal statistic is \(20\{2\log(2.5)-\log(4)\}\). Since \(2\log(2.5)-\log(4)=0.4463\) to four decimal places, the statistic is approximately \(8.926\), not zero. The two tests address different restrictions even though both concern one sample.
Group Tests Require Independent Groups
For equal-variance testing, the data consist of \(k\) independent groups of scalar observations, with a normal distribution within each group and an unknown group mean. The null is \(\sigma_1^2=\cdots=\sigma_k^2\); the alternative permits separate group variances. Bartlett’s test is designed for this setting, and its classical calibration relies on normality. It is not a test of equality of multivariate covariance matrices.
For equal-covariance testing, the observations are independent \(p\)-vectors in each of \(k\) independent groups. The means may differ; the null concerns covariance alone: \(\Sigma_1=\cdots=\Sigma_k\). Box’s \(M\) test compares the separate group covariance estimates with a pooled estimate, with a finite-sample correction commonly used for its approximate chi-square calibration. Its normal-theory approximation can be sensitive to nonnormality. In either group setting, the groups must be independent for these standard procedures; repeated or paired measurements call for a model that represents their dependence.
Worked Example: Equal Variances or Equal Covariance Matrices?
A study compares two independent treatment groups. In one analysis, it records only a scalar blood-pressure outcome; in another, it records a two-component vector consisting of systolic and diastolic pressure. Which null hypothesis matches each analysis?
For the scalar outcome, each group has one variance, say \(\sigma_1^2\) and \(\sigma_2^2\). If the question is whether outcome variability is the same between groups, use the equal-variance hypothesis \(H_0:\sigma_1^2=\sigma_2^2\), and consider Bartlett’s test under its normality assumptions.
For the two-component outcome, each group has a \(2\times2\) covariance matrix. The equal-covariance null requires equality of both marginal variances and the covariance between systolic and diastolic pressure. For instance, matrices \(\Sigma_1=\begin{pmatrix}4&1\\1&9\end{pmatrix}\) and \(\Sigma_2=\begin{pmatrix}4&-1\\-1&9\end{pmatrix}\) have matching marginal variances but are not equal covariance matrices. A test of equal variances alone would not detect the distinction in their off-diagonal entries; Box’s \(M\) targets the full covariance equality question.
A Practical Selection Check
Decide whether there is one sample or several independent groups, and whether each observation is scalar or a vector.
State what is fixed, zero, equal, or constrained to a specified block pattern. Do not choose the test by its name alone.
For normal-theory covariance likelihood tests, assess independence and multivariate normality, and ensure the sample sizes permit the covariance estimates required by the procedure.
Confirm the reference distribution and whether it is exact or approximate. In particular, distinguish a full-sample normal likelihood from a likelihood for a Wishart residual matrix.
A useful final check is the number of restrictions. For a \(p\)-dimensional covariance matrix, there are \(p(p+1)/2\) distinct entries. A fixed-matrix null imposes that many restrictions; a diagonal null imposes \(p(p-1)/2\); and a sphericity null leaves one parameter, imposing \(p(p+1)/2-1\). For \(k\) groups, equality of all covariance matrices imposes \((k-1)p(p+1)/2\) restrictions. These counts provide a check on the usual regular chi-square degrees of freedom; they do not by themselves validate the assumptions or calibration.
Common Mistakes
- Treating diagonality as sphericity. Diagonality permits unequal variances; sphericity requires the variances to be equal as well as the off-diagonal entries to vanish.
- Using an equal-variance test for vector outcomes. Equal marginal variances do not establish equality of full covariance matrices, which also includes cross-variable covariances.
- Ignoring the sampling design. Standard equal-covariance tests assume independent groups; treating paired or repeated observations as independent changes the model.
- Mixing likelihood conventions. With an unknown mean in the full normal sample, the profiled likelihood uses coefficient \(n\) and covariance estimate \(A/n\). A coefficient \(n-1\) belongs to the Wishart likelihood for the residual sum-of-products matrix, not that profiled likelihood.
- Assuming a chi-square reference is automatically reliable. Wilks and related calibrations are approximate under their regularity conditions; departures from normality can affect covariance tests, so the model and calibration need scrutiny.
Check Your Understanding
For each question, identify the null hypothesis and the test family that best matches it.
- One multivariate sample is used to ask whether every off-diagonal population covariance is zero, while the variances may differ. What restriction is being tested?
- Why does a diagonal covariance matrix not necessarily satisfy sphericity?
- Two independent groups each provide multivariate observations. What additional parameters are constrained by equality of covariance matrices beyond equality of marginal variances?
- In the full normal-sample likelihood with unknown mean, what covariance estimate and multiplier appear in the specified-matrix likelihood-ratio statistic?
- Why is a standard independent-group covariance test not automatically suitable for paired measurements?