- Introduced by
- Harold Hotelling
- Year
- 1936
- Type
- Multivariate linear dimension reduction and association
What does it do?
Canonical Correlation Analysis (CCA) is a multivariate method that finds pairs of linear combinations, one from each of two variable sets, such that the two members of each pair are as strongly correlated as possible.
Harold Hotelling introduced it in his 1936 Biometrika paper, and it gives a general linear framework for studying the association between two multivariate sets of continuous measurements. Several classical procedures, including multiple regression and MANOVA, are special cases of it.
The intuition behind the method
Imagine two groups of measurements taken on the same people, such as a set of cognitive test scores and a set of brain-imaging measures. Correlating each cognitive score with each brain measure one pair at a time produces a large table that is hard to interpret and inflates the false-positive rate. CCA instead combines the cognitive scores into one composite (a canonical variate) and the brain measures into another, choosing the weights so that the two composites correlate as strongly as possible. It then finds further pairs in descending order of correlation, in the way principal component analysis finds directions of maximum variance within a single dataset. The first canonical correlation is the largest linear association between the two sets. Each later pair is uncorrelated with the earlier pairs and captures the remaining association.
History
Harold Hotelling introduced canonical correlation analysis in his 1936 Biometrika paper, 'Relations between two sets of variates', to measure the overall association between two multivariate sets of measurements. He showed that the problem reduces to an eigenvalue problem. Later work extended the framework to regularised, kernel and neural-network variants for high-dimensional and nonlinear settings. The details of these later developments are not verified against the sources listed for this page.
When to use it
Use CCA when you have two conceptually distinct multivariate sets of continuous variables measured on the same observations and want to characterise the overall linear association between them. Typical settings include relating psychological test scores to neuroimaging measures, linking environmental predictors to ecological response variables, or relating questionnaire subscales to behavioural outcomes. The classical method assumes that both variable sets are jointly multivariate normal, that observations are independent, that the sample is large relative to the total number of variables (a commonly cited guideline is n ≥ 10(p + q)), and that neither within-set covariance matrix is singular, so strong multicollinearity within a set should be addressed first. Do not use standard CCA when the variables are not continuous or the normality assumption is clearly untenable; regularised or kernel CCA variants may be more suitable in those cases.
Limitations and considerations
- Needs a large sample relative to the number of variables; with small n the sample canonical correlations are biased upwards and the weight vectors are unstable.
- Sensitive to multicollinearity within each set; a near-singular within-set covariance matrix produces unstable or degenerate weights.
- Canonical weights reflect relationships partialled for all other variables in the same set and are hard to interpret directly; loadings are more informative but still need care.
- The method finds linear combinations only, so nonlinear associations between the two sets are not detected without kernel or neural-network extensions.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Summarises the association between two variable sets in one analysis, extracting several orthogonal dimensions of relationship rather than a single prediction.
- Includes multiple regression (when one set contains a single variable) and MANOVA-type designs as special cases, so the same framework covers several familiar analyses.
- Canonical loadings (structure coefficients) show which original variables contribute most to each canonical dimension, which supports substantive interpretation.
- The sequential Wilks' lambda testing gives a principled basis for deciding how many dimensions of association are statistically supported.
Applications
- Neuroscience and neuroimaging: relating batteries of cognitive or clinical scores to sets of brain connectivity or activation measures.
- Ecology and environmental science: linking multivariate species assemblages (response set) to multivariate environmental predictors (explanatory set).
- Educational and psychological research: examining the joint relationship between sets of aptitude scores and sets of achievement outcomes.
- Genetics and genomics: identifying shared structure between sets of genetic markers and sets of phenotypic measurements (e.g., imaging genetics).
- Marketing and consumer research: relating customer attitude dimensions to purchase-behaviour dimensions.
- Economics: exploring the co-movement of two sets of macroeconomic indicators across time or regions.
How it works
How it works
The analyst partitions n observations into two multivariate blocks, X (n × p) and Y (n × q). The classical theory assumes that the variables in both blocks are jointly multivariate normal. The aim is to describe the association between the two blocks in full.
Formula
\mathbf{X} \in \mathbb{R}^{n \times p},\quad \mathbf{Y} \in \mathbb{R}^{n \times q}CCA constructs s = min(p, q) pairs of canonical variates. The k-th pair is a linear combination U_k = a_k'X from the first set and V_k = b_k'Y from the second. The weight vectors a_k and b_k are chosen to maximise the correlation between U_k and V_k, subject to the constraint that the pair is uncorrelated with the previous k − 1 pairs.
Formula
U_k = \mathbf{a}_k^\top \mathbf{X}, \quad V_k = \mathbf{b}_k^\top \mathbf{Y}, \quad k = 1, \ldots, \min(p,q)The k-th canonical correlation ρ_k* is the maximum Pearson correlation attainable between U_k and V_k. It is obtained by optimising the ratio of the cross-covariance to the product of the within-set standard deviations, written in terms of Σ_XX, Σ_YY and Σ_XY. The canonical correlations are ordered so that ρ_1* ≥ ρ_2* ≥ … ≥ ρ_s* ≥ 0. Because a correlation does not change when a variable is rescaled, the canonical correlations do not depend on how the variables are scaled, although the weight vectors do.
Formula
\rho_k^* = \max_{\mathbf{a}_k, \mathbf{b}_k} \operatorname{Cor}(U_k, V_k) = \frac{\mathbf{a}_k^\top \boldsymbol{\Sigma}_{XY} \mathbf{b}_k}{\sqrt{\mathbf{a}_k^\top \boldsymbol{\Sigma}_{XX} \mathbf{a}_k \cdot \mathbf{b}_k^\top \boldsymbol{\Sigma}_{YY} \mathbf{b}_k}}The canonical weights come from an eigenvalue problem. The squared canonical correlations are the eigenvalues of Σ_XX⁻¹ Σ_XY Σ_YY⁻¹ Σ_YX, and the corresponding eigenvectors give the weights a_k for the X set. A similar eigenequation gives the weights b_k for the Y set. In practice the sample matrices S_XX, S_YY and S_XY replace the population matrices.
Formula
\boldsymbol{\Sigma}_{XX}^{-1} \boldsymbol{\Sigma}_{XY} \boldsymbol{\Sigma}_{YY}^{-1} \boldsymbol{\Sigma}_{YX} \mathbf{a}_k = \rho_k^{*2} \mathbf{a}_kThe significance of the remaining association is tested with Wilks' lambda, Λ_k, which is the product of the terms (1 − ρ_i*²) for the dimensions from k to s. Bartlett's chi-square approximation converts Λ_k into a test statistic. A significant result means that at least one dimension of association remains after the earlier dimensions have been extracted. The tests are applied in sequence, as described under the FAQ.
Formula
\Lambda_k = \prod_{i=k}^{s}(1 - \rho_i^{*2}), \quad \chi^2 \approx -\!\left(n - 1 - \tfrac{p+q+1}{2}\right)\ln \Lambda_kA high canonical correlation does not mean that either set is well explained by its canonical variates. The redundancy index for X summarises how much of the variance in X is accounted for by the canonical variates of Y, and the reverse holds for Y. It combines the squared canonical correlations with the proportion of variance each canonical variate explains in its own set. Reporting it alongside the canonical correlations gives a fuller picture of practical importance.
Formula
R^2_{\text{redundancy}} = \frac{1}{p}\sum_{k=1}^{s} \rho_k^{*2} \cdot \lambda_k^{(X)}Common pitfalls
- Interpreting canonical weights as if they were standardised regression coefficients. Canonical loadings are usually the safer basis for interpretation.
- Reporting canonical correlations without redundancy indices. A high canonical correlation can coexist with canonical variates that explain little of the variance in the original variables.
- Failing to test the dimensions in sequence with the step-down Wilks' lambda procedure, which can lead to retaining too many or too few dimensions.
- Skipping multicollinearity checks within each set before analysis, which can make the weight vectors unstable and hard to interpret.
- Generalising to a new population without cross-validation, since a large number of variables makes it easy to capitalise on chance association in the sample.
Frequently asked questions
How is CCA different from multiple regression?
Multiple regression predicts a single outcome variable from a set of predictors. It is a special case of CCA in which the second set contains only one variable (q = 1). CCA generalises this to any number of variables in both sets and finds all the orthogonal dimensions of association, not only the best overall prediction of one outcome.
How many canonical variates should I retain?
Apply the step-down Wilks' lambda test. Start by testing all s dimensions together, then remove the first canonical correlation and test the remaining dimensions, and so on. Retain the dimensions for which the test is significant at your chosen alpha level. Judge the practical importance of each retained dimension by its redundancy index as well as its significance.
What is the minimum sample size needed?
A commonly cited rule of thumb is n ≥ 10(p + q), where p and q are the numbers of variables in the two sets. With fewer observations the sample canonical correlations are biased upwards, the weight vectors are unstable, and cross-validation is essential. Regularised or sparse CCA variants are better suited to high-dimensional situations with smaller samples.
Should I use canonical weights or canonical loadings for interpretation?
Prefer canonical loadings (structure coefficients), which are the simple correlations between each original variable and its canonical variate. Canonical weights behave like partial regression coefficients: they can suppress the contribution of correlated variables and be misleading under multicollinearity. Loadings are generally more stable and easier to interpret substantively.
Related methods
Sources
Hotelling, H. (1936). Relations between two sets of variates. Biometrika, 28(3–4), 321–377.
Open DOI referenceAnderson, T. W. (2003). An Introduction to Multivariate Statistical Analysis (3rd ed.). Wiley.
ISBN: 978-0471360919Tabachnick, B. G., & Fidell, L. S. (2019). Using Multivariate Statistics (7th ed.). Pearson.
ISBN: 978-0134790541