Canonical correlation
From Free net encyclopedia
In statistics, canonical correlation analysis, introduced by Harold Hotelling, is a way of making sense of cross-covariance matrices.
Contents |
Definition
Given two column vectors <math>X = (X_1, \dots, X_n)'</math> and <math>Y = (Y_1, \dots, Y_m)'</math> of random variables with finite second moments, one may define the cross-covariance <math>\Sigma _{12} = \operatorname{cov}(X, Y) </math> to be the <math> n \times m</math> matrix whose <math>(i, j)</math> entry is the covariance <math>\operatorname{cov}(X_i, Y_j)</math>.
Canonical correlation analysis seeks vectors <math>a</math> and <math>b</math> such that the random variables <math>a' X</math> and <math>b' X</math> maximize the correlation <math>\rho = \operatorname{cov}(a' X, b' Y)</math>. The random vectors <math>U = a' X</math> and <math>V = b' Y</math> are the first pair of canonical variables. Then one seeks vectors maximizing the same correlation subject to the constraint that they are to be uncorrelated with the first pair of canonical variables; this gives the second pair of canonical variables. This procedure continues <math>\min\{m,n\}</math> times.
Computation
Proof
Let <math>\Sigma _{11} = \operatorname{cov}(X, X)</math> and <math>\Sigma _{22} = \operatorname{cov}(Y, Y)</math>. The parameter to maximize is:
- <math>
\rho = \frac{a' \Sigma _{12} b}{\sqrt{a' \Sigma _{11} a} \sqrt{b' \Sigma _{22} b}} </math>
The first step is to define a change of basis and define:
- <math>
c = \Sigma _{11} ^{1/2} a </math>
- <math>
d = \Sigma _{22} ^{1/2} b </math>
And thus we have:
- <math>
\rho = \frac{c' \Sigma _{11} ^{-1/2} \Sigma _{12} \Sigma _{22} ^{-1/2} d}{\sqrt{c' c} \sqrt{d' d}} </math>
By the Cauchy-Schwarz inequality, we have:
- <math>
c' \Sigma _{11} ^{-1/2} \Sigma _{12} \Sigma _{22} ^{-1/2} d \leq \left(c' \Sigma _{11} ^{-1/2} \Sigma _{12} \Sigma _{22} ^{-1/2} \Sigma _{22} ^{-1/2} \Sigma _{21} \Sigma _{11} ^{-1/2} c \right)^{1/2} \left(d' d \right)^{1/2} </math>
- <math>
\rho \leq \frac{\left(c' \Sigma _{11} ^{-1/2} \Sigma _{12} \Sigma _{22} ^{-1/2} \Sigma _{22} ^{-1/2} \Sigma _{21} \Sigma _{11} ^{-1/2} c \right)^{1/2}}{\left(c' c \right)^{1/2}} </math>
There is equality if the vectors <math>d</math> and <math>\Sigma _{22} ^{-1/2} \Sigma _{21} \Sigma _{11} ^{-1/2} c</math> are colinear. In addition, the maximum of correlation is attained if <math>c</math> is the eigenvector with the maximum eigenvalue for the matrix <math>\Sigma _{11} ^{-1/2} \Sigma _{12} \Sigma _{22} ^{-1} \Sigma _{21} \Sigma _{11} ^{-1/2}</math> (see Rayleigh quotient). The subsequent pairs are found by using eigenvalues of decreasing magnitudes. Orhogonality is garanteed by the symetry of the correlation matrices.
Solution
The solution is therefore:
- <math>c</math> is an eigenvector of <math>\Sigma _{11} ^{-1/2} \Sigma _{12} \Sigma _{22} ^{-1} \Sigma _{21} \Sigma _{11} ^{-1/2}</math>
- <math>d</math> is proportional to <math>\Sigma _{22} ^{-1/2} \Sigma _{21} \Sigma _{11} ^{-1/2} c</math>
Reciprocally, there is also:
- <math>d</math> is an eigenvector of <math>\Sigma _{22} ^{-1/2} \Sigma _{21} \Sigma _{11} ^{-1} \Sigma _{12} \Sigma _{22} ^{-1/2}</math>
- <math>c</math> is proportional to <math>\Sigma _{11} ^{-1/2} \Sigma _{12} \Sigma _{22} ^{-1/2} d</math>
The canonical variables are defined by:
- <math>U = c' \Sigma _{11} ^{-1/2} X = a' X</math>
- <math>V = d' \Sigma _{22} ^{-1/2} Y = b' Y</math>
Hypothesis testing
Each row can be tested for significance with the following method. If we have <math>p</math> independent observations in a sample and <math>\widehat{\rho}_i</math> is the estimated correlation for <math>i = 1,\dots, \min\{m,n\}</math>. For the <math>i</math>th row, the test statistic is:
- <math>\chi ^2 = - \left( p - 1 - \frac{1}{2}(m + n + 1)\right) \ln \prod _ {j = i} ^p (1 - \widehat{\rho}_j^2),</math>
which is distributed as a chi-square with <math>(m - i + 1)(n - i + 1)</math> degrees of freedom.
External links
- See also generalized canonical correlation.
- Applied Multivariate Statistical Analysis, Fifth Edition, Richard Johnson and Dean Wichern