carat, depth, table, x, y, zprice, not used in this lecture\[\tilde x_{ij} = \frac{x_{ij} - \bar x_j}{s_j}, \qquad s_j = \sqrt{\frac{1}{n}\sum_{i=1}^n\left(x_{ij} - \bar x_j\right)^2}\]
\[\mathbf{R} = \frac{1}{n}\tilde{\mathbf{X}}^\top\tilde{\mathbf{X}}\]
\[Z_1 = \phi_{11}\tilde X_1 + \phi_{21}\tilde X_2 + \cdots + \phi_{p1}\tilde X_p, \qquad \sum_{j=1}^p\phi_{j1}^2 = 1\]
\[z_{i1} = \sum_{j=1}^p\phi_{j1}\tilde x_{ij} = \tilde x_i\phi_1\]
Sample variance of the scores of a unit vector \(a\)
\[\frac{1}{n}\sum_{i=1}^n\left(\tilde x_i a\right)^2 = \frac{1}{n}a^\top\tilde{\mathbf{X}}^\top\tilde{\mathbf{X}}a = a^\top\mathbf{R}a\]
Maximize \(a^\top\mathbf{R}a\) subject to \(a^\top a = 1\)
\[2\mathbf{R}a - 2va = 0 \quad\Rightarrow\quad \mathbf{R}a = va\]
\[\left\|\tilde x_i\right\|^2 = z_{i1}^2 + \left\|\tilde x_i - z_{i1}\phi_1^\top\right\|^2\]
\[\frac{1}{n}\sum_{i=1}^n\left\|\tilde x_i - z_{i1}\phi_1^\top\right\|^2 = p - \phi_1^\top\mathbf{R}\phi_1\]
\(m\)th component: maximum variance among unit vectors orthogonal to \(\phi_1, \ldots, \phi_{m-1}\)
\[v_1 \ge v_2 \ge \cdots \ge v_p \ge 0\]
\[\sum_{m=1}^p v_m = \operatorname{tr}\left(\mathbf{R}\right) = p\]
\[\text{PVE}_m = \frac{v_m}{\sum_{l=1}^p v_l} = \frac{v_m}{p}\]
| Component | Variance \(v_m\) | PVE | Cumulative PVE |
|---|---|---|---|
| PC1 | 3.999 | 66.66% | 66.66% |
| PC2 | 1.284 | 21.40% | 88.06% |
| PC3 | 0.683 | 11.38% | 99.44% |
| PC4 | 0.031 | 0.52% | 99.95% |
| PC5 | 0.002 | 0.03% | 99.98% |
| PC6 | 0.001 | 0.02% | 100.00% |
DS 3030