Tutorials › Multivariate Statistics (Graduate) › Likelihood-Ratio Test Of A Specified Covariance

Covariance Matrix Inference · Tutorial 238 of 975

Likelihood-Ratio Test Of A Specified Covariance

Learn how a specified-covariance likelihood ratio reduces to a determinant-and-trace statistic, and how to calculate and interpret it when the mean is known.

Intermediate 12 min read

What You'll Learn

  • Set up the likelihood for an iid multivariate normal sample with known mean.
  • State the conditions under which the unrestricted covariance maximum is finite.
  • Derive the likelihood-ratio statistic and its determinant and trace terms.
  • Prove that the resulting deviance is nonnegative.
  • Calculate the statistic for scalar, diagonal, and correlated examples.
  • Distinguish the likelihood-ratio calculation from its later calibration.

Why a Specified-Covariance Test Has Two Matrix Terms

A covariance matrix describes both the scale of variation in each coordinate and the dependence between coordinates. Testing a proposed matrix therefore asks whether the observed multivariate scatter is compatible with all of those features at once. In a normal model, the likelihood-ratio test compares the likelihood at the specified covariance with the largest likelihood available when the covariance is unrestricted.

This tutorial treats the mean vector as known. That condition determines which deviations enter the likelihood: each observation is centered at the known mean, not at a mean estimated from the sample. The test statistic has a determinant term, reflecting overall volume, and a trace term, reflecting the scatter measured relative to the proposed covariance. Its calibration—the choice of a rejection threshold—is a separate question.

Model, Likelihood, and Regularity Conditions

Definition: Let \(X_1,\ldots,X_n\) be independent and identically distributed \(p\)-dimensional random vectors with \(X_i\sim N_p(\mu,\Sigma)\), where the mean vector \(\mu\) is known and the covariance matrix \(\Sigma\) is an unknown symmetric positive-definite matrix. The specified-covariance test has null hypothesis \(H_0:\Sigma=\Sigma_0\), where \(\Sigma_0\) is a specified symmetric positive-definite matrix, against the alternative that \(\Sigma\) is any symmetric positive-definite matrix.

Write the known-mean scatter matrix and its scaled version as

$$ A=\sum_{i=1}^n (X_i-\mu)(X_i-\mu)^\top, \qquad \widehat{\Sigma}=\frac{A}{n}. $$

The matrix \(\widehat{\Sigma}\) is the maximum-likelihood estimator under the unrestricted alternative when \(A\) is positive definite. Its denominator is \(n\), not \(n-1\). Here \(\mu\) is known, so no degree of freedom is used to estimate the mean.

The ordinary finite likelihood-ratio calculation requires \(A\) to be positive definite. Under the stated model with nonsingular covariance, this holds with probability one when \(n\ge p\). If the observed \(A\) is singular, the unrestricted normal likelihood is unbounded as a covariance matrix approaches singularity in directions with no observed scatter; there is then no finite unrestricted maximum of the form used below.

For a positive-definite \(\Sigma\), the joint density, viewed as a function of \(\Sigma\), is

$$ L(\Sigma) =(2\pi)^{-np/2}|\Sigma|^{-n/2} \exp\left\{-\frac{1}{2} \operatorname{tr}\left(\Sigma^{-1}A\right)\right\}. $$

This follows by multiplying the \(n\) normal densities and using \(\sum_i (X_i-\mu)^\top\Sigma^{-1}(X_i-\mu) =\operatorname{tr}(\Sigma^{-1}A)\).

The Unrestricted Covariance Maximum

Result: If \(A\) is positive definite, the likelihood over all symmetric positive-definite covariance matrices is maximized at \(\widehat{\Sigma}=A/n\).

To verify the maximum, compare the log-likelihood at an arbitrary positive-definite \(\Sigma\) with its value at \(\widehat{\Sigma}\). Let \(B=\widehat{\Sigma}^{1/2}\Sigma^{-1}\widehat{\Sigma}^{1/2}\), which is positive definite. Since \(A=n\widehat{\Sigma}\), the trace term at \(\Sigma\) is \(n\operatorname{tr}(B)\). Also \(|\Sigma|=|\widehat{\Sigma}|/|B|\), and at \(\widehat{\Sigma}\) the trace term is \(np\). Therefore

$$ \ell(\Sigma)-\ell(\widehat{\Sigma}) =\frac{n}{2}\left\{\log|B|-\operatorname{tr}(B)+p\right\}. $$

Let \(b_1,\ldots,b_p\) be the positive eigenvalues of \(B\). Then \(\log|B|=\sum_j\log b_j\) and \(\operatorname{tr}(B)=\sum_j b_j\). The scalar inequality \(\log b\le b-1\) for \(b>0\) gives \(\log|B|-\operatorname{tr}(B)+p\le0\), with equality only if every \(b_j=1\). Thus the likelihood is maximized at \(\Sigma=\widehat{\Sigma}\), as claimed. \(\square\)

Deriving the Likelihood-Ratio Statistic

Define the likelihood ratio as the maximum likelihood under the null divided by the maximum likelihood under the unrestricted alternative:

$$ \Lambda =\frac{L(\Sigma_0)}{L(\widehat{\Sigma})}. $$

Substituting the likelihood into this ratio cancels the common normalizing constant. At \(\widehat{\Sigma}=A/n\), the trace term is \(\operatorname{tr}(\widehat{\Sigma}^{-1}A)=np\). Hence

$$ \Lambda =\left(\frac{|\widehat{\Sigma}|}{|\Sigma_0|}\right)^{n/2} \exp\left\{-\frac{1}{2} \left[\operatorname{tr}(\Sigma_0^{-1}A)-np\right]\right\}. $$

Because \(A=n\widehat{\Sigma}\), the same expression can be written in terms of the scaled scatter matrix:

$$ \Lambda =\left(\frac{|\widehat{\Sigma}|}{|\Sigma_0|}\right)^{n/2} \exp\left\{-\frac{n}{2} \left[\operatorname{tr}(\Sigma_0^{-1}\widehat{\Sigma})-p\right]\right\}. $$

A small \(\Lambda\) means the specified covariance gives a likelihood much smaller than the best unrestricted covariance. It is often convenient to use the deviance, defined as minus twice the log likelihood ratio:

Definition: The likelihood-ratio deviance for testing \(H_0:\Sigma=\Sigma_0\) with known mean is
$$ D=-2\log\Lambda =n\left\{ \operatorname{tr}(\Sigma_0^{-1}\widehat{\Sigma}) -\log\left|\Sigma_0^{-1}\widehat{\Sigma}\right| -p \right\}. $$

The determinant expression follows from \(\log|\Sigma_0^{-1}\widehat{\Sigma}| =\log|\widehat{\Sigma}|-\log|\Sigma_0|\). Although the product \(\Sigma_0^{-1}\widehat{\Sigma}\) need not be symmetric, it has the same positive eigenvalues as the symmetric positive-definite matrix \(\Sigma_0^{-1/2}\widehat{\Sigma}\Sigma_0^{-1/2}\), so its determinant and trace are well-defined and real.

Why the Deviance Is Nonnegative

The deviance cannot be negative: the null likelihood cannot exceed the maximum likelihood under the unrestricted alternative. The matrix expression makes this fact explicit. Let \(C=\Sigma_0^{-1/2}\widehat{\Sigma}\Sigma_0^{-1/2}\), and let \(c_1,\ldots,c_p\) be its positive eigenvalues. Trace and determinant invariance give

$$ \frac{D}{n} =\operatorname{tr}(C)-\log|C|-p =\sum_{j=1}^p(c_j-\log c_j-1). $$

For every \(c>0\), the function \(g(c)=c-\log c-1\) satisfies \(g(1)=0\) and \(g'(c)=1-1/c\). It decreases for \(0<c<1\), increases for \(c>1\), and therefore has minimum zero at \(c=1\). Every summand is nonnegative, so \(D\ge0\). Equality holds exactly when all \(c_j=1\), which for the symmetric matrix \(C\) means \(C=I\), or equivalently \(\widehat{\Sigma}=\Sigma_0\). \(\square\)

This also clarifies what the two terms measure. The determinant compares covariance volumes, while the trace aggregates the observed scatter along directions standardized by the null covariance. Neither term alone gives the full likelihood comparison.

Worked Calculations

Worked Example: A Scalar Covariance Test

Suppose \(p=1\), \(n=5\), the known mean is \(0\), and the observed values are \(-2,-1,0,1,2\). Test the specified variance \(\Sigma_0=1\) by calculating the likelihood ratio and deviance.

The known-mean scatter is \(A=(-2)^2+(-1)^2+0^2+1^2+2^2=10\), so \(\widehat{\Sigma}=A/n=2\). In one dimension, determinant and trace reduce to ordinary scalar values. Thus

$$ \Lambda =\left(\frac{2}{1}\right)^{5/2} \exp\left\{-\frac{1}{2}(10-5)\right\} =2^{5/2}e^{-2.5} \approx 0.464. $$

The deviance is \(D=-2\log\Lambda=5(2-\log 2-1) =5(1-\log 2)\approx1.534\). The two calculations agree because \(\exp(-D/2)\approx\exp(-0.767)=0.464\). This is the likelihood comparison; deciding whether it is significant requires a calibrated critical value.

Worked Example: A Diagonal Target Covariance

Let \(p=2\), \(n=4\), and known mean \((0,0)^\top\). Suppose the observations are \((2,0)^\top,(-2,0)^\top,(0,1)^\top,(0,-1)^\top\), and the specified covariance is \(\Sigma_0=\operatorname{diag}(1,2)\). Calculate the determinant and trace contributions.

Summing the four outer products gives \(A=\operatorname{diag}(8,2)\), so \(\widehat{\Sigma}=\operatorname{diag}(2,0.5)\). The determinant ratio is \(|\widehat{\Sigma}|/|\Sigma_0|=1/2\), and \(\operatorname{tr}(\Sigma_0^{-1}\widehat{\Sigma})=2+0.25=2.25\). Therefore

$$ D=4\{2.25-\log(0.5)-2\} =4\{0.25+\log 2\} \approx 3.773. $$

As a check, \(\operatorname{tr}(\Sigma_0^{-1}A)=9\) and \(np=8\), so the likelihood ratio is \(\Lambda=(0.5)^2\exp\{-(9-8)/2\} =0.25e^{-0.5}\approx0.152\). This equals \(\exp(-D/2)\), up to rounding.

Worked Example: A Correlated Scatter Matrix

Take \(p=2\), \(n=4\), and known mean \((0,0)^\top\). Use the four observations \(\sqrt{2}(1,0.5)^\top\), \(-\sqrt{2}(1,0.5)^\top\), \(\sqrt{2}(0,\sqrt{3}/2)^\top\), and \(-\sqrt{2}(0,\sqrt{3}/2)^\top\). Test the specified covariance \(\Sigma_0=\operatorname{diag}(2,1)\) by calculating the deviance.

The sum of the outer products is \(A=\begin{pmatrix}4&2\\2&4\end{pmatrix}\), hence \(\widehat{\Sigma}=A/4= \begin{pmatrix}1&0.5\\0.5&1\end{pmatrix}\). Its determinant is \(1(1)-(0.5)^2=0.75\), while \(|\Sigma_0|=2\). The trace is \(\operatorname{tr}(\Sigma_0^{-1}\widehat{\Sigma})=0.5+1=1.5\). It follows that

$$ D=4\left\{1.5-\log(0.75/2)-2\right\} =4\left\{-0.5+\log(8/3)\right\} \approx1.923. $$

For a direct likelihood-ratio check, \(\operatorname{tr}(\Sigma_0^{-1}A)=6\), so \(\Lambda=(0.75/2)^2\exp\{-(6-8)/2\} =0.375^2e\approx0.382\). Also \(\exp(-1.923/2)\approx0.382\), as required. The off-diagonal sample covariance contributes through the determinant even though the specified matrix is diagonal.

Common Mistake and Practical Interpretation

A frequent error is to center the observations at their sample mean even though the mean is specified as known. That replaces \(A=\sum_i(X_i-\mu)(X_i-\mu)^\top\) with a different scatter matrix and changes the likelihood being compared. The correction is to use the stated known mean throughout: calculate every residual as \(X_i-\mu\), form \(A\), and then use \(\widehat{\Sigma}=A/n\). Estimating an unknown mean leads to a different likelihood calculation.

Another tempting shortcut is to compare only determinants. Equal determinants do not imply equal covariance structure: matrices can have the same volume but very different eigenvalues and orientations. The trace term is also necessary. The likelihood-ratio deviance combines both contributions and is nonnegative, with zero only when the unrestricted estimate equals the specified matrix.

The algebra provides the statistic and its direction: reject for sufficiently small \(\Lambda\), equivalently sufficiently large \(D\). It does not by itself specify a numerical cutoff. That requires a reference distribution or another calibration appropriate to the testing procedure.

Check Your Understanding

Use the known-mean likelihood and the determinant-and-trace form to answer these questions.

  1. Why is the unrestricted covariance estimate \(A/n\) rather than \(A/(n-1)\) in this setting?
  2. State the regularity condition on the observed scatter matrix needed for a finite unrestricted covariance maximum.
  3. Write the likelihood-ratio deviance using \(\widehat{\Sigma}\), \(\Sigma_0\), and \(p\).
  4. Why is the deviance nonnegative, and when is it zero?
  5. If the mean is known, which vector should be subtracted from each observation when forming the scatter matrix?
Clinical Biostats