Given two column vectors and of random variables with finite second moments, one may define the cross-covariance to be the matrix whose entry is the covariance.
Canonical correlation analysis seeks vectors and such that the random variables and maximize the correlation. The random vectors and 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 times.
Computation[]
Proof[]
Let and . The parameter to maximize is
The first step is to define a change of basis and define
There is equality if the vectors and are colinear. In addition, the maximum of correlation is attained if is the eigenvector with the maximum eigenvalue for the matrix (see Rayleigh quotient). The subsequent pairs are found by using eigenvalues of decreasing magnitudes. Orthogonality is guaranteed by the symmetry of the correlation matrices.
Solution[]
The solution is therefore:
is an eigenvector of
is proportional to
Reciprocally, there is also:
is an eigenvector of
is proportional to
The canonical variables are defined by:
Hypothesis testing[]
Each row can be tested for significance with the following method. If we have independent observations in a sample and is the estimated correlation for . For the th row, the test statistic is:
A typical use for canonical correlation in the psychological context is to take a two sets of variables and see what is common amongst the two tests. For example you could take two well established multidimensional personality tests such as the MMPI and the NEO. By seeing how the MMPI factors relate to the NEO factors, you could gain insight into what dimensions were common between the tests and how much variance was shared. For example you might find that an extraversion or neuroticism dimension accounted for a substantial amount of shared variance between the two tests.
External links[]
See also generalized canonical correlation.
Applied Multivariate Statistical Analysis, Fifth Edition, Richard Johnson and Dean Wichern