What the Test Compares
A covariance matrix is a joint description of marginal variances and pairwise covariances. A scientific question may specify a complete covariance matrix in advance—for example, whether a set of measurements has the covariance structure predicted by a measurement model. The likelihood-ratio test compares that specified matrix with the best-fitting unrestricted covariance matrix, while allowing the mean vector to be unknown.
The test here is for independent observations from a multivariate normal distribution. Its statistic measures how much the likelihood improves when the covariance is allowed to vary freely. Under the null hypothesis, the statistic is calibrated approximately by a chi-square distribution. A Bartlett correction adjusts the statistic for a leading finite-sample discrepancy; it does not make the test exact.
The Statistic from the Sample Scatter Matrix
Write \(\bar X=n^{-1}\sum_{i=1}^n X_i\) for the sample mean and define the centered scatter matrix
Assume \(n>p\) and that \(A\) is positive definite. This ensures the unrestricted covariance maximum-likelihood estimate, \(A/n\), exists and is positive definite. The factor \(n\), rather than \(n-1\), is used because this is the maximum-likelihood estimate after fitting the mean.
To see where this expression comes from, the normal log-likelihood, apart from its constant term, is \(\ell(\mu,\Sigma)=-\tfrac n2\log|\Sigma|-\tfrac12\sum_i(X_i-\mu)'\Sigma^{-1}(X_i-\mu)\). For either hypothesis, maximizing over \(\mu\) gives \(\bar X\), leaving the quadratic term \(\operatorname{tr}(\Sigma^{-1}A)\). Under the null the covariance is \(\Sigma_0\); under the unrestricted alternative its maximum-likelihood estimate is \(A/n\). Therefore
The second equality uses the determinant identity \(\left|\Sigma_0^{-1/2}(A/n)\Sigma_0^{-1/2}\right|=|A/n|/|\Sigma_0|\). The trace and determinant terms compare the observed scatter with the specified covariance on the same scale.
Worked Example: A Two-Variable Scatter Matrix
Suppose \(p=2\), \(n=20\), \(\Sigma_0=I_2\), and the observed scatter matrix is \(A=\operatorname{diag}(24,16)\). Calculate the raw likelihood-ratio statistic and its Bartlett-corrected version.
The scaled scatter matrix is \(A/n=\operatorname{diag}(1.2,0.8)\), with trace \(2\) and determinant \(0.96\). Since \(\Sigma_0=I_2\),
There are \(q=p(p+1)/2=3\) free covariance parameters. For an unknown mean, the Bartlett multiplier is \(c=1-(2p^2+9p+11)/(6(p+1)n)\). Here, \(c=1-37/(6\cdot3\cdot20)=0.8972\), so the corrected statistic is \(T_B=cT=0.7325\). Its approximate reference distribution is \(\chi^2_3\); the upper-tail p-value is about \(0.87\). At the 5% level, this is not evidence against the specified covariance.
Chi-Square Calibration and the Bartlett Correction
The number of unrestricted covariance parameters is \(q=p(p+1)/2\), because a symmetric \(p\times p\) matrix has \(p\) diagonal entries and \(p(p-1)/2\) distinct off-diagonal entries. Under the null and standard regularity conditions, Wilks’ theorem gives a chi-square limit with this many degrees of freedom. Here the conditions include fixed \(p\), independent observations from the stated normal model, a positive-definite null covariance, and an identifiable unrestricted covariance model.
The form of the correction depends on estimating the mean. A derivation of its leading term helps explain both the multiplier and its limitations. Under \(H_0\), the transformed scatter matrix \(W=\Sigma_0^{-1/2}A\Sigma_0^{-1/2}\) has a Wishart distribution with identity scale and \(n-1\) degrees of freedom. The statistic can be written \(T=\operatorname{tr}(W)-n\log|W|+np\log n-np\). For this Wishart distribution, \(E[\operatorname{tr}(W)]=p(n-1)\) and \(E[\log|W|]=p\log 2+\sum_{j=1}^p\psi((n-j)/2)\), where \(\psi\) is the digamma function.
Worked Example: A Three-Variable Test and Its Corrected P-Value
Suppose \(p=3\), \(n=100\), \(\Sigma_0=I_3\), and the scaled scatter matrix is \(A/n=\operatorname{diag}(e^x,1,1)\), where \(x\) is the positive solution of \(100(e^x-x-1)=6.6167\) (approximately \(x=0.3430\)). Calculate both chi-square p-values.
The trace of \(A/n\) is \(e^x+2\), and its log determinant is \(x\). Thus \(T=100[(e^x+2)-x-3]=100(e^x-x-1)=6.6167\). The degrees of freedom are \(q=3(4)/2=6\). The uncorrected upper-tail probability is \(P(\chi^2_6\ge 6.6167)\approx0.3578\).
For \(p=3\), the correction is \(c=1-56/(24n)\). With \(n=100\), this is \(c=0.9766667\), giving \(T_B=0.9766667(6.6167)=6.4623\). The corrected upper-tail probability is \(P(\chi^2_6\ge 6.4623)\approx0.3734\). Both p-values exceed \(0.05\), so this sample does not provide evidence against the specified covariance at that level. The conclusion is not that the null covariance has been proved true.
Reading the Result Carefully
For a chosen significance level \(\alpha\), reject \(H_0\) when the corrected p-value is at most \(\alpha\), or equivalently when \(T_B\) exceeds the \(1-\alpha\) quantile of \(\chi^2_q\). The p-value is calculated from the upper tail because larger likelihood-ratio values indicate greater disagreement between the data and the null covariance. The chi-square calibration is approximate, so its quality can be affected by small samples, high dimension, departures from multivariate normality, or observations that strongly influence the scatter matrix.
Worked Example: A Small Sample and a Cautious Conclusion
Let \(p=3\), \(n=8\), \(\Sigma_0=I_3\), and suppose \(A/n=\operatorname{diag}(1.5,1,0.75)\). The scatter is positive definite and \(n>p\). Calculate the adjusted statistic and interpret it.
The trace is \(3.25\), and the determinant is \(1.5(1)(0.75)=1.125\). Therefore \(T=8[3.25-\log(1.125)-3]\). Since \(\log(1.125)\approx0.117783\), \(T\approx8(0.132217)=1.0577\).
For \(p=3,n=8\), \(c=1-7/(3\cdot8)=17/24\approx0.7083\). Thus \(T_B\approx0.7492\), with \(6\) chi-square degrees of freedom. The approximate upper-tail p-value is about \(0.993\), so the test does not reject at the 5% level. The sample is small, however, and the large p-value is not evidence that the covariance is exactly \(I_3\); it indicates that this test statistic is not unusually large under its approximate reference distribution.
Common Mistakes
- Using the wrong scatter scaling. The likelihood uses \(A/n\), the maximum-likelihood estimate after estimating the mean. Replacing it silently with \(A/(n-1)\) changes the likelihood-ratio statistic.
- Using the correction for a different model. Estimating the mean changes the finite-sample correction. Use the multiplier stated here for an unknown mean, rather than one derived for a known mean.
- Reporting the wrong chi-square tail. The p-value is \(P(\chi^2_q\ge T_B)\), not the lower-tail probability.
- Treating the correction as an exact distributional result. The adjusted statistic still uses an approximate chi-square calibration. The correction improves the leading finite-sample approximation but does not remove model assumptions.
- Interpreting nonrejection as confirmation. A nonsignificant result means the data do not provide sufficient evidence against the specified matrix at the chosen level; it does not establish that the matrix is correct.
Check Your Understanding
Use the definitions and calculations above to answer the following.
- Why does the likelihood-ratio statistic use \(A/n\) rather than the unbiased sample covariance \(A/(n-1)\)?
- For \(p=4\), how many degrees of freedom does the chi-square reference distribution have?
- In the three-variable example with raw statistic \(6.6167\), why is the corrected p-value calculated using \(6.4623\) rather than \(6.6167\)?
- What assumptions justify using the stated chi-square calibration?
- Explain why a p-value of \(0.87\) does not prove that the specified covariance matrix is true.