Tutorials › Multivariate Statistics (Graduate) › Deriving Wilks Lambda for the Global Null

Canonical Correlation Analysis · Tutorial 397 of 975

Deriving Wilks Lambda for the Global Null

See how sample canonical correlations combine into Wilks' lambda and how that determinant ratio arises from the Gaussian likelihood-ratio test of global zero association.

Intermediate 10 min read

What You'll Learn

  • State the Gaussian global-null hypothesis and the conditions for using the sample covariance matrices.
  • Define Wilks' lambda as a ratio of covariance determinants.
  • Derive its product representation using the sample canonical correlations.
  • Obtain the likelihood-ratio statistic from the unrestricted and null-model likelihoods.
  • Distinguish Wilks' lambda from the likelihood ratio and from minus twice its logarithm.

Why a Global Test Uses All Canonical Correlations

Canonical correlation analysis summarizes the association between two sets of variables through a sequence of paired linear combinations. A test of the global null asks whether there is any linear association between the sets, rather than whether one selected pair of combinations is associated. Wilks' lambda provides a single summary of all the sample canonical correlations for this test.

The key link is a determinant ratio. For Gaussian data, the ratio compares the best likelihood under a model with no cross-set covariance to the best likelihood when that covariance is unrestricted. The determinant ratio is Wilks' lambda; the likelihood ratio itself is its \(n/2\) power.

Setup and Definition

Suppose \(n\) independent observations are drawn from a joint multivariate normal distribution. Write observation \(i\) as \(Z_i=(X_i^T,Y_i^T)^T\), where \(X_i\) has \(p\) components and \(Y_i\) has \(q\) components. The global null hypothesis is that the population cross-covariance matrix is zero. Assume the joint covariance matrix is positive definite, the two sets have unrestricted means, and the observed centered sample covariance matrix is positive definite. For continuous Gaussian observations, the last condition holds with probability one when \(n>p+q\).

Definition: Let \(S\) be the centered sample covariance matrix, using divisor \(n\), and partition it as $$ S=\begin{pmatrix}S_{xx}&S_{xy}\\S_{yx}&S_{yy}\end{pmatrix}. $$ Wilks' lambda for the global test is $$ \Lambda=\frac{|S|}{|S_{xx}|\,|S_{yy}|}. $$ The sample canonical correlations \(r_1,\ldots,r_m\), where \(m=\min(p,q)\), are the singular values of \(S_{xx}^{-1/2}S_{xy}S_{yy}^{-1/2}\).

The global null is \(\operatorname{Cov}(X,Y)=0\). Under the joint normal model, zero cross-covariance also implies independence of the two sets. The test is therefore a test of independence within this Gaussian model, not a general test of independence for arbitrary distributions.

Deriving the Product of Canonical Roots

Theorem: If \(S\) is positive definite, then $$ \Lambda=\prod_{j=1}^{m}(1-r_j^2). $$ In particular, \(0<\Lambda\leq 1\), and \(\Lambda=1\) exactly when all sample canonical correlations are zero.

To prove the identity, use block elimination on \(S\). Multiplying by a block triangular matrix with determinant one eliminates the lower-left block and gives

$$ |S|=|S_{xx}|\,|S_{yy}-S_{yx}S_{xx}^{-1}S_{xy}|. $$

Consequently, dividing by \(|S_{xx}||S_{yy}|\) and using the determinant identity \(|I+AB|=|I+BA|\) gives

$$ \Lambda =\left|I_q-S_{yy}^{-1/2}S_{yx}S_{xx}^{-1}S_{xy}S_{yy}^{-1/2}\right|. $$

Set \(C=S_{xx}^{-1/2}S_{xy}S_{yy}^{-1/2}\). The matrix inside the determinant is \(I_q-C^TC\). The eigenvalues of \(C^TC\) are the squared singular values of \(C\): these are \(r_1^2,\ldots,r_m^2\), together with extra zeros if \(q>m\). Thus its determinant is the product of \(1-r_j^2\); any extra factors are \(1\). Positive definiteness of \(S\) makes the Schur complement \(S_{yy}-S_{yx}S_{xx}^{-1}S_{xy}\) positive definite, so every factor is positive. Each \(r_j^2\) is nonnegative, which also gives \(\Lambda\leq1\). The product equals one precisely when every \(r_j=0\). \(\square\)

From the Gaussian Likelihood to the Test Statistic

Let \(d=p+q\), and let the fitted means be the sample means. In the unrestricted model the maximum-likelihood covariance estimate is \(S\). Under the null, the covariance must be block diagonal; its maximum-likelihood estimate has diagonal blocks \(S_{xx}\) and \(S_{yy}\). Both models have the same number of mean parameters and the same total covariance dimension. The difference in maximized likelihood therefore comes from the covariance determinants.

Theorem: Under the stated Gaussian model and positive-definiteness conditions, the likelihood ratio in the convention $$ R=\frac{\sup_{H_0} L}{\sup_{\text{unrestricted}} L} $$ is \(R=\Lambda^{n/2}\). Equivalently, the likelihood-ratio deviance is \(-2\log R=-n\log\Lambda\).

For completeness, the Gaussian log-likelihood for a covariance matrix \(\Sigma\) and mean \(\mu\), evaluated at the observations, is

$$ \ell(\mu,\Sigma) =-\frac{nd}{2}\log(2\pi)-\frac{n}{2}\log|\Sigma| -\frac{1}{2}\sum_{i=1}^n (Z_i-\mu)^T\Sigma^{-1}(Z_i-\mu). $$

For either model, the fitted mean is the sample mean. At the fitted covariance, the quadratic sum is \(nd\): for example, in the unrestricted model it is \(n\operatorname{tr}(S^{-1}S)=nd\). Under the null the same calculation applies to each block, and their dimensions sum to \(d\). Thus the constants and fitted quadratic terms cancel in the likelihood ratio. The unrestricted maximized likelihood is proportional to \(|S|^{-n/2}\), and the null maximized likelihood is proportional to \((|S_{xx}||S_{yy}|)^{-n/2}\). Taking their ratio gives

$$ R =\left(\frac{|S|}{|S_{xx}||S_{yy}|}\right)^{n/2} =\Lambda^{n/2}, \qquad -2\log R=-n\log\Lambda. $$

This establishes the result. \(\square\)

The distinction between \(R\) and \(\Lambda\) matters: Wilks' lambda is the determinant ratio, while \(R\) is that ratio raised to \(n/2\). The statistic \(-2\log R\) is a convenient increasing transformation of evidence against the null. Its null calibration is a separate question; this derivation does not provide a chi-square approximation or an exact null distribution.

Worked Examples

Worked Example: Two Nonzero Canonical Correlations

Suppose \(p=q=2\), \(n=40\), and the observed sample covariance blocks are \(S_{xx}=I_2\), \(S_{yy}=I_2\), and \(S_{xy}=\operatorname{diag}(0.6,0.3)\). The whitened cross-covariance matrix is already diagonal, so the sample canonical correlations are \(r_1=0.6\) and \(r_2=0.3\).

The full covariance matrix has diagonal blocks \(I_2\) and off-diagonal blocks \(\operatorname{diag}(0.6,0.3)\). Its eigenvalues are \(1+0.6,1-0.6,1+0.3,1-0.3\), all positive, so it is positive definite. The product formula gives

$$ \Lambda=(1-0.6^2)(1-0.3^2) =(1-0.36)(1-0.09) =(0.64)(0.91)=0.5824. $$

The likelihood ratio and deviance are therefore \(R=0.5824^{40/2}=0.5824^{20}\), approximately \(2.0\times10^{-5}\), and \(-2\log R=-40\log(0.5824)\approx21.62\). These are transformations of the same determinant comparison; a decision or p-value would require an appropriate null calibration.

Worked Example: One Variable Associated with a Two-Variable Set

Let \(p=1\), \(q=2\), \(n=30\), and suppose

$$ S=\begin{pmatrix}4&3&4\\3&9&0\\4&0&16\end{pmatrix}. $$

Here \(S_{xx}=4\), \(S_{yy}=\operatorname{diag}(9,16)\), and \(S_{xy}=(3,4)\). Whitening gives the row vector \((3/6,4/8)=(0.5,0.5)\). It has one singular value, \(r_1=\sqrt{0.5^2+0.5^2}=\sqrt{0.5}\), so \(r_1^2=0.5\). The determinant calculation checks the same result: the Schur complement is

$$ S_{yy}-S_{yx}S_{xx}^{-1}S_{xy} =\begin{pmatrix}6.75&-3\\-3&12\end{pmatrix}, \qquad \left|\begin{pmatrix}6.75&-3\\-3&12\end{pmatrix}\right| =81-9=72. $$

This complement is positive definite because its first diagonal entry is positive and its determinant is positive. Hence \(|S|=4(72)=288\), while \(|S_{xx}||S_{yy}|=4(9\cdot16)=576\). Thus \(\Lambda=288/576=0.5=1-r_1^2\). The likelihood ratio is \(0.5^{15}=1/32768\), and the deviance is \(30\log 2\approx20.79\).

Worked Example: Checking the Scalar Case

For \(p=q=1\), take \(n=12\) and the observed covariance matrix

$$ S=\begin{pmatrix}4&2\\2&9\end{pmatrix}. $$

The sample canonical correlation is the absolute sample correlation: \(r=2/\sqrt{4\cdot9}=1/3\). Directly, \(|S|=36-4=32\), and \(|S_{xx}||S_{yy}|=4\cdot9=36\). Therefore

$$ \Lambda=\frac{32}{36}=\frac{8}{9}=1-\left(\frac13\right)^2. $$

The likelihood ratio is \(R=(8/9)^6=262144/531441\approx0.4933\), and the deviance is \(-12\log(8/9)=12\log(9/8)\approx1.41\). This special case confirms that the determinant definition reduces to the familiar squared-correlation formula.

Interpretation and a Common Pitfall

Each factor \(1-r_j^2\) measures what remains after accounting for one sample canonical association. Multiplying the factors produces a joint summary: a strong canonical correlation makes its factor small, and several moderate correlations can also make the product small. Thus lower Wilks' lambda corresponds to a more pronounced departure from the global-null fit, but the value is not itself a p-value or a direct measure of the proportion of variance explained.

Common mistake: reporting \(\Lambda\) as though it were the likelihood ratio, or treating \(1-\Lambda\) as the fraction of association explained. The likelihood ratio is \(R=\Lambda^{n/2}\), and the likelihood-ratio deviance is \(-n\log\Lambda\). Also, \(1-\prod_j(1-r_j^2)\) is not generally the sum of the squared canonical correlations; for two roots it equals \(r_1^2+r_2^2-r_1^2r_2^2\). Keep the product identity and the likelihood exponent distinct.

Key takeaway: For the Gaussian global test of zero cross-covariance, Wilks' lambda is the ratio \(|S|/(|S_{xx}||S_{yy}|)\). The determinant identity turns it into \(\prod_j(1-r_j^2)\), and the likelihood ratio is \(\Lambda^{n/2}\).

Check Your Understanding

Use the determinant and likelihood relationships developed above.

  1. For sample canonical correlations \(0.4\) and \(0.5\), calculate Wilks' lambda.
  2. Explain why zero cross-covariance implies independence here, and name the model assumption needed for that implication.
  3. If \(\Lambda=0.7\) and \(n=20\), write the likelihood ratio and the likelihood-ratio deviance in terms of these values.
  4. In the product formula, why do extra zero eigenvalues of \(C^TC\), when \(q>p\), not change Wilks' lambda?
  5. Explain why \(1-\Lambda\) is not generally equal to the sum of the squared sample canonical correlations.
Clinical Biostats