Analyst Dojo
Lesson 2 of 3 6–9% of the exam

You are reading the 2026 curriculum (exams up to November 2026). Sitting in February 2027 or later? Go to the 2027 Quantitative Methods guide.

Covariance and correlation from a joint probability table

List each scenario's probability and the two returns in it. Find each asset's expected return, then weight each scenario's product of deviations by its probability and add: that is the covariance. Divide by both standard deviations for the correlation. If the returns are independent, the covariance is zero.

6 min cram, 30 min full read. Based on the 2026 CFA® Program Level I curriculum, Quantitative Methods, Learning Module 5. This is the 2026 version of the lesson. Sitting in February 2027 or later? Read the updated 2027 version.

Tailor this to you: take the self-assessment

Before this: Portfolio expected return, variance and the role of correlation, Expected value, variance and standard deviation of a forecast

On the exam

  • Calculate and interpret the covariance and correlation of portfolio returns using a joint probability function for returns

Calculate and interpret the covariance and correlation of returns using a joint probability function. Expect a three-scenario table where equal-weighting the states or skipping the deviations are answer options, and a question on what independence implies.

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.

What is a joint probability function?

A joint probability function gives the probability that two random variables take particular values at the same time. In finance it usually looks like a short scenario analysis : a handful of states of the world, each with a probability and a return for each asset. When you have forecasts rather than history, this table is the raw material for covariance and correlation.

Here is the running example. Two assets face three states of the economy.

StateProbabilityR_AR_B
Strong0.2518%4%
Steady0.456%10%
Weak0.30−4%0%

How do you find the covariance from the table?

Work in four steps: expected returns, deviations, probability-weighted products, then add.

Expected return from scenarios Memorize
E(R)=∑iP(si) RiE(R) = \sum_{i} P(s_i)\, R_i
Covariance from a joint probability table Memorize
Cov(RA,RB)=∑iP(si) [RA,i−E(RA)][RB,i−E(RB)]\mathrm{Cov}(R_A, R_B) = \sum_{i} P(s_i)\,\big[R_{A,i} - E(R_A)\big]\big[R_{B,i} - E(R_B)\big]

Two shortcuts help here. A state in which either deviation is zero adds zero, and the identity below avoids deviations altogether.

Covariance shortcut Use it
Cov(RA,RB)=E(RARB)−E(RA) E(RB)\mathrm{Cov}(R_A, R_B) = E(R_A R_B) - E(R_A)\,E(R_B)
Rearrange itCovariance shortcut: solve for the covariance or the expected product
The question asks for
The expected product of two assets' returns is 45 (%²). Their expected returns are 6% and 5.5%. The covariance (%²) is closest to:

45 − 6 × 5.5 = 12

Covariance (%²)12

On your calculator
  1. 45−(6×5.5)=
  1. 45ENTER6ENTER5.5×−

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

InteractiveCovariance from scenarios: a vote of the quadrants

Try this 0 of 3

  • Change one return so the covariance turns negative
  • Double all three of B's returns and compare Cov and ρ
  • Switch to independent returns and compare E(R_A R_B) with E(R_A) × E(R_B)
++−−−10%0%10%20%30%−5%0%5%10%15%Return on ABE(R_A) 6.00%E(R_B) 5.50%Strong−4.50Steady0.00Weak+16.50

Bubble area is the state's probability. The dashed cross-hairs sit at the two expected returns; each label shows the state's vote, P × (deviation of A) × (deviation of B).

E(R_A)6.00%
E(R_B)5.50%
Covariance (%²)12.00
σ_A8.12%
σ_B4.33%
Correlation, ρ0.34

The "+" quadrants vote 16.50 and the "−" quadrants −4.50, so the covariance is 12.00 (%²): the returns tend to move together. Correlation 0.34.

Show working

E(R_A) = 0.25 × 18 + 0.45 × 6 + 0.3 × (−4) = 6.00%.

E(R_B) = 0.25 × 4 + 0.45 × 10 + 0.3 × 0 = 5.50%.

Deviations of A: 12, 0, −10. Deviations of B: −1.5, 4.5, −5.5.

Cov = Σ P × (R_A − E(R_A)) × (R_B − E(R_B)) = 0.25 × 12 × (−1.5) + 0.45 × 0 × 4.5 + 0.3 × (−10) × (−5.5) = (−4.5) + 0 + 16.5 = 12.00 (%²).

Check with the short cut: E(R_A R_B) = 0.25 × 72 + 0.45 × 60 + 0.3 × 0 = 45.00; 45.00 − 6.00 × 5.50 = 12.00.

σ_A = √(0.25 × 12² + 0.45 × 0² + 0.3 × (−10)²) = √66.00 = 8.12%; σ_B = √18.75 = 4.33%.

ρ = Cov ÷ (σ_A × σ_B) = 12.00 ÷ (8.12 × 4.33) = 0.34.

Covariance and correlation on your calculator
  1. (0.25×12×1.5+|-)+(0.45×0×4.5)+(0.3×10+|-×5.5+|-)=STO112.00, the covariance (%²)
  2. (0.25×12x²)+(0.45×0x²)+(0.3×10+|-x²)=√xSTO28.12, σ of A
  3. (0.25×1.5+|-x²)+(0.45×4.5x²)+(0.3×5.5+|-x²)=√xSTO34.33, σ of B
  4. RCL1÷RCL2÷RCL3=0.3411, the correlation

+|- change sign · STO store · x² square · √x square root · RCL recall a stored number

  1. 0.25ENTER12×1.5CHS×0.45ENTER0×4.5×+0.3ENTER10CHS×5.5CHS×+STO112.00, the covariance (%²)
  2. 0.25ENTER12ENTER××0.45ENTER0ENTER××+0.3ENTER10CHSENTER××+g√xSTO28.12, σ of A
  3. 0.25ENTER1.5CHSENTER××0.45ENTER4.5ENTER××+0.3ENTER5.5CHSENTER××+g√xSTO34.33, σ of B
  4. RCL1RCL2÷RCL3÷0.3411, the correlation

ENTER enter (on the HP, puts the number on the stack) · CHS change sign · STO store · g blue shift key · √x square root · RCL recall a stored number

Neither calculator's statistics mode takes probability-weighted pairs, so the sums are built term by term. Work in percent throughout: the covariance comes out in %², and ρ has no units.

The covariance is a probability-weighted vote of the quadrants.

Change a return and watch where each state sits relative to the cross-hairs at the two expected returns. Top right and bottom left add to the covariance, the other two corners subtract from it, and a bigger probability means a bigger bubble and a bigger vote.

How do you turn the covariance into a correlation?

Covariance on its own tells you only the direction. Divide by both standard deviations to get a strength between −1 and +1. The standard deviations come from the same table: weight each squared deviation by its probability, with no n − 1.

Correlation from scenario returns Memorize
ρAB=Cov(RA,RB)σA σB\rho_{AB} = \frac{\mathrm{Cov}(R_A, R_B)}{\sigma_A\,\sigma_B}
From a scenario table to correlation
Joint table: probability, R_A and R_B in each stateprobabilities add to 1; no n − 1
  • 1. Expected returns Memorize E(R_A) = Σ P × R_A and E(R_B) = Σ P × R_B
  • 2. Covariance Memorize Σ P × (R_A − E_A) × (R_B − E_B)
    • Shortcut E(R_A R_B) − E(R_A) E(R_B)
  • 3. Standard deviations Use it √ of Σ P × (R − E)²
  • 4. Correlation Memorize Cov ÷ (σ_A σ_B), between −1 and +1

Exam tip The positive covariance 12.0 looks large, yet the correlation is only 0.34. Always convert to correlation before judging strength.

What if the joint table is a grid?

Sometimes the joint probabilities come as a grid, with A’s possible returns down the side and B’s across the top. Each cell holds the probability that both happen together. The formula is unchanged: take every cell with a non-zero probability, treat it as a scenario, and sum.

P(R_A, R_B)R_B = 12%R_B = 5%R_B = −2%
R_A = 18%0.250.050
R_A = 7%0.050.400
R_A = −4%00.050.20

What changes when returns are independent?

Two random variables are independent random variables when the joint probability of any pair of outcomes is the product of the separate probabilities.

Independence Use it
P(X,Y)=P(X) P(Y)P(X, Y) = P(X)\,P(Y)

Suppose X has a 0.4 chance of “up” and Y has a 0.5 chance, and they are independent. Every joint cell is the product of its row and column totals.

P(X, Y)Y up (0.5)Y down (0.5)Total
X up (0.4)0.200.200.40
X down (0.6)0.300.300.60
Total0.500.501.00

With a table like this, the expected product splits too, and the covariance collapses to zero:

Expected product of uncorrelated returns Use it
E(XY)=E(X) E(Y)if X,Y are uncorrelatedE(XY) = E(X)\,E(Y) \quad \text{if } X, Y \text{ are uncorrelated}

Many financial quantities are products of random variables. Revenue is price times quantity: if expected price is 20 and expected quantity is 300 and the two are uncorrelated, expected revenue is 20 × 300 = 6,000. The rule is for uncorrelated returns in the sense of zero covariance, and independent variables satisfy it automatically.

Independent, uncorrelated and dependent
Two random returnscovariance only sees straight-line links
  • Independent Use it P(X, Y) = P(X) P(Y); knowing one tells you nothing about the other
    • Implies covariance 0, correlation 0, E(XY) = E(X)E(Y)
  • Uncorrelated Use it covariance 0 but a nonlinear link may remain
  • Positive covariance Memorize returns tend to sit on the same side of their means
  • Negative covariance Memorize one tends to be above while the other is below
Go deeper Zero covariance does not imply independence

Let X be −1, 0 or +1, each with probability 1/3, and let Y = X². Then Y is completely determined by X, so the two are certainly not independent. But E(X) = 0 and E(XY) = E(X³) = (−1 + 0 + 1) ÷ 3 = 0, so Cov(X, Y) = 0 − 0 × E(Y) = 0.

Covariance and correlation only detect straight-line association. Independence is the stronger property, which is why independent variables are always uncorrelated but uncorrelated variables are not always independent.

Go deeper Where scenario tables are used

An analyst builds a table like this by choosing a few states of the world, assigning probabilities and forecasting each asset’s return in each state. The same layout supports stress testing, where one state is made deliberately extreme. Because the probabilities are forecasts, the covariance is forward-looking, and there is no n − 1 anywhere. A sample covariance from historical data, in contrast, divides by n − 1.

Memorize this

MemorizeReading the signs of the products

R_A vs meanR_B vs meanProductPushes covariance
aboveabove+up
belowbelow+up
abovebelow−down
belowabove−down

Memory hook Each scenario casts a vote: same side of the means is a plus, opposite sides a minus, and the probability is the size of the vote.

Know it cold Cov=∑P×devA×devB\mathrm{Cov} = \sum P \times \text{dev}_A \times \text{dev}_B, or E(RARB)−E(RA)E(RB)E(R_AR_B) - E(R_A)E(R_B). Independent: P(X,Y)=P(X)P(Y)P(X,Y) = P(X)P(Y) and Cov = 0.

From a scenario table to correlation
Joint table: probability, R_A and R_B in each stateprobabilities add to 1; no n − 1
  • 1. Expected returns Memorize E(R_A) = Σ P × R_A and E(R_B) = Σ P × R_B
  • 2. Covariance Memorize Σ P × (R_A − E_A) × (R_B − E_B)
    • Shortcut E(R_A R_B) − E(R_A) E(R_B)
  • 3. Standard deviations Use it √ of Σ P × (R − E)²
  • 4. Correlation Memorize Cov ÷ (σ_A σ_B), between −1 and +1
Independent, uncorrelated and dependent
Two random returnscovariance only sees straight-line links
  • Independent Use it P(X, Y) = P(X) P(Y); knowing one tells you nothing about the other
    • Implies covariance 0, correlation 0, E(XY) = E(X)E(Y)
  • Uncorrelated Use it covariance 0 but a nonlinear link may remain
  • Positive covariance Memorize returns tend to sit on the same side of their means
  • Negative covariance Memorize one tends to be above while the other is below
Expected return from scenarios Memorize
E(R)=∑iP(si) RiE(R) = \sum_{i} P(s_i)\, R_i
Quick example

Probabilities 0.25, 0.50, 0.25 with returns 12%, 6% and −4%. 0.25 × 12 + 0.50 × 6 + 0.25 × (−4) = 3 + 3 − 1 = 5%.

On your calculator
  1. 0.25×12+(0.5×6)+(0.25×4+|-)= 5

+|- change sign

  1. 0.25ENTER12×0.5ENTER6×+0.25ENTER4CHS×+ 5

ENTER enter (on the HP, puts the number on the stack) · CHS change sign

Covariance from a joint probability table Memorize
Cov(RA,RB)=∑iP(si) [RA,i−E(RA)][RB,i−E(RB)]\mathrm{Cov}(R_A, R_B) = \sum_{i} P(s_i)\,\big[R_{A,i} - E(R_A)\big]\big[R_{B,i} - E(R_B)\big]
Quick example

Two states with probabilities 0.6 and 0.4. A returns 10% and −5% (mean 4%); B returns 6% and 2% (mean 4.4%). 0.6 × (6)(1.6) + 0.4 × (−9)(−2.4) = 5.76 + 8.64 = 14.4 (%²).

On your calculator
  1. 0.6×(10−4)×(6−4.4)+(0.4×(5+|-−4)×(2−4.4))= 14.4

+|- change sign

  1. 10ENTER4−6ENTER4.4−×0.6×5CHSENTER4−2ENTER4.4−×0.4×+ 14.4

ENTER enter (on the HP, puts the number on the stack) · CHS change sign

Covariance shortcut Use it
Cov(RA,RB)=E(RARB)−E(RA) E(RB)\mathrm{Cov}(R_A, R_B) = E(R_A R_B) - E(R_A)\,E(R_B)
Quick example

Same two states. E(R_A R_B) = 0.6 × 60 + 0.4 × (−10) = 32. Cov = 32 − 4 × 4.4 = 14.4 (%²).

On your calculator
  1. 0.6×60+(0.4×10+|-)=−(4×4.4)= 14.4

+|- change sign

  1. 0.6ENTER60×0.4ENTER10CHS×+4ENTER4.4×− 14.4

ENTER enter (on the HP, puts the number on the stack) · CHS change sign

Correlation from scenario returns Memorize
ρAB=Cov(RA,RB)σA σB\rho_{AB} = \frac{\mathrm{Cov}(R_A, R_B)}{\sigma_A\,\sigma_B}
Quick example

Covariance −12, standard deviations 6% and 4%. −12 ÷ (6 × 4) = −0.50.

On your calculator
  1. 12+|-÷(6×4)= -0.5

+|- change sign

  1. 12CHSENTER6ENTER4×÷ -0.5

CHS change sign · ENTER enter (on the HP, puts the number on the stack)

Independence Use it
P(X,Y)=P(X) P(Y)P(X, Y) = P(X)\,P(Y)
Quick example

P(X = 1) = 0.40 and P(Y = 1) = 0.25, with X and Y independent. P(X = 1 and Y = 1) = 0.40 × 0.25 = 0.10.

On your calculator
  1. 0.4×0.25= 0.1
  1. 0.4ENTER0.25× 0.1

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

Expected product of uncorrelated returns Use it
E(XY)=E(X) E(Y)if X,Y are uncorrelatedE(XY) = E(X)\,E(Y) \quad \text{if } X, Y \text{ are uncorrelated}
Quick example

Revenue is price times quantity. If expected price is 20 and expected quantity is 300 and they are uncorrelated, expected revenue is 20 × 300 = 6,000.

On your calculator
  1. 20×300= 6000
  1. 20ENTER300× 6000

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

How it is asked

  1. Covariance from a three-state table

    Probabilities 0.2, 0.5, 0.3. A: 12%, 7%, −2%. B: −4%, 3%, 8%. Covariance?

    E(A) = 5.3, E(B) = 3.1. Weight each product of deviations: −20.33. Traps: −27.84 (equal weights), −3.90 (no deviations).

  2. Independent returns

    Two assets have independent returns. Their covariance is?

    Zero, and so is the correlation.

  3. Joint probability when independent

    P(X = 1) = 0.40, P(Y = 1) = 0.25, independent. P(both)?

    0.40 × 0.25 = 0.10. Traps: 0.65 (sum), 0.15 (difference).

  4. What does the sign tell you?

    The covariance from a joint table is negative. Meaning?

    Returns tend to be on opposite sides of their means. Says nothing about strength.

Exam traps

  • Equal-weighting the states instead of using their probabilities.
  • Forgetting to subtract the expected returns, that is, using E(R_A R_B) alone.
  • Dividing by n − 1 as if the states were a sample. A forecast uses probabilities.
  • Reading a negative or small covariance as 'weak'. The sign gives the direction; only correlation gives the strength.
  • Assuming zero covariance means independence. Independence implies zero covariance, not the reverse.

Checkpoint

5 exam-style questions. About 90 seconds each.

  1. 1Three states have probabilities 0.2, 0.5 and 0.3. Asset A returns 12%, 7% and −2%; asset B returns −4%, 3% and 8%. The covariance of the returns (in %²) is closest to:

  2. 2If the returns on two assets are independent, their covariance is:

  3. 3The sign of a covariance computed from a joint probability table most likely tells the analyst:

  4. 4In the same three-state table (probabilities 0.2, 0.5, 0.3; expected returns 5.3% and 3.1%; covariance −20.33 %²), the standard deviations are 5.139% for A and 4.158% for B. The correlation of the returns is closest to:

  5. 5The returns on two assets are independent. The probability that asset X has a good year is 0.40 and the probability that asset Y has a good year is 0.25. The probability that both have a good year is closest to:

Key takeaways

  • Cov = Σ P × (deviation of A) × (deviation of B), summed over the scenarios.
  • Or: Cov = E(R_A R_B) − E(R_A) E(R_B).
  • Correlation = Cov ÷ (σ_A σ_B), between −1 and +1.
  • Independent returns have zero covariance and zero correlation.
Expected return from scenarios Memorize
E(R)=∑iP(si) RiE(R) = \sum_{i} P(s_i)\, R_i
Quick example

Probabilities 0.25, 0.50, 0.25 with returns 12%, 6% and −4%. 0.25 × 12 + 0.50 × 6 + 0.25 × (−4) = 3 + 3 − 1 = 5%.

On your calculator
  1. 0.25×12+(0.5×6)+(0.25×4+|-)= 5

+|- change sign

  1. 0.25ENTER12×0.5ENTER6×+0.25ENTER4CHS×+ 5

ENTER enter (on the HP, puts the number on the stack) · CHS change sign

Covariance from a joint probability table Memorize
Cov(RA,RB)=∑iP(si) [RA,i−E(RA)][RB,i−E(RB)]\mathrm{Cov}(R_A, R_B) = \sum_{i} P(s_i)\,\big[R_{A,i} - E(R_A)\big]\big[R_{B,i} - E(R_B)\big]
Quick example

Two states with probabilities 0.6 and 0.4. A returns 10% and −5% (mean 4%); B returns 6% and 2% (mean 4.4%). 0.6 × (6)(1.6) + 0.4 × (−9)(−2.4) = 5.76 + 8.64 = 14.4 (%²).

On your calculator
  1. 0.6×(10−4)×(6−4.4)+(0.4×(5+|-−4)×(2−4.4))= 14.4

+|- change sign

  1. 10ENTER4−6ENTER4.4−×0.6×5CHSENTER4−2ENTER4.4−×0.4×+ 14.4

ENTER enter (on the HP, puts the number on the stack) · CHS change sign

Covariance shortcut Use it
Cov(RA,RB)=E(RARB)−E(RA) E(RB)\mathrm{Cov}(R_A, R_B) = E(R_A R_B) - E(R_A)\,E(R_B)
Quick example

Same two states. E(R_A R_B) = 0.6 × 60 + 0.4 × (−10) = 32. Cov = 32 − 4 × 4.4 = 14.4 (%²).

On your calculator
  1. 0.6×60+(0.4×10+|-)=−(4×4.4)= 14.4

+|- change sign

  1. 0.6ENTER60×0.4ENTER10CHS×+4ENTER4.4×− 14.4

ENTER enter (on the HP, puts the number on the stack) · CHS change sign

Correlation from scenario returns Memorize
ρAB=Cov(RA,RB)σA σB\rho_{AB} = \frac{\mathrm{Cov}(R_A, R_B)}{\sigma_A\,\sigma_B}
Quick example

Covariance −12, standard deviations 6% and 4%. −12 ÷ (6 × 4) = −0.50.

On your calculator
  1. 12+|-÷(6×4)= -0.5

+|- change sign

  1. 12CHSENTER6ENTER4×÷ -0.5

CHS change sign · ENTER enter (on the HP, puts the number on the stack)

Independence Use it
P(X,Y)=P(X) P(Y)P(X, Y) = P(X)\,P(Y)
Quick example

P(X = 1) = 0.40 and P(Y = 1) = 0.25, with X and Y independent. P(X = 1 and Y = 1) = 0.40 × 0.25 = 0.10.

On your calculator
  1. 0.4×0.25= 0.1
  1. 0.4ENTER0.25× 0.1

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

Expected product of uncorrelated returns Use it
E(XY)=E(X) E(Y)if X,Y are uncorrelatedE(XY) = E(X)\,E(Y) \quad \text{if } X, Y \text{ are uncorrelated}
Quick example

Revenue is price times quantity. If expected price is 20 and expected quantity is 300 and they are uncorrelated, expected revenue is 20 × 300 = 6,000.

On your calculator
  1. 20×300= 6000
  1. 20ENTER300× 6000

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

Questions about this lesson?

Where this comes back

Questions candidates ask

How do you calculate covariance from a joint probability table?

Find each asset's expected return from the probabilities. In every scenario, multiply the two deviations from those means, then multiply by the scenario's probability. Add the results. Use the probabilities as weights, never an equal split and never n − 1.

Are independent returns uncorrelated?

Yes. Independence means the joint probability is the product of the separate probabilities, which makes the covariance and correlation zero. The reverse is not true: returns can be uncorrelated and still linked in a nonlinear way, so zero correlation alone does not prove independence.

What is a joint probability function?

It gives the probability that two random variables take particular values together, for example the chance that asset A returns 18% while asset B returns 4%. A scenario table is a joint probability function, and the probabilities across all cells add to 1.

Spotted an error? Tell us and we will fix it.

  1. Portfolio expected return, variance and the role of correlation
  2. Covariance and correlation from a joint probability table
  3. Shortfall risk and Roy's safety-first ratio

Ask Sensei Listen instead

Questions on Covariance and correlation from a joint probability table

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