Statistical Foundations: Z-Scores, Covariance & Pearson Correlation
Learning Objective: By the end of this module, you will mathematically derive Z-scores, construct 2x2 covariance matrices, calculate Pearson correlation coefficients, and implement them in Python using NumPy and SciPy.
- Intuition & Big Picture
When building machine learning models, your raw input features often operate on completely different scales. Standardizing features to Z-scores centers dataset distributions on a unit scale N(0,1).
Anil's Insight: Think of Z-score as a universal converter for standard deviations. If a student scores 85 on Math (mean 70, std 10) and 90 on Physics (mean 85, std 2.5), the Z-score reveals they performed better in Physics (Z = +2.0) than Math (Z = +1.5)!
- Mathematical Foundation
Cov(X, Y) = (1/N) * sum((x_i - mean_X) * (y_i - mean_Y))