Covariance & correlation
Covariance measures how two variables move together; correlation rescales it to . Covariance is bilinear — just like an inner product — which is exactly the bridge back to linear algebra and PCA.
Before you start — give these a try
Attempting first primes your brain for the lesson — even if you miss. Nothing is graded or saved; it's just a warm-up.
. Compute .
. Compute .
What you’ll be able to do
- Compute covariance via .
- Use and bilinearity.
- Compute the correlation coefficient and know independent ⟹ uncorrelated (but not the converse).
In your course
· MATH2015 · Linear Algebra & Probability- Definition 15.7Covariance
- Proposition 15.13
- Proposition 15.14
- Proposition 15.16Independent ⟹ uncorrelated (converse false)
- Proposition 15.17Bilinearity of covariance (like an inner product)
- Definition 15.9 / Theorem 15.1Correlation coefficient,
Covariance
(Definition 15.7, Proposition 15.13). It is positive when tend to be large together, negative when one is high as the other is low, and .
Variance of a sum, in general
\n\n(Proposition 15.14). The covariance term is what makes variances fail to simply add when variables are correlated.
Independent ⟹ uncorrelated (not conversely)
If are independent then (Proposition 15.16). The converse fails: e.g. uniform on and have but are clearly dependent.
Correlation coefficient & bilinearity
To remove scale, use the correlation (Definition 15.9, Theorem 15.1); means a perfect linear relationship. Covariance is bilinear — and it distributes over sums (Prop 15.17) — mirroring the dot product, which is why the covariance matrix feeds PCA.
.
; more generally add .
For positive finite variances, , with iff are perfectly linearly related.
Worked examples
. Find .
- 1
.
- 2
.
is uniform on and . Show they are uncorrelated.