5.2Covariance and correlation
The idea
Covariance measures whether two variables move together; correlation rescales it to between −1 and 1. Cauchy–Schwarz limits how large covariance can be.
Think of it like this: Hours studied and marks usually rise together (positive covariance); hours of TV and marks usually move oppositely (negative).
Why it exists
Statements about covariance and variance of sums are favourite true/false items.
How it works
- Cov(X, Y) = E[XY] − E[X]E[Y].
- Independent ⇒ Cov = 0. The converse is false.
- ρ = Cov/(σ_X σ_Y) lies in [−1, 1]; ±1 only for an exact linear relationship.
- Cauchy–Schwarz: Cov(X, Y)² ≤ Var X · Var Y.
- Var(X + Y) = Var X + Var Y + 2 Cov(X, Y).
Worked example: GATE 2021: "there exist X, Y with Cov² > Var X · Var Y"
That is false by Cauchy–Schwarz. The scatter lab shows Cov² always at most Var X · Var Y, with equality when the points lie on a line (ρ = ±1).
Now play with it
- →Slide ρ to 1 and watch the points line up; Cov² then equals Var X · Var Y.
- →Open the "uncorrelated but not independent" table: Cov = 0, yet Y is a function of X.
Cauchy–Schwarz: (Cov(X, Y))² ≤ Var(X)·Var(Y), with equality only when Y is an exact linear function of X (ρ = ±1). That is why a statement like "Cov² > Var X · Var Y" can never hold (GATE 2021). Correlation ρ = Cov/(σ_X σ_Y) always lies in [−1, 1].
| P(X = i, Y = j) | Y = 0 | Y = 1 | Y = 2 | P(X = i) |
|---|---|---|---|---|
| X = 0 | 0.3333 | |||
| X = 1 | 0.3333 | |||
| X = 2 | 0.3333 | |||
| P(Y = j) | 0.3333 | 0.6667 | 0 | 1 |
✗ not independent: some cell differs from (row total) × (column total)
Independent ⇒ Cov = 0, but Cov = 0 does not imply independent (see the last example: Y = (X − 1)² is a function of X, yet the covariance is 0). Always Var(X + Y) = Var X + Var Y + 2Cov(X, Y).
Check yourself
Var X = 4, Var Y = 9, Cov(X, Y) = 5. Is this possible?
Exam notes (the dense version)
Cov(X, Y) = E[XY] − E[X]E[Y]. Independent ⇒ Cov = 0, but Cov = 0 does not imply independent. Correlation ρ = Cov/(σₓσᵧ) lies in [−1, 1]; the Cauchy–Schwarz inequality says Cov² ≤ Var X · Var Y, with equality only for an exact linear relationship. And Var(X + Y) = Var X + Var Y + 2 Cov(X, Y).
Previous year questions: Joint Distributions, Covariance & Conditional Expectation (2)
PYQs are grouped by topic, so this is the full set for Joint Distributions, Covariance & Conditional Expectation; try the ones that match this subtopic. Open all 2 on the topic page.