Why Summarize a PCA Spectrum?
PCA replaces a set of measured variables with ordered, uncorrelated components. For a genomic profile, this can turn thousands of correlated measurements into a shorter sequence of directions that summarizes variation among samples. The spectrum of PCA eigenvalues answers a focused descriptive question: how much sample variance is associated with each successive component? A scree plot displays that spectrum, while explained-variance percentages express it on a common scale.
These summaries can help select a manageable number of components for description or visualization. They do not, by themselves, identify biological mechanisms, establish that a component is useful for prediction, or prove that a particular number of underlying factors exists. The choice is a purpose-dependent summary of the observed variance.
Eigenvalues and Explained Variance
Let \(X\) be an \(n \times p\) data matrix, with samples in rows and variables in columns. Assume the columns have been centered. If variables have also been scaled to unit sample variance, the PCA is based on the sample correlation matrix; otherwise, it is based on the sample covariance matrix. The earlier material on centering and scaling before PCA explains why this choice matters: the variance spectrum depends on the variables and their scales.
Write the sample covariance matrix as \(S=X^\mathsf{T}X/(n-1)\). Its eigenvalues are ordered from largest to smallest, \(\lambda_1 \geq \lambda_2 \geq \cdots \geq \lambda_p \geq 0\). With \(X=UDV^\mathsf{T}\), the singular-value decomposition of the centered matrix, the corresponding eigenvalues are \(\lambda_j=d_j^2/(n-1)\). If the data are scaled, this relation uses the scaled \(X\).
The total variance is \(\sum_{j=1}^{p}\lambda_j=\operatorname{tr}(S)\), the sum of the variances of the original variables. Thus \(r_j\) is a fraction between zero and one, and the fractions across all \(p\) components sum to one. Report \(100r_j\) as a percentage. The cumulative percentage for the first \(k\) components is \(100R_k\). If centered data have rank less than \(p\), some eigenvalues are zero; they contribute no variance, but including them keeps the denominator and the definition unambiguous.
The trace identity follows because the trace of a matrix equals the sum of its eigenvalues. A second way to see the interpretation is that the variance of the score on component \(j\) is \(\lambda_j\); the first \(k\) orthogonal component scores therefore account for \(\sum_{j=1}^{k}\lambda_j\) units of variance. Dividing by the total variance expresses that amount as a fraction of the variance in the original centered data.
Worked Example: Calculating Explained Variance
Suppose a hypothetical PCA of centered genomic measurements has eigenvalues \(4.8,\ 2.4,\ 1.2,\ 0.9,\ 0.7\), measured in squared units of the input variables. Find the component-wise and cumulative explained-variance percentages, then select a dimension if the descriptive goal is to retain at least 80% of the total variance.
The total variance is \(4.8+2.4+1.2+0.9+0.7=10.0\). The component proportions are \(4.8/10.0=0.48\), \(2.4/10.0=0.24\), \(1.2/10.0=0.12\), \(0.9/10.0=0.09\), and \(0.7/10.0=0.07\). In percentage terms these are 48%, 24%, 12%, 9%, and 7%.
The cumulative percentages are 48%, \(48+24=72\%\), \(72+12=84\%\), \(84+9=93\%\), and 100%. The first two components fall short of the stated 80% target, while the first three exceed it. Under that specific descriptive rule, choose \(k=3\). This retains 84% of the sample variance; it does not imply that the omitted 16% is irrelevant to every scientific question.
Reading a Scree Plot
A scree plot places component number \(j\) on the horizontal axis and its eigenvalue \(\lambda_j\), or sometimes its explained-variance percentage, on the vertical axis. Since the eigenvalues are ordered, the plotted sequence cannot increase. A steep initial decline indicates that early components account for substantially more variance than later ones. A flatter tail indicates that successive components contribute more similar, often smaller, amounts.
An apparent elbow is a bend where a steep decline changes to a comparatively flat tail. One descriptive rule is to retain components up to that bend, treating the later components as adding relatively little variance one at a time. This is a visual judgment, not a uniquely defined mathematical cutoff. Different readers may reasonably identify different bends, especially when the decline is gradual or the plot is noisy.
A plot of eigenvalues and one of explained-variance percentages have the same ordering and shape up to a constant vertical rescaling, because each percentage is the corresponding eigenvalue divided by the same total. Cumulative explained variance is different: it can only increase, so it is useful for checking a target such as 80% but does not display an elbow in the same way.
Worked Example: Choosing a Dimension Without a Sharp Elbow
A hypothetical standardized-profile PCA gives eigenvalues \(3.1,\ 2.5,\ 2.0,\ 1.6,\ 1.2,\ 0.9,\ 0.7\). The total is \(12.0\). The successive explained percentages are \(25.83\%,\ 20.83\%,\ 16.67\%,\ 13.33\%,\ 10.00\%,\ 7.50\%,\ 5.83\%\), respectively.
Adding these in order gives cumulative percentages of \(25.83\%,\ 46.67\%,\ 63.33\%,\ 76.67\%,\ 86.67\%,\ 94.17\%,\ 100\%\). The eigenvalues decline throughout, but there is no obvious point where a sharp drop gives way to a flat tail. If the stated aim is to retain at least 85% of the observed variance, then \(k=5\) is the smallest qualifying choice: \(R_4=9.2/12.0=76.67\%\), whereas \(R_5=10.4/12.0=86.67\%\).
The choice of five follows from the chosen 85% rule, not from a clear elbow. If the purpose instead required a very compact display, the analyst might present fewer components and report the corresponding loss in cumulative variance. The relevant choice depends on the intended description and should be stated explicitly.
The Scaling Decision Changes the Spectrum
Explained-variance percentages are relative to the variables used in the PCA. With covariance-based PCA, variables with larger measurement variances can dominate the total. With correlation-based PCA, each nonconstant variable is first scaled to unit variance, so each contributes equally to the total variance before accounting for correlations. Neither choice is universally correct: it depends on whether the original measurement scales and variances should influence the analysis.
Worked Example: Covariance and Correlation Give Different Summaries
Consider two hypothetical centered variables with sample variances 9 and 1 and sample correlation 0.6. Their covariance matrix is \(S=\begin{pmatrix}9&1.8\\1.8&1\end{pmatrix}\), because the covariance is \(0.6\sqrt{9\cdot1}=1.8\). Its eigenvalues solve \(\lambda^2-10\lambda+5.76=0\), giving approximately \(9.386\) and \(0.614\). Their sum is 10, matching the trace.
Using covariance-based PCA, the first component explains \(9.386/10=0.9386\), or 93.86%, of the total variance. If both variables are standardized first, their correlation matrix is \(\begin{pmatrix}1&0.6\\0.6&1\end{pmatrix}\), with eigenvalues \(1.6\) and \(0.4\). The first component then explains \(1.6/(1.6+0.4)=0.80\), or 80%.
The two percentages are not contradictory: they summarize PCA on differently scaled inputs. The covariance-based result gives more influence to the variable with variance 9; the correlation-based result gives the two variables equal marginal variance. Before interpreting an eigenvalue or selecting \(k\), specify which version of the data was analyzed.
Choosing a Descriptive Dimension
A defensible choice combines the variance summary with the purpose of the analysis. Common descriptive approaches include:
- Cumulative-variance target: choose the smallest \(k\) for which \(R_k\) meets a prespecified target. This is transparent, but the target is a convention tied to the use case, not a universal law.
- Scree elbow: retain components before the plot becomes comparatively flat. This reflects diminishing individual contributions, but the visual judgment may be ambiguous.
- Fixed display dimension: use a small number of components for a visualization, while reporting how much variance they explain. A display constraint is not evidence that omitted components contain no structure.
These approaches need not agree. If an elbow suggests three components but a stated 90% target requires six, report the disagreement rather than presenting one choice as inevitable. For a descriptive summary, the analyst might prioritize interpretability or simplicity and show the retained cumulative variance. For compression, a specified variance target may be more relevant. In either case, describe the rule and its consequences.
The average-eigenvalue rule sometimes used with correlation-based PCA retains components with eigenvalues greater than 1, since the total variance of \(p\) standardized variables is \(p\) and the average eigenvalue is 1. This is a heuristic, not a guarantee that retained components are meaningful or that discarded ones are unimportant. More formal methods for assessing factor number are a separate topic.
Diagnostics, Pitfalls, and Limits
Check the calculation and the data definition before drawing a conclusion. The eigenvalues should be nonnegative apart from tiny numerical errors, should be ordered from largest to smallest, and should sum to the total variance. The component percentages should sum to 100% up to rounding, and cumulative percentages should not decrease. If these checks fail substantially, verify the matrix used, the component ordering, the denominator, and whether the reported eigenvalues are covariance eigenvalues or have been rescaled.
When \(p\) is large relative to \(n\), a centered data matrix has rank at most \(n-1\), so some of the \(p\) eigenvalues are zero. This is expected, not a calculation error. Conversely, a component explaining a small percentage is not automatically negligible: a low-variance direction may be important for a specific scientific question. Explained variance describes variation, not biological importance, causal effect, prediction accuracy, or measurement quality.
A frequent mistake is to interpret “the first three components explain 80% of the variance” as “the first three components explain 80% of the genes” or “80% of the biology.” The percentage refers to total sample variance in the chosen, centered and possibly scaled variables. Another mistake is to treat an elbow or a percentage threshold as proof of the correct number of latent processes. They are descriptive decision aids, and their appropriateness depends on the goal and preprocessing.
Check Your Understanding
Try each problem, then compare with the solutions below.
- A PCA has eigenvalues \(6,\ 3,\ 1\). What percentage does each component explain, and what percentage do the first two explain cumulatively?
- A data set has four standardized variables. What is the total variance, and what is the average eigenvalue?
- A scree plot declines smoothly without a visible bend. Name one defensible way to select a descriptive \(k\), and state what must be reported.
- Explain why covariance-based and correlation-based PCA can produce different explained-variance percentages for the same measured variables.
Solutions. (1) The total is \(6+3+1=10\). The component percentages are \(6/10=60\%\), \(3/10=30\%\), and \(1/10=10\%\); the first two cumulatively explain \(90\%\). (2) The total variance is 4 because each standardized variable has variance 1; the average eigenvalue is \(4/4=1\). (3) One can choose the smallest \(k\) meeting a prespecified cumulative-variance target. Report the target, selected \(k\), and achieved cumulative percentage; a smooth decline does not supply a unique elbow. (4) Covariance-based PCA retains original variable scales, so higher-variance variables can contribute more to total variance. Correlation-based PCA standardizes variables to unit variance first, changing the covariance matrix and its eigenvalue proportions.