Free CFA Level I practice example

Bayes' Formula and Updated Probabilities

Practice question on bayes' formula and updated probabilities.

Key Concept

Bayes' formula allows an analyst to revise (update) a prior probability after receiving new information. In an investment context, this is essential for portfolio risk analysis — for example, updating the probability that a market is in a particular regime given observed returns. Key Definitions: $P(A)$ = prior probability of event $A$ $P(B \mid A)$ = likelihood of observing evidence $B$ given $A$ is true $P(B)$ = total (unconditional) probability of evidence $B$ $P(A \mid B)$ = posterior (updated) probability of $A$ given $B$ Bayes' Formula: $P(A \mid B) = \frac{P(B \mid A) \cdot P(A)}{P(B)}$ Total Probability Rule (used to compute $P(B)$): $P(B) = P(B \mid A_1) \cdot P(A_1) + P(B \mid A_2) \cdot P(A_2) + \cdots + P(B \mid A_n) \cdot P(A_n)$ where $A_1, A_2, \ldots, A_n$ are mutually exclusive and exhaustive events. Conditional Expectation: $E(X) = \sum_{i} P(A_i) \cdot E(X \mid A_i)$ This formula weights scenario-specific expected values by their (possibly updated) probabilities to produce a composite expected value.

Practice Question

Scenario: A quantitative portfolio manager at an asset management firm monitors a global equity fund. She classifies market conditions into three mutually exclusive and exhaustive states:
  • $S_1$: Bull Market — prior probability $P(S_1) = 0.40$
  • $S_2$: Neutral Market — prior probability $P(S_2) = 0.35$
  • $S_3$: Bear Market — prior probability $P(S_3) = 0.25$
The fund's risk model assigns the following conditional expected annual returns and conditional standard deviations for the portfolio under each state:
Market State Expected Return Standard Deviation
$S_1$: Bull $+18\%$ $12\%$
$S_2$: Neutral $+5\%$ $8\%$
$S_3$: Bear $-14\%$ $20\%$
The manager's leading economic indicator (LEI) model generates a signal $I$ (indicating "positive momentum") at the start of the year. Based on historical calibration, the conditional probabilities of observing signal $I$ under each state are: $P(I \mid S_1) = 0.70, \quad P(I \mid S_2) = 0.40, \quad P(I \mid S_3) = 0.15$ Using this framework, answer the following:
  1. Calculate the unconditional probability of observing signal $I$, i.e., $P(I)$.
  2. Using Bayes' formula, calculate the updated (posterior) probabilities $P(S_1 \mid I)$, $P(S_2 \mid I)$, and $P(S_3 \mid I)$.
  3. Calculate the unconditional expected return of the portfolio using the prior probabilities.
  4. Calculate the updated expected return of the portfolio using the posterior probabilities from part (2).
  5. Calculate the updated total variance of the portfolio using the posterior probabilities, accounting for both within-state variance and across-state variance (i.e., the law of total variance). Express the answer as a variance and as a standard deviation (in \%).

Solution

Step 1: Unconditional Probability of Signal $I$

Apply the total probability rule: $P(I) = P(I \mid S_1) \cdot P(S_1) + P(I \mid S_2) \cdot P(S_2) + P(I \mid S_3) \cdot P(S_3)$ $P(I) = (0.70)(0.40) + (0.40)(0.35) + (0.15)(0.25)$ $P(I) = 0.280 + 0.140 + 0.0375$ $\boxed{P(I) = 0.4575}$

Step 2: Posterior Probabilities via Bayes' Formula

$P(S_i \mid I) = \frac{P(I \mid S_i) \cdot P(S_i)}{P(I)}$ For $S_1$ (Bull): $P(S_1 \mid I) = \frac{(0.70)(0.40)}{0.4575} = \frac{0.280}{0.4575} \approx 0.6120$ For $S_2$ (Neutral): $P(S_2 \mid I) = \frac{(0.40)(0.35)}{0.4575} = \frac{0.140}{0.4575} \approx 0.3060$ For $S_3$ (Bear): $P(S_3 \mid I) = \frac{(0.15)(0.25)}{0.4575} = \frac{0.0375}{0.4575} \approx 0.0820$ Verification: $0.6120 + 0.3060 + 0.0820 = 1.0000$ ✓

Step 3: Unconditional Expected Return (Prior Probabilities)

$E(R) = \sum_i P(S_i) \cdot E(R \mid S_i)$ $E(R) = (0.40)(18\%) + (0.35)(5\%) + (0.25)(-14\%)$ $E(R) = 7.20\% + 1.75\% + (-3.50\%)$ $\boxed{E(R) = 5.45\%}$

Step 4: Updated Expected Return (Posterior Probabilities)

$E(R \mid I) = (0.6120)(18\%) + (0.3060)(5\%) + (0.0820)(-14\%)$ $E(R \mid I) = 11.016\% + 1.530\% + (-1.148\%)$ $\boxed{E(R \mid I) \approx 11.40\%}$ The positive momentum signal substantially raises the expected return from $5.45\%$ to $11.40\%$, driven by the large upward revision in the Bull Market probability.

Step 5: Updated Total Variance (Law of Total Variance)

The Law of Total Variance states: $\text{Var}(R \mid I) = \underbrace{\sum_i P(S_i \mid I) \cdot \sigma_i^2}_{\text{Within-state variance}} + \underbrace{\sum_i P(S_i \mid I) \cdot \left[E(R \mid S_i) - E(R \mid I)\right]^2}_{\text{Across-state variance}}$ Let $\mu = E(R \mid I) = 11.40\%$, and note all values below are in \% units. Within-state variance component: $\begin{array}{rcl} W &=& (0.6120)(12^2) + (0.3060)(8^2) + (0.0820)(20^2) \\ &=& (0.6120)(144) + (0.3060)(64) + (0.0820)(400) \\ &=& 88.128 + 19.584 + 32.800 \\ &=& 140.512 \end{array}$ Across-state variance component: $\begin{array}{rcl} B &=& (0.6120)(18 - 11.40)^2 + (0.3060)(5 - 11.40)^2 + (0.0820)(-14 - 11.40)^2 \\ &=& (0.6120)(6.60)^2 + (0.3060)(-6.40)^2 + (0.0820)(-25.40)^2 \\ &=& (0.6120)(43.56) + (0.3060)(40.96) + (0.0820)(645.16) \\ &=& 26.659 + 12.534 + 52.903 \\ &=& 92.096 \end{array}$ Total Variance: $\text{Var}(R \mid I) = 140.512 + 92.096 = 232.608 \; (\%^2)$ Total Standard Deviation: $\sigma(R \mid I) = \sqrt{232.608} \approx \boxed{15.25\%}$

Summary of Results

Metric Prior (Before Signal) Posterior (After Signal $I$)
$P(\text{Bull})$ $0.4000$ $0.6120$
$P(\text{Neutral})$ $0.3500$ $0.3060$
$P(\text{Bear})$ $0.2500$ $0.0820$
Expected Return $5.45\%$ $11.40\%$
Standard Deviation $15.25\%$

Christian's Thoughts

This question is beautifully multi-layered because it combines Bayes' formula with conditional expectations and the law of total variance — three tools that CFA candidates often treat separately. The key discipline here is carefully tracking units: all returns and standard deviations are in \%, so variance is in $\%^2$. Many candidates forget to include the across-state (between-state) variance component in Step 5, which is the most common source of error. Notice how the signal $I$ nearly tripled the Bear Market probability from $25\%$ down to just $8.2\%$ — that's Bayes doing real work. On the exam, always verify your posterior probabilities sum to exactly 1.0 before proceeding. Practicing the total probability rule fluently will save critical minutes. The law of total variance is a Level I sleeper topic that shows up more than candidates expect. -christian

Calculator Keystrokes

Part_1_Expected_Monthly_Return

Calculate the expected monthly return E(Rp): E(Rp) = 0.40 * 1.25% + 0.35 * 0.85% + 0.25 * 0.45%

  1. Clear memory: [2nd] [MEM] [2nd] [CLR WORK]
  2. Calculate Tech contribution: 0.40 [x] 1.25 [=] STO 1 (Result: 0.5)
  3. Calculate REITs contribution: 0.35 [x] 0.85 [=] STO 2 (Result: 0.2975)
  4. Calculate Fixed-Income contribution: 0.25 [x] 0.45 [=] STO 3 (Result: 0.1125)
  5. Sum contributions: RCL 1 [+] RCL 2 [+] RCL 3 [=] (Result: 0.91)

Part_2_Portfolio_Variance_Standard_Deviation

Calculate the portfolio variance σp^2: σp^2 = (0.40)^2 * 0.0036 + (0.35)^2 * 0.0025 + (0.25)^2 * 0.0009 + 2 * 0.40 * 0.35 * 0.0015 + 2 * 0.40 * 0.25 * (-0.0004) + 2 * 0.35 * 0.25 * 0.0002. Then calculate standard deviation σp = sqrt(σp^2).

  1. Clear memory: [2nd] [MEM] [2nd] [CLR WORK]
  2. Calculate wT^2 * σT^2: 0.40 [x^2] [x] 0.0036 [=] STO 1 (Result: 0.000576)
  3. Calculate wR^2 * σR^2: 0.35 [x^2] [x] 0.0025 [=] STO 2 (Result: 0.00030625)
  4. Calculate wF^2 * σF^2: 0.25 [x^2] [x] 0.0009 [=] STO 3 (Result: 0.00005625)
  5. Calculate 2*wT*wR*σTR: 2 [x] 0.40 [x] 0.35 [x] 0.0015 [=] STO 4 (Result: 0.00042)
  6. Calculate 2*wT*wF*σTF: 2 [x] 0.40 [x] 0.25 [x] 0.0004 [+/-] [=] STO 5 (Result: -0.00008)
  7. Calculate 2*wR*wF*σRF: 2 [x] 0.35 [x] 0.25 [x] 0.0002 [=] STO 6 (Result: 0.000035)
  8. Sum terms for variance: RCL 1 [+] RCL 2 [+] RCL 3 [+] RCL 4 [+] RCL 5 [+] RCL 6 [=] (Result: 0.0013135)
  9. Calculate standard deviation: [sqrt] (Result: 0.0362422...) -> Convert to percentage: [x] 100 [=] (Result: 3.62%)

Part_3_Correlation_Coefficients

Calculate correlation coefficients: ρTR = 0.0015 / (sqrt(0.0036) * sqrt(0.0025)), ρTF = -0.0004 / (sqrt(0.0036) * sqrt(0.0009)), ρRF = 0.0002 / (sqrt(0.0025) * sqrt(0.0009)).

  1. Calculate σT: 0.0036 [sqrt] STO 1 (Result: 0.06)
  2. Calculate σR: 0.0025 [sqrt] STO 2 (Result: 0.05)
  3. Calculate σF: 0.0009 [sqrt] STO 3 (Result: 0.03)
  4. Calculate ρTR: 0.0015 [/] [(] RCL 1 [x] RCL 2 [)] [=] (Result: 0.5)
  5. Calculate ρTF: 0.0004 [+/-] [/] [(] RCL 1 [x] RCL 3 [)] [=] (Result: -0.222...)
  6. Calculate ρRF: 0.0002 [/] [(] RCL 2 [x] RCL 3 [)] [=] (Result: 0.133...)

Part_4_Expected_Return_Shock_Scenario

Calculate the expected monthly return under shock: E(Rp)shock = 0.40 * (-2.30%) + 0.35 * (-1.50%) + 0.25 * 0.75%

  1. Clear memory: [2nd] [MEM] [2nd] [CLR WORK]
  2. Calculate Tech contribution: 0.40 [x] 2.30 [+/-] [=] STO 1 (Result: -0.92)
  3. Calculate REITs contribution: 0.35 [x] 1.50 [+/-] [=] STO 2 (Result: -0.525)
  4. Calculate Fixed-Income contribution: 0.25 [x] 0.75 [=] STO 3 (Result: 0.1875)
  5. Sum contributions: RCL 1 [+] RCL 2 [+] RCL 3 [=] (Result: -1.2575)

Part_5_Reallocation_Shock_Scenario_Optimal_Return

Calculate the maximum possible expected return during the shock, keeping wF=25% and wT+wR=75%. This occurs when wT=0% and wR=75%: E(Rp)shock = 0 * (-2.30%) + 0.75 * (-1.50%) + 0.25 * 0.75%

  1. Clear memory: [2nd] [MEM] [2nd] [CLR WORK]
  2. Calculate Tech contribution (zero): 0 [STO 1]
  3. Calculate REITs contribution: 0.75 [x] 1.50 [+/-] [=] STO 2 (Result: -1.125)
  4. Calculate Fixed-Income contribution: 0.25 [x] 0.75 [=] STO 3 (Result: 0.1875)
  5. Sum contributions: RCL 1 [+] RCL 2 [+] RCL 3 [=] (Result: -0.9375)

Calculator keystrokes provided for BAII Plus.

More CFA Calculation Practice

This is a public sample. The full justCalculations product contains the gated practice library, detailed solutions, and calculator workflows.

View pricing or read public calculation guides.