MAS-II · Statistical Learning · Free Lesson

Interpret principal components analysis (PCA) software outputs.

Free CAS MAS-II (Modern Actuarial Statistics II) lesson in Statistical Learning. 16 min read, ~2,446 words.

R hands you prcomp() output with five pieces: sdev, rotation, x, center, scale. The exam tests whether you can read those numbers and pick the right number of components without re-running the code.

The geometry first, the printout second. PCA rotates the pp-variable data cloud to a new orthogonal basis where PC1 points along the direction of maximum variance, PC2 along the next, and so on. Software returns four things you must read: the eigenvalues, the loadings, the scores, and the centering/scaling metadata.

prcomp reports sdev, the standard deviations of the principal components. Square them to get eigenvalues λj\lambda_j of the covariance (or correlation) matrix.

PVEj=λj∑k=1pλk\text{PVE}_j = \frac{\lambda_j}{\sum_{k=1}^{p} \lambda_k}

If you ran PCA on the correlation matrix (scale. = TRUE), then ∑kλk=p\sum_k \lambda_k = p exactly. On a raw covariance matrix, the sum equals total sample variance ∑kVar(Xk)\sum_k \text{Var}(X_k).

Cumulative PVE. Sort PCs descending and accumulate. The retained dimension kk is the smallest index where cumulative PVE crosses your threshold.

Read the full lesson, free →
Worked examples and practice. Free with a free account, no card.

Common mistakes

Bottom line

Exam shortcut

If the question gives sdev values, square them first and only then divide for PVE; reversing the order is the most common rounding trap. If the question asks "how many components" without naming a rule, default to the 80% cumulative PVE rule unless the data is standardized and Kaiser is mentioned.

The full lesson (about 2,446 words, 16 min read) adds 6 worked examples, all 6 common mistakes, a self-check, free in the app.

Learning objectives

Browse all free MAS-II lessons or jump into free MAS-II practice questions.