Know these first
- M-A08: Summation notation
- M-D01: Estimating mean and volatility
By the end you will be able to
- 1Read covariance as a measure of whether two quantities move together, and calculate it from a small table.
- 2Explain why the size of a covariance depends on its units.
- 3Calculate a correlation, read it between −1 and 1, and match it to a scatter plot.
- 4Explain why correlation is not causation and only measures straight-line co-movement.
Why you need it
The variance tells you how much one thing moves. The next question is: when it moves, does something else move with it? Covariance and correlation answer that.
These Core Path lessons use them:
L2.5.03: Correlation and diversification
Correlation between two returns decides how much holding both reduces the overall swings.
L2.6.02: Hedging with forwards and futures
How well one position offsets another depends on how closely the two move together.
The idea
Do they move together?
Put two returns side by side, month by month, and ask a simple question each month: was each one above or below its own average? Draw a rectangle from the average point to each month's point. If both were above average, or both below, the rectangle counts as positive (green). If one was up while the other was down, it counts as negative (red).
Rectangles from the average
8 months, returns in % (illustrative)Two returns that…
Month 1
All 8 months
Add up the signed areas and take a kind of average: that is the covariance. Lots of green means the two tend to move together; lots of red means they tend to move apart; a mix that cancels out means no clear tendency.
The rules
Covariance. Each rectangle's area is the product of two deviations from the mean.
The units problem, and correlation. A covariance of 3.25 sounds bigger than one of 0.000325, yet they describe exactly the same data. Dividing by the two standard deviations gives a measure on a fixed scale: the correlation.
Here is what different correlations look like on a scatter plot (80 points each).
What correlation does not tell you
Correlation is not causation. Ice-cream sales and sunburn cases rise and fall together through the year, but neither causes the other: sunny weather drives both. A high correlation says two things move together, not why.
It only sees straight lines. Correlation measures linear co-movement. Two quantities can be tightly linked in a curved way and still have a correlation of 0 (worked example 3). Dependence that correlation misses, such as things that only move together in extreme moments, comes later in the course.
The rules, for reference
Try it
Slide the correlation from −1 to 1 and watch the cloud tilt and tighten. Then change the spread of Y, and switch the units: which readout moves, and which stays put?
Try itCorrelation explorer
Regression and correlation calculator →Units
Switch the units: the covariance changes by a factor of 10,000, the correlation stays put. Widen Y: the covariance grows, the correlation does not.
Worked examples
1. Covariance and correlation by hand
Step 1 of 6- 1
The set-up
Two shares returned, in % over five months (illustrative): X = 2, -1, 3, -2, 3 and Y = 1, -1, 2, 0, 3.
2. From correlation back to covariance
Step 1 of 3- 1
The set-up
A model says X has a standard deviation of 20%, Y of 10%, and their correlation is 0.3. What is their covariance?
3. A perfect link with zero correlation
Step 1 of 3- 1
The set-up
Let x = -2, -1, 0, 1, 2 and y = x², so y = 4, 1, 0, 1, 4. Knowing x tells you y exactly.
y = x²
Common mistakes
Each line below is a tempting slip. Spot what is wrong, then check.
Reaction
Check what stuck
Question 1 · objective 3
Cov(X, Y) = 0.006, X has standard deviation 0.2 and Y has 0.1. What is the correlation ρ?
Question 2 · objective 3
On a scatter plot every point sits exactly on a straight line that falls from left to right. What is ρ?
Question 3 · objective 1
Work out the sample covariance (divide by n − 1) of x = 1, 2, 3 and y = 2, 4, 7.
Question 4 · objective 2
You rewrite two return series from percent (1.5) to decimals (0.015). What happens?
Question 5 · objective 4
Two quantities have correlation 0. What can you conclude?
Glossary
- Deviation
- How far a value is from its mean: positive above the mean, negative below.
- Covariance
- The average of the product of two deviations from the mean. Positive when two quantities tend to move together, negative when they tend to move apart.
- Correlation (ρ)
- The covariance divided by both standard deviations: a number between −1 and 1 with no units, written ρ (rho).
- Scatter plot
- A chart with one dot for each pair of values: the first value across, the second up.
- Linear
- Following a straight line: when one goes up by a step, the other goes up (or down) by a fixed amount.
- Causation
- One thing making another happen. Correlation alone cannot show it.