Covariance and correlation
Covariance measures how two variables move together, but its size depends on their units. Correlation divides it by both standard deviations: ρ = σ_{X,Y} ÷ (σ_X σ_Y), always between −1 and +1. It captures straight-line association only, outliers can distort it, and it never proves causation.
Watch the lesson 16 min
The video follows this page: the same examples, then the checkpoint questions.
Before this: Range, mean absolute deviation, variance and standard deviation
On the exam
- Calculate, interpret, and evaluate covariance and correlation
Calculate, interpret and evaluate covariance and correlation. Expect a correlation from a covariance and two standard deviations, a covariance from a few paired returns, the sign of a correlation, and a limitation to spot: nonlinearity, an outlier or a spurious link.
How deeply to learn each part
- Know the idea
- Understand it in general. It frames other topics, but you will not calculate with it.
- Use it
- Understand it well enough to solve a question with it. Recognize when it applies.
- Memorize
- Learn it by heart. The exam will not give it to you.
You know this one. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still do.
You tested strong here. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still know it.
How do you measure whether two returns move together?
Start with a picture. A scatter plot puts one variable on each axis, one dot per pair of observations. An upward drift means they tend to rise together, a downward drift means they move opposite ways, and a shapeless cloud means no clear pattern.
Covariance measures joint variability: it is the two-variable version of the variance. For each pair, multiply how far X is from its mean by how far Y is from its mean, then average.
With sample data, divide by n − 1 instead, for the same reason as the sample variance; that is what a spreadsheet’s COVARIANCE.S does (COVARIANCE.P divides by n). This is the sample covariance .
Covariance is positive when the variables tend to be above or below their means together, and negative when one is above while the other is below. Its size, though, depends on the units, so it cannot tell you how strong the link is.
In Excel and Google Sheets: COVARIANCE.P (divide by n), COVARIANCE.S (divide by n − 1) and CORREL.
How does correlation fix the size problem?
The correlation coefficient divides the covariance by the product of the two standard deviations. The units cancel, and the result lies between −1 and +1.
Correlation is read straight from the number.
| ρ | What the scatter plot looks like |
|---|---|
| +1 | Points on an upward-sloping straight line: a perfect positive link |
| Close to +1 | A tight upward pattern: a strong positive link |
| 0 | No straight-line pattern: no linear relationship |
| Close to −1 | A tight downward pattern: a strong inverse link |
| −1 | Points on a downward-sloping straight line: a perfect inverse link |
The sign of the correlation is the sign of the covariance, because the standard deviations below it are always positive. It has nothing to do with whether the mean returns are positive or negative: two shares that both lose money on average can still be positively correlated.
Often the exam hands you the covariance and the standard deviations instead.
Two assets have a covariance of returns of 0.0066 and standard deviations of 12.00% and 10.00%. Their correlation is closest to:
0.0066 ÷ (0.12 × 0.1) = 0.55
Correlation, ρ0.55
- 0.0066÷(0.12×0.1)=
- 0.0066ENTER0.12ENTER0.1×÷
ENTER enter (on the HP, puts the number on the stack)
Try this 0 of 3
- Load “One outlier” and drag the ringed point until ρ reaches 0.65 or more.
- Load the U-shape and show the straight line: ρ is about 0, yet Y clearly depends on X.
- Load “Shared divisor” and read ρ.
Worked example: 4 pairs, covariance 3.33 (%²), correlation ρ = 0.85, a strong positive straight-line relation. Correlation measures straight-line association only, and a single extreme point can change it.
Drag a point, or focus it and use the arrow keys.
- Pair of returns
Show working
Means: X̄ = 2.00, Ȳ = 2.00 (n = 4).
Deviations X: 0.00, 2.00, −3.00, 1.00; Y: −1.00, 1.00, −2.00, 2.00.
Cross-products: 0.00 + 2.00 + 6.00 + 2.00 = 10.00.
Covariance σ_X,Y = 10.00 ÷ (4 − 1) = 3.33 (÷ (n − 1), as COVARIANCE.S).
σ_X = √(14.00 ÷ (4 − 1)) = 2.1602; σ_Y = √(10.00 ÷ (4 − 1)) = 1.8257.
ρ = 3.33 ÷ (2.1602 × 1.8257) = 0.8452: a strong positive straight-line relation.
With ÷ n the covariance would be 2.50; ρ stays 0.85 because the standard deviations change by the same factor.
- 2NDDATA2NDCLR WORKclear old data
- 2ENTER↓1ENTER↓X01, Y01
- 4ENTER↓3ENTER↓X02, Y02
- 1+|-ENTER↓0ENTER↓X03, Y03
- 3ENTER↓4ENTER↓X04, Y04
- 2NDSTATpress 2ND SET until LIN shows
- ↓↓↓↓↓↓↓↓a = 0.5714 (intercept)
- ↓b = 0.7143 (slope)
- ↓r = 0.8452
2ND second function (the shifted label above a key) · DATA data worksheet · CLR WORK clear the worksheet · ENTER enter (on the HP, puts the number on the stack) · +|- change sign · STAT statistics worksheet
- fCLEAR Σ
- 1ENTER2Σ+Y first, then X
- display1
- 3ENTER4Σ+Y first, then X
- display2
- 0ENTER1CHSΣ+Y first, then X
- display3
- 4ENTER3Σ+Y first, then X
- display4
- 0gŷ,rSTO7a = 0.5714 (intercept: ŷ at x = 0
- storeitinR7,sinceΣ+keepsnandthesumsinR1toR6)
- x≷yr = 0.8452
- 1gŷ,rRCL7−b = 0.7143 (slope: ŷ at x = 1 minus ŷ at x = 0)
f gold shift key · CLEAR Σ clear the statistics registers · ENTER enter (on the HP, puts the number on the stack) · Σ+ add a data point · CHS change sign · g blue shift key · ŷ,r estimated y and correlation · STO store · x≷y swap the last two numbers · RCL recall a stored number
Display: b₀ 0.5714, b₁ 0.7143, r 0.8452
Drag a point and watch ρ and the covariance. Try the U-shape preset, then the One outlier preset.
Exam tip Rearranged, covariance = ρ × σ_X × σ_Y. Keep standard deviations as decimals (12% is 0.12) when the covariance is a decimal.
How closely does an asset track the market?
Know the idea
Take the asset’s excess returns (its return minus the risk-free rate) and the benchmark index’s excess returns, and correlate them. This is the excess-return correlation . A high positive correlation means the asset moves closely with the market once the risk-free return is set aside. If the risk-free rate barely changes, the answer is almost the same as for raw returns, because subtracting a constant does not change a correlation. The sensitivity behind this link becomes beta, estimated with a regression in Learning Module 10; correlation also drives portfolio risk in Learning Module 8.
What are the limits of correlation?
A correlation is a summary of a straight-line pattern. Before relying on it, check four things.
- Reading ρ Memorize +1 upward line, −1 downward line, 0 no linear pattern; sign = sign of covariance
- Limitations Use it check these before trusting ρ
- Linear only a strong curve can give ρ near 0
- Outliers one point can create or hide correlation
- Spurious correlation chance, a common third variable, or a shared divisor
- Not causation association says nothing about cause
-
| Limitation | What happens | Example |
|---|---|---|
| Nonlinear relation | ρ near 0 despite a strong relation | An option’s payoff against the share price around the strike |
| Outlier | One point creates or hides correlation | A single crash month |
| Spurious correlation | Chance, a hidden third variable, or a shared divisor | Ice-cream sales and sunburn cases, both driven by summer |
| Not causation | Association only | A high ρ never shows which variable moves the other |
A spurious correlation is the appearance of a relationship that is not there, or is not direct. It arises three ways: by chance in a particular data set; because both variables respond to a third one; or because two unrelated series were both multiplied or divided by the same third series, especially one that is much more volatile than either. An example of the third: two small companies’ unrelated monthly outputs, each divided by the same highly volatile commodity price, will look correlated.
Do not build a strategy on a high correlation alone. Outliers can also create or hide a correlation; trimming or winsorizing the data can help, but deciding whether an extreme point carries information takes judgment.
Go deeper Why covariance has such awkward units
Covariance multiplies two deviations, so for two return series its unit is percent times percent, or %². That is why a covariance of 0.0066 tells you nothing until you set it against the two standard deviations. It is also why you should never compare covariances across asset pairs with different volatilities: a bigger covariance may only mean the assets are more volatile.
Go deeper Same summary, different pictures
Data sets can share the same means, standard deviations and correlation yet look completely different on a chart; a famous constructed example is Anscombe’s quartet. Summary statistics never replace a plot.
Go deeper Where this goes next
Correlation is the input that makes diversification work: the lower the correlation between assets, the more portfolio risk falls (Learning Module 8). Whether a sample correlation differs from zero is a hypothesis test (Learning Module 7), and the square of the correlation between two variables is the R² of a simple regression (Learning Module 10).
Memorize this
MemorizeCorrelation at a glance
| ρ | Scatter plot | Meaning |
|---|---|---|
| +1 | points on an upward line | perfect positive linear link |
| 0 | no straight-line pattern | no linear link (curves possible) |
| −1 | points on a downward line | perfect negative linear link |
| Sign | same as covariance | not set by the mean returns |
Memory hook Correlation is covariance with the units divided out: that is why it is stuck between −1 and +1.
Know it cold , so . Covariance ÷ n (COVARIANCE.P) or ÷ (n − 1) (COVARIANCE.S); ρ is the same either way if the standard deviations use the same divisor.
- Reading ρ Memorize +1 upward line, −1 downward line, 0 no linear pattern; sign = sign of covariance
- Limitations Use it check these before trusting ρ
- Linear only a strong curve can give ρ near 0
- Outliers one point can create or hide correlation
- Spurious correlation chance, a common third variable, or a shared divisor
- Not causation association says nothing about cause
-
Quick example
Cross-products of the deviations add to 10 over n = 4 pairs. 10 ÷ 4 = 2.50 (%²).
- 10÷4= 2.5
- 10ENTER4÷ 2.5
ENTER enter (on the HP, puts the number on the stack)
Quick example
Cross-products of the deviations add to 10 over n = 4 pairs. 10 ÷ (4 − 1) = 3.33 (%²).
- 10÷(4−1)= 3.33
- 10ENTER4ENTER1−÷ 3.33
ENTER enter (on the HP, puts the number on the stack)
Quick example
Covariance 0.0045, standard deviations 15% and 10%. ρ = 0.0045 ÷ (0.15 × 0.10) = 0.30.
- 0.0045÷(0.15×0.1)= 0.3
- 0.0045ENTER0.15ENTER0.1×÷ 0.3
ENTER enter (on the HP, puts the number on the stack)
How it is asked
-
Correlation from covariance
Covariance 0.0066, standard deviations 12% and 10%. Correlation?
0.0066 ÷ (0.12 × 0.10) = 0.55. Traps: 0.46 (÷ variance of X), 0.03 (÷ sum of the standard deviations).
-
Covariance from paired returns
X 3, 7, 8; Y 3, 2, 7. Covariance dividing by n?
Cross-products 3, −2, 6 = 7; 7 ÷ 3 = 2.33. Trap: 3.50 (÷ n − 1) when the question says n.
-
U-shaped scatter with ρ near 0
A clear U-shape in the scatter plot, correlation 0.02. Conclusion?
Any relationship is not linear. Not "unrelated".
-
Two series that rise together for no reason
Umbrella sales and taxi rides are highly correlated.
Spurious correlation, driven by a third variable (rain). Not causation.
Exam traps
- Reading ρ = 0 as 'no relationship' rather than 'no linear relationship'.
- Inferring causation from a high correlation.
- Comparing covariances across pairs of assets with different volatilities. Compare correlations instead.
- Forgetting that one outlier can swing ρ from near 0 to high.
- Taking the sign of a correlation from the mean returns. It follows the covariance.
- Dividing a covariance by the wrong pair, giving |ρ| above 1. A correlation outside −1 to +1 is impossible, so recheck.
Checkpoint
6 exam-style questions. About 90 seconds each.
1Two assets have a covariance of returns of 0.0024 and standard deviations of 8% and 5%. Their correlation is closest to:
2A scatter plot shows a clear U-shaped pattern between two variables and a correlation of 0.02. The analyst should most appropriately conclude that:
3Monthly sales of umbrellas and of taxi rides are highly correlated. This is most likely an example of:
4An analyst finds that adding a single extreme month to a data set raises the correlation between two return series from 0.1 to 0.7. The analyst should most appropriately conclude that:
5Stock K's monthly returns have averaged −0.8% and Stock L's +1.1%. In months when K's return is above its own average, L's return is usually above its own average too. The correlation between their returns is most likely:
6Over three months, Asset X returns 2%, 6% and 4% and Asset Y returns 1%, 5% and 6%. Dividing by the number of observations, the covariance of their returns (in %²) is closest to:
Key takeaways
- ρ = σ_{X,Y} ÷ (σ_X σ_Y), between −1 and +1, with no units; its sign is the covariance's sign.
- Correlation measures linear association only.
- Outliers, nonlinearity and hidden variables can mislead.
- Correlation is not causation.
Quick example
Cross-products of the deviations add to 10 over n = 4 pairs. 10 ÷ 4 = 2.50 (%²).
- 10÷4= 2.5
- 10ENTER4÷ 2.5
ENTER enter (on the HP, puts the number on the stack)
Quick example
Cross-products of the deviations add to 10 over n = 4 pairs. 10 ÷ (4 − 1) = 3.33 (%²).
- 10÷(4−1)= 3.33
- 10ENTER4ENTER1−÷ 3.33
ENTER enter (on the HP, puts the number on the stack)
Quick example
Covariance 0.0045, standard deviations 15% and 10%. ρ = 0.0045 ÷ (0.15 × 0.10) = 0.30.
- 0.0045÷(0.15×0.1)= 0.3
- 0.0045ENTER0.15ENTER0.1×÷ 0.3
ENTER enter (on the HP, puts the number on the stack)
All Quantitative Methods formulas, every lesson
Practice exam-style questions on Statistical Characteristics of Asset Returns
Questions about this lesson?
Where this comes back
- Portfolio Return and Risk Quantitative Methods
- Estimation and Hypothesis Testing Quantitative Methods
- Simple Linear Regression in Finance Quantitative Methods
Questions candidates ask
What is the difference between covariance and correlation?
Both show whether two variables move together (joint variability). Covariance is in the product of their units (%² for two returns), so its size is hard to interpret. Correlation, ρ, divides covariance by the two standard deviations, so it is unit-free and always between −1 and +1.
Does zero correlation mean no relationship?
No. It means no linear relationship. Two variables can have a strong curved relationship, such as a U-shape, and still show a correlation near zero. Look at a scatter plot as well as the number.
What is spurious correlation?
A correlation that appears by chance, because both variables respond to a hidden third variable, or because two unrelated series were divided by the same volatile series. Ice-cream sales and sunburn cases both rise in summer. They are correlated, but neither causes the other. A high correlation alone never proves a causal link.
Can two stocks with negative average returns be positively correlated?
Yes. Correlation looks at how each return moves around its own average, not at the averages themselves. If both stocks tend to be above their averages in the same months, the covariance and the correlation are positive, whatever the sign of the means.
Spotted an error? Tell us and we will fix it.