Lesson 11 of 13 7 min · 137 words
Covariance
How two variables move together.
Covariance measures how two variables move together: . Positive: when one is above its mean, the other tends to be too. Negative: they move in opposite directions. Zero: no *linear* relationship.
Because covariance depends on units, we often normalise it into the correlation , which always lies in .
For a vector of features, the covariance matrix collects every pair: , with variances on the diagonal. It is symmetric and positive semi-definite, and it is the matrix PCA diagonalises.
Formula to remember
Manhattan distance
Slides
Sum of absolute differences (L1).
Quick check · +5 XP