Multivariate Relationships, Anscombe's Quartet & PCA Intuition
Explore linear vs monotonic relationships, why Anscombe's quartet proves summary statistics are insufficient without visualisation, and how PCA projects high-dimensional feature spaces onto orthogonal principal axes.
Learning Objectives
- •Contrast Pearson linear correlation with Spearman rank-order correlation.
- •Demonstrate the pedagogical significance of Anscombe's Quartet and Simpson's Paradox.
- •Compute and interpret covariance matrices and eigenvectors in PCA.
- •Construct a Scree Plot to determine dimensional retention thresholds.
Essential Prerequisites
- •Descriptive statistics, variance/covariance, and basic matrix algebra
The Core Mental Model
Why This Exists
Real datasets frequently contain 50 to 500 features with heavy multicollinearity. PCA compresses high-dimensional noise into a compact set of orthogonal signals, preventing overfitting and enabling 2D visual discovery.
Beginner Foundation
Correlation does not equal causation. Furthermore, high correlation can be entirely manufactured by a single outlier, or obscured by non-linear relationships. Spearman ranking helps uncover curves that Pearson misses.
Micro Concepts Decomposition
Pearson vs. Spearman Correlation
Pearson r measures linear correlation between continuous variables and is sensitive to outliers. Spearman rho evaluates monotonic relationships by computing Pearson on ranked values.
Anscombe's Quartet & Why Plots are Mandatory
Anscombe's Quartet consists of four datasets with nearly identical summary statistics (mean, variance, correlation r = 0.816, regression line y = 3.0 + 0.5x), yet drastically different graphs. Summary statistics alone can conceal non-linear patterns and leverage points.
Principal Component Analysis (PCA) Intuition
PCA is an unsupervised linear dimensionality reduction technique. It rotates the coordinate axes to align with directions of maximum variance. Principal Component 1 (PC1) captures the largest variance; PC2 is orthogonal to PC1 and captures the next largest variance.
Scree Plot & Cumulative Explained Variance
Eigenvalues represent the variance captured by each principal component. A Scree Plot graphs eigenvalues against component number. The 'elbow' identifies the optimal number of dimensions to retain.
Hardware State Machine Architecture
Interactive Simulator
Correlation Matrix & Scatter Plot Regression Laboratory
Pearson correlation r = Cov(X, Y) / (σ_X × σ_Y) measures only linear association. Notice how toggling a single extreme leverage outlier dramatically flips or degrades the regression slope! Never report correlation without visualizing the scatter plot.
End-to-End Execution Trace
Step-by-Step Code Execution (PYTHON)
Sandbox Terminal Ready
Click Run Code or press Ctrl+Enter to compile and execute.
Where Students Lose Marks
Active Assessment Quiz
Multivariate Relationships, Anscombe's Quartet & PCA Intuition — Practice Questions
Why must datasets be standardized using StandardScaler prior to running Principal Component Analysis (PCA)?