Two variables: covariance, correlation, portfolios
- Read it, not yetReach the end of the page
- Practice it, not yetAnswer a few questions
- Master it, not yet80% on a drill of 8 or more
Covariance asks whether two things move together. Correlation rescales it from −1 to +1. Mix two assets and any correlation below +1 lowers the mix's risk. That is diversification.
Why it matters
Correlation asks one thing: when this goes up, does that tend to go up too?
It is how you diversify, and how you get fooled: ice cream sales and drownings rise together because of summer.
- InvestingMixing assets that don't move together cuts risk without cutting the average return.
- MarketingAd spend and sales rising together doesn't prove the ads worked.
- Data workTwo columns correlated near 1 tell you the same thing twice.
Finance example
Asset A: E = 8%, σ = 6%. Asset B: E = 10.8%, σ = 8.4%. Covariance 12.6, so ρ = 12.6 / (6 × 8.4) = 0.25. A 50/50 mix returns 9.4% with σ = 5.74%, below either asset alone.
Two-asset portfolio: drag the weight and the correlation
Asset A: E 8%, σ 6%. Asset B: E 10.8%, σ 8.4%. Your mix: E = 9.40%, σ = 5.74%. Because ρ is below 1, the curve dips below both assets. That dip is diversification.
Check yourself
Cov(X, Y) > 0 means?
They tend to move in the same directionCov = 0: are they independent?
Not necessarily. Y = X² can have zero covariance and total dependence.Zero covariance rules out only a straight-line link.ρ = −1 means?
A perfect negative straight-line relationship
The trap
The mistake people make most on this one.
Independent means Cov = 0, but Cov = 0 does not mean independent. Y = X² is the classic catch.
Formulas
5 formulas and a way to remember them.
- Covariance
- Cov(X, Y) = ΣΣ (x − μx)(y − μy) P(x, y) = ΣΣ xy P(x, y) − μx μy
- Correlation
- ρ = Cov(X, Y) / (σx σy), between −1 and 1
- Portfolio mean
- E(bX + cY) = b · E(X) + c · E(Y)
- Portfolio variance
- V(bX + cY) = b²V(X) + c²V(Y) + 2bc · Cov(X, Y)
- If independent
- V(bX + cY) = b²V(X) + c²V(Y)
- Remember it
- Correlation is why you don't put all your eggs in one basket. The covariance term is where the two talk.
Watch and go deeper
3 free videos and pages.
- StatQuest: Covariance, Clearly ExplainedWhat covariance measures, how it is computed, and why its size is hard to read on its own. About 22 minutes.
- StatQuest: Pearson's Correlation, Clearly ExplainedHow correlation rescales covariance to a number between minus 1 and 1, and what it does not tell you. About 19 minutes.
- R Psychologist: Interpreting CorrelationsDrag the correlation slider and watch the scatter tighten and loosen. About 5 minutes.