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.
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.
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.
| State | Probability | R_A | R_B |
|---|---|---|---|
| Strong | 0.25 | 18% | 4% |
| Steady | 0.45 | 6% | 10% |
| Weak | 0.30 | −4% | 0% |
How do you find the covariance from the table?
Work in four steps: expected returns, deviations, probability-weighted products, then add.
Two shortcuts help here. A state in which either deviation is zero adds zero, and the identity below avoids deviations altogether.
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
- 45−(6×5.5)=
- 45ENTER6ENTER5.5×−
ENTER enter (on the HP, puts the number on the stack)
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)
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).
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.
- (0.25×12×1.5+|-)+(0.45×0×4.5)+(0.3×10+|-×5.5+|-)=STO112.00, the covariance (%²)
- (0.25×12x²)+(0.45×0x²)+(0.3×10+|-x²)=√xSTO28.12, σ of A
- (0.25×1.5+|-x²)+(0.45×4.5x²)+(0.3×5.5+|-x²)=√xSTO34.33, σ of B
- RCL1÷RCL2÷RCL3=0.3411, the correlation
+|- change sign · STO store · x² square · √x square root · RCL recall a stored number
- 0.25ENTER12×1.5CHS×0.45ENTER0×4.5×+0.3ENTER10CHS×5.5CHS×+STO112.00, the covariance (%²)
- 0.25ENTER12ENTER××0.45ENTER0ENTER××+0.3ENTER10CHSENTER××+g√xSTO28.12, σ of A
- 0.25ENTER1.5CHSENTER××0.45ENTER4.5ENTER××+0.3ENTER5.5CHSENTER××+g√xSTO34.33, σ of B
- 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.
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.
- 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.25 | 0.05 | 0 |
| R_A = 7% | 0.05 | 0.40 | 0 |
| R_A = −4% | 0 | 0.05 | 0.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.
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.20 | 0.20 | 0.40 |
| X down (0.6) | 0.30 | 0.30 | 0.60 |
| Total | 0.50 | 0.50 | 1.00 |
With a table like this, the expected product splits too, and the covariance collapses to zero:
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 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 mean | R_B vs mean | Product | Pushes covariance |
|---|---|---|---|
| above | above | + | up |
| below | below | + | up |
| above | below | − | down |
| below | above | − | 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 , or . Independent: and Cov = 0.
- 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 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
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%.
- 0.25×12+(0.5×6)+(0.25×4+|-)= 5
+|- change sign
- 0.25ENTER12×0.5ENTER6×+0.25ENTER4CHS×+ 5
ENTER enter (on the HP, puts the number on the stack) · CHS change sign
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 (%²).
- 0.6×(10−4)×(6−4.4)+(0.4×(5+|-−4)×(2−4.4))= 14.4
+|- change sign
- 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
Quick example
Same two states. E(R_A R_B) = 0.6 × 60 + 0.4 × (−10) = 32. Cov = 32 − 4 × 4.4 = 14.4 (%²).
- 0.6×60+(0.4×10+|-)=−(4×4.4)= 14.4
+|- change sign
- 0.6ENTER60×0.4ENTER10CHS×+4ENTER4.4×− 14.4
ENTER enter (on the HP, puts the number on the stack) · CHS change sign
Quick example
Covariance −12, standard deviations 6% and 4%. −12 ÷ (6 × 4) = −0.50.
- 12+|-÷(6×4)= -0.5
+|- change sign
- 12CHSENTER6ENTER4×÷ -0.5
CHS change sign · ENTER enter (on the HP, puts the number on the stack)
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.
- 0.4×0.25= 0.1
- 0.4ENTER0.25× 0.1
ENTER enter (on the HP, puts the number on the stack)
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.
- 20×300= 6000
- 20ENTER300× 6000
ENTER enter (on the HP, puts the number on the stack)
How it is asked
-
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).
-
Independent returns
Two assets have independent returns. Their covariance is?
Zero, and so is the correlation.
-
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).
-
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.
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:
2If the returns on two assets are independent, their covariance is:
3The sign of a covariance computed from a joint probability table most likely tells the analyst:
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:
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.
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%.
- 0.25×12+(0.5×6)+(0.25×4+|-)= 5
+|- change sign
- 0.25ENTER12×0.5ENTER6×+0.25ENTER4CHS×+ 5
ENTER enter (on the HP, puts the number on the stack) · CHS change sign
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 (%²).
- 0.6×(10−4)×(6−4.4)+(0.4×(5+|-−4)×(2−4.4))= 14.4
+|- change sign
- 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
Quick example
Same two states. E(R_A R_B) = 0.6 × 60 + 0.4 × (−10) = 32. Cov = 32 − 4 × 4.4 = 14.4 (%²).
- 0.6×60+(0.4×10+|-)=−(4×4.4)= 14.4
+|- change sign
- 0.6ENTER60×0.4ENTER10CHS×+4ENTER4.4×− 14.4
ENTER enter (on the HP, puts the number on the stack) · CHS change sign
Quick example
Covariance −12, standard deviations 6% and 4%. −12 ÷ (6 × 4) = −0.50.
- 12+|-÷(6×4)= -0.5
+|- change sign
- 12CHSENTER6ENTER4×÷ -0.5
CHS change sign · ENTER enter (on the HP, puts the number on the stack)
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.
- 0.4×0.25= 0.1
- 0.4ENTER0.25× 0.1
ENTER enter (on the HP, puts the number on the stack)
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.
- 20×300= 6000
- 20ENTER300× 6000
ENTER enter (on the HP, puts the number on the stack)
Questions about this lesson?
Where this comes back
- Shortfall risk and Roy's safety-first ratio Portfolio Mathematics
- Portfolio Risk and Return: Part I Portfolio Construction
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.