STAT 4051 Fall 2026: PCA in Statistical Learning
Overview
Prof Kazeem Adepoju explains how principal component analysis (PCA) replaces many original features with linear combinations that capture variance, covering centering, covariance and correlation matrices, eigenvalues, loadings, and explained variance. Examples involving weight and body fat in 18 adult males and athletic event times show why standardization matters when variables use different scales; he closes with component-selection rules and previews sparse PCA and the connection to singular value decomposition.
Key takeaways
- PCA's eigenvalues quantify component variance, and a component's PVE is its eigenvalue divided by the sum of all eigenvalues.
- Centering subtracts each feature's mean, whereas standardization also divides by its standard deviation; the two operations are not interchangeable.
- Use covariance-based PCA when feature scales are comparable; use correlation-based PCA when units or scales differ to prevent large-scale variables from dominating.
- In the weight and body-fat example, covariance-based PCA assigns PC1 92.7% of variance because weight is measured on a larger scale; standardization gives both variables equal-magnitude PC1 loadings.
- For the athletics example, standardization prevents marathon times from overwhelming sprint times, yielding a first component for overall performance and a second contrasting sprint and endurance events.
- The lecture offers three component-selection approaches: retain enough PCs to reach at least 80% cumulative explained variance, apply the Kaiser eigenvalue-greater-than-1 rule, or inspect an elbow plot.
Chapters
- Prof Kazeem Adepoju resumes principal component analysis after the midterm and frames it as a way to address problems caused by having many features.
- The lecture plan is to finish PCA, cover sparse PCA on Wednesday, and discuss matrix factorization on Friday.
- The stated goal is to create a smaller number of artificial directions that capture as much variation in the data as possible.
- The total variance equals the trace of the covariance matrix, the sum of its diagonal variances, and the sum of its eigenvalues.
- Each eigenvalue represents the variance of its corresponding principal component.
- PVE for component k is its eigenvalue divided by the sum of all eigenvalues; cumulative PVE sums the selected components' eigenvalues before dividing by the total.
- The data matrix has n observations in rows and p variables in columns; centering subtracts each column's mean from every observation in that column.
- The sample covariance matrix is computed from centered data as the centered matrix transposed times the centered matrix, divided by n minus 1.
- Eigenvectors provide the loadings used to form principal components as linear combinations of centered original features.
- Covariance-based PCA is appropriate when variables have comparable scales; correlation-based PCA is preferable when their units or scales differ.
- For two variables, the covariance matrix has variances on its diagonal and the covariance between the variables in its off-diagonal entries.
- The characteristic equation, determinant of the covariance matrix minus lambda times the identity set to zero, yields eigenvalues; the example assigns 80% of total variance to PC1 and 20% to PC2.
- Covariance is measured in product units, while correlation is dimensionless and standardizes the variables to avoid scale-driven dominance.
- Adepoju discusses multivariate normality as a setting in which uncorrelated principal components can also be treated as independent.
- PCA rotates the coordinates from the original features to component axes such as PC1 and PC2, making lower-dimensional analysis possible.
- The example uses weight in pounds and percentage body fat for 18 adult males, variables with different units and scales.
- Centering shifts each variable so its mean is zero; it is distinct from standardization, which also divides by the standard deviation.
- A centered component score above zero indicates a value above the relevant mean, while a score below zero indicates a value below it.
- The variance of a linear combination such as aX1 plus bX2 includes squared loading terms times each variance and a cross-term involving the covariance.
- The component variances sum to the total variance, and the first principal component has the largest eigenvalue by construction.
- Using covariance for weight and body fat produces a reported PC1 PVE of 92.7%, largely reflecting weight's larger scale rather than balanced contributions from both variables.
- Standardizing the two features gives each unit variance, so neither variable dominates solely because of its measurement scale.
- In the example, correlation-based PC1 has equal-magnitude loadings of 1 over the square root of 2 for both variables.
- The first component's explained variance falls from 92.7% with covariance to about 85% after standardization, reflecting a more balanced representation.
- The athletics data include events from 100 m sprints through the marathon, with times measured on very different scales.
- Covariance-based PCA lets marathon time dominate PC1 because marathon durations are much larger than sprint times, making the resulting country comparisons misleading.
- After standardization, PC1 represents broad athletic performance across events, while PC2 contrasts sprint performance with endurance events.
- One selection guideline is to retain enough components for cumulative explained variance to reach at least 80%.
- The Kaiser rule retains components with eigenvalues greater than 1; an elbow plot is another proposed selection method.
- Adepoju previews an explanation of the connection between singular value decomposition and PCA, followed by sparse PCA on Wednesday.
Transcript excerpt
1:59 Mhm. >> Okay,
2:51 good morning everyone. I want to welcome you to another statistical machine learning class. On a Friday when we wrote the exam, of course the whole and seat, you know, empty seat that we have right now was actually full to the brim. But there's something I will let you know. Examination has consequences. The same thing, you know, the same way as as election also has consequences. If you want to stand a chance of having A in a class, you have to make sure
3:42 you attend the class regularly. I'm currently grading exam. We are currently grading that, and before the the week runs out, you're actually going to see result. But, I would advise if you come to my class regularly, you listen, you ask question when you get stuck, there's never going to be any issue at all. And um uh I also want to make this announcement. Whenever uh I think I would advise we always follow instruction. Exam is made for 15 minutes. The moment you hear stop writing, you stop. Yours paper gets 50 minutes. Obeying instruction is what make a
4:29 society to be great, any society. Okay, so I would advise come to class regularly. When you are in my class, pay attention. We're starting again with the material. Um we before the midterm, we started what I call principal component analysis. Of course, we're going to continue. So, what I'm going to I'm going to walk you through the remainder of the material on principal components analysis today. And of course, on Wednesday it's going to be sparse PCA. And of course, on Friday, we're going to talk about matrix
5:15 factorization. Now, the the journey to exam two begins. And I need you to pay 100% attention again.
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Prof Kazeem Adepoju.