Analyst Dojo
Lesson 6 of 7 11–14% of the exam

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.

6 min cram, 26 min full read. Based on the 2027 CFA® Program Level I curriculum, Quantitative Methods, Learning Module 5. Sitting in November 2026? The 2026 version of this lesson is still available.

Tailor this to you: take the self-assessment

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.

Cram mode: the one-screen version of this lesson. Switch to Full for the explanations, worked examples and interactives.

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.

Covariance Memorize
σX,Y=∑i=1n(Xi−μX)(Yi−μY)n\sigma_{X,Y} = \frac{\sum_{i=1}^{n} (X_i - \mu_X)(Y_i - \mu_Y)}{n}

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 .

Sample covariance Use it
sX,Y=∑i=1n(Xi−Xˉ)(Yi−Yˉ)n−1s_{X,Y} = \frac{\sum_{i=1}^{n} (X_i - \bar{X})(Y_i - \bar{Y})}{n - 1}

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 coefficient Memorize
ρX,Y=σX,YσX σY\rho_{X,Y} = \frac{\sigma_{X,Y}}{\sigma_X\,\sigma_Y}

Correlation is read straight from the number.

ρWhat the scatter plot looks like
+1Points on an upward-sloping straight line: a perfect positive link
Close to +1A tight upward pattern: a strong positive link
0No straight-line pattern: no linear relationship
Close to −1A tight downward pattern: a strong inverse link
−1Points 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.

Rearrange itCorrelation: solve for ρ, the covariance or a standard deviation
The question asks for
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

On your calculator
  1. 0.0066÷(0.12×0.1)=
  1. 0.0066ENTER0.12ENTER0.1×÷

ENTER enter (on the HP, puts the number on the stack)

InteractiveDrag the points: what correlation sees, and what fools it

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.

04812Return on Y (%)04812Return on X (%)

Drag a point, or focus it and use the arrow keys.

  • Pair of returns
Correlation ρ0.85
Covariance σ_X,Y (÷ (n − 1))3.33 (%²)
Standard deviations σ_X · σ_Y2.16% · 1.83%
Pairs n4
Show
Covariance divisor
Divide the cross-products by
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.

ρ on your calculator (two-variable statistics, sample figures)
  1. 2NDDATA2NDCLR WORKclear old data
  2. 2ENTER↓1ENTER↓X01, Y01
  3. 4ENTER↓3ENTER↓X02, Y02
  4. 1+|-ENTER↓0ENTER↓X03, Y03
  5. 3ENTER↓4ENTER↓X04, Y04
  6. 2NDSTATpress 2ND SET until LIN shows
  7. ↓↓↓↓↓↓↓↓a = 0.5714 (intercept)
  8. ↓b = 0.7143 (slope)
  9. ↓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

  1. fCLEAR Σ
  2. 1ENTER2Σ+Y first, then X
  3. display1
  4. 3ENTER4Σ+Y first, then X
  5. display2
  6. 0ENTER1CHSΣ+Y first, then X
  7. display3
  8. 4ENTER3Σ+Y first, then X
  9. display4
  10. 0gŷ,rSTO7a = 0.5714 (intercept: ŷ at x = 0
  11. storeitinR7,sinceΣ+keepsnandthesumsinR1toR6)
  12. x≷yr = 0.8452
  13. 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

Correlation sees straight lines only, and one point can fool it.

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.

What a correlation cannot tell you
Correlation coefficient ρbetween −1 and +1, no units
  • 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
LimitationWhat happensExample
Nonlinear relationρ near 0 despite a strong relationAn option’s payoff against the share price around the strike
OutlierOne point creates or hides correlationA single crash month
Spurious correlationChance, a hidden third variable, or a shared divisorIce-cream sales and sunburn cases, both driven by summer
Not causationAssociation onlyA 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 plotMeaning
+1points on an upward lineperfect positive linear link
0no straight-line patternno linear link (curves possible)
−1points on a downward lineperfect negative linear link
Signsame as covariancenot 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 ρX,Y=σX,Y÷(σXσY)\rho_{X,Y} = \sigma_{X,Y} \div (\sigma_X \sigma_Y), so σX,Y=ρX,Y σXσY\sigma_{X,Y} = \rho_{X,Y}\,\sigma_X \sigma_Y. Covariance ÷ n (COVARIANCE.P) or ÷ (n − 1) (COVARIANCE.S); ρ is the same either way if the standard deviations use the same divisor.

What a correlation cannot tell you
Correlation coefficient ρbetween −1 and +1, no units
  • 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
Covariance Memorize
σX,Y=∑i=1n(Xi−μX)(Yi−μY)n\sigma_{X,Y} = \frac{\sum_{i=1}^{n} (X_i - \mu_X)(Y_i - \mu_Y)}{n}
Quick example

Cross-products of the deviations add to 10 over n = 4 pairs. 10 ÷ 4 = 2.50 (%²).

On your calculator
  1. 10÷4= 2.5
  1. 10ENTER4÷ 2.5

ENTER enter (on the HP, puts the number on the stack)

Sample covariance Use it
sX,Y=∑i=1n(Xi−Xˉ)(Yi−Yˉ)n−1s_{X,Y} = \frac{\sum_{i=1}^{n} (X_i - \bar{X})(Y_i - \bar{Y})}{n - 1}
Quick example

Cross-products of the deviations add to 10 over n = 4 pairs. 10 ÷ (4 − 1) = 3.33 (%²).

On your calculator
  1. 10÷(4−1)= 3.33
  1. 10ENTER4ENTER1−÷ 3.33

ENTER enter (on the HP, puts the number on the stack)

Correlation coefficient Memorize
ρX,Y=σX,YσX σY\rho_{X,Y} = \frac{\sigma_{X,Y}}{\sigma_X\,\sigma_Y}
Quick example

Covariance 0.0045, standard deviations 15% and 10%. ρ = 0.0045 ÷ (0.15 × 0.10) = 0.30.

On your calculator
  1. 0.0045÷(0.15×0.1)= 0.3
  1. 0.0045ENTER0.15ENTER0.1×÷ 0.3

ENTER enter (on the HP, puts the number on the stack)

How it is asked

  1. 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).

  2. 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.

  3. 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".

  4. 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.

  1. 1Two assets have a covariance of returns of 0.0024 and standard deviations of 8% and 5%. Their correlation is closest to:

  2. 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:

  3. 3Monthly sales of umbrellas and of taxi rides are highly correlated. This is most likely an example of:

  4. 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:

  5. 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:

  6. 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.
Covariance Memorize
σX,Y=∑i=1n(Xi−μX)(Yi−μY)n\sigma_{X,Y} = \frac{\sum_{i=1}^{n} (X_i - \mu_X)(Y_i - \mu_Y)}{n}
Quick example

Cross-products of the deviations add to 10 over n = 4 pairs. 10 ÷ 4 = 2.50 (%²).

On your calculator
  1. 10÷4= 2.5
  1. 10ENTER4÷ 2.5

ENTER enter (on the HP, puts the number on the stack)

Sample covariance Use it
sX,Y=∑i=1n(Xi−Xˉ)(Yi−Yˉ)n−1s_{X,Y} = \frac{\sum_{i=1}^{n} (X_i - \bar{X})(Y_i - \bar{Y})}{n - 1}
Quick example

Cross-products of the deviations add to 10 over n = 4 pairs. 10 ÷ (4 − 1) = 3.33 (%²).

On your calculator
  1. 10÷(4−1)= 3.33
  1. 10ENTER4ENTER1−÷ 3.33

ENTER enter (on the HP, puts the number on the stack)

Correlation coefficient Memorize
ρX,Y=σX,YσX σY\rho_{X,Y} = \frac{\sigma_{X,Y}}{\sigma_X\,\sigma_Y}
Quick example

Covariance 0.0045, standard deviations 15% and 10%. ρ = 0.0045 ÷ (0.15 × 0.10) = 0.30.

On your calculator
  1. 0.0045÷(0.15×0.1)= 0.3
  1. 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

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.

  1. Mean, median, mode and what outliers do to them
  2. Quartiles, percentiles and box plots
  3. Range, mean absolute deviation, variance and standard deviation
  4. Semi-deviation, downside deviation and the coefficient of variation
  5. Skewness and kurtosis
  6. Covariance and correlation
  7. Scaling volatility over time: data frequency and the root-of-time law

Ask Sensei Listen instead

Questions on Covariance and correlation

Learn with Sensei, out loud The voice tutor, in early access

Sensei teaches the lesson aloud and stops when you interrupt: "wait, why is the geometric mean lower?" It answers with the lesson's own example, then quizzes you by voice. Every account can try Sensei on one module, with one voice question.

USD 149 a month founding price (regular USD 199), kept for as long as you stay subscribed. Everything in Plus included.

In active development and improving every day. Send feedback · Plans and pricing

Analyst Dojo Plus

Your free review list holds 10 items.

Plus keeps everything you save, for USD 19 a month. To make room on the free plan, remove something from your review list.

See Plus

Lessons, checkpoints and the lesson questions in practice stay free. Compare plans