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\).
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
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
Consequently, dividing by \(|S_{xx}||S_{yy}|\) and using the determinant identity \(|I+AB|=|I+BA|\) gives
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.
For completeness, the Gaussian log-likelihood for a covariance matrix \(\Sigma\) and mean \(\mu\), evaluated at the observations, is
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
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
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
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
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
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
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.
Check Your Understanding
Use the determinant and likelihood relationships developed above.
- For sample canonical correlations \(0.4\) and \(0.5\), calculate Wilks' lambda.
- Explain why zero cross-covariance implies independence here, and name the model assumption needed for that implication.
- If \(\Lambda=0.7\) and \(n=20\), write the likelihood ratio and the likelihood-ratio deviance in terms of these values.
- In the product formula, why do extra zero eigenvalues of \(C^TC\), when \(q>p\), not change Wilks' lambda?
- Explain why \(1-\Lambda\) is not generally equal to the sum of the squared sample canonical correlations.