Principal Component Analysis (PCA): Spectral Eigenvalue Decomposition and Dimensionality Reduction
by Rao Statistics · Last updated on 2 Nov 2026 · 4.3 Principal Component Analysis
Orthogonal transformation, scree plot eigenvalues, variance retention, and component scoring in R and Python
Learning Objective
By the end of this lesson: Perform eigenvalue decomposition on a sample correlation matrix, compute proportion of explained variance, plot scree criteria, and project observations onto PC1 and PC2 axes.
Statistical Theory & Assumptions
Principal Component Analysis (PCA) identifies linear combinations that maximize sample variance subject to unit-length constraints The principal loading vectors correspond strictly to the eigenvectors of the covariance matrix while the eigenvalues quantify variance explained along each orthogonal axis.
Assumptions
- Linear Relationships: Correlated features exhibit linear mutual associations.
- Continuous Scale: Variables are measured on numeric scales suitable for variance computation.
- Orthogonality: Successive components are mutually uncorrelated for
Because the total variance is conserved, retaining the first components preserves max information with minimal dimensional complexity.
Worked Dataset & Variables
Morphometric Iris Multi-Feature Dataset: Four continuous biometric measurements across flower specimens illustrating two dominant variance axes. (sample size n = 6).
| Variable | Type | Description |
|---|---|---|
| sepal_length | Numeric | Length in cm |
| sepal_width | Numeric | Width in cm |
| petal_length | Numeric | Length in cm |
| petal_width | Numeric | Width in cm |
| sepal_length | sepal_width | petal_length | petal_width |
|---|---|---|---|
| 5.1 | 3.5 | 1.4 | 0.2 |
| 4.9 | 3 | 1.4 | 0.2 |
| 7 | 3.2 | 4.7 | 1.4 |
| 6.4 | 3.2 | 4.5 | 1.5 |
| 6.3 | 3.3 | 6 | 2.5 |
| 5.8 | 2.7 | 5.1 | 1.9 |
Software Procedure (R, Python & Excel)
# Principal Component Analysis in R
data <- iris[, 1:4]
pca_res <- prcomp(data, center = TRUE, scale. = TRUE)
summary(pca_res)
biplot(pca_res)Numerical Results
The first principal component (PC1) accounts for 72.96% of variance, and PC2 explains 22.85%, achieving cumulative 95.81% information preservation in only two dimensions.
| Statistic | Value | Note |
|---|---|---|
| PC1 Eigenvalue (λ₁) | 2.918 | 72.96% variance |
| PC2 Eigenvalue (λ₂) | 0.914 | 22.85% variance |
| Cumulative Variance Retained | 95.81% | Exceeds 80% threshold |
Interpretation & Decision Rule
Formal conclusion: A 4-dimensional biological measurement space is condensed into a 2D orthogonal plane with less than 5% loss of descriptive information.
Decision rule: Retain all principal components with eigenvalues (Kaiser criterion) or where the scree plot exhibits an inflection elbow.
Practical significance: PC1 acts as an overall size index dominated by petal length/width, cleanly separating distinct taxonomic clusters without supervision.
Practice Files
Download: multivariate_iris_pca.csv (CSV Dataset, 2.1 KB)