TL;DR
Law of Total Variance: Var(X) = E[Var(X|Y)] + Var(E[X|Y]) — decompose variance into within-group and between-group. This concept is essential for quantitative trading interviews and is frequently tested at top firms.
By Valenke Exam Prep Team·Last updated 2026-06-01
Probability
Law of Total Variance
Var(X) = E[Var(X|Y)] + Var(E[X|Y]) — decompose variance into within-group and between-group.
Prerequisites
The Law of Total Variance (also called the Eve's law or conditional variance formula) decomposes the total variance of into two pieces:
Intuition: Think of grouping data by some variable . The first term captures the average spread *within* each group. The second term captures how much the group means *differ from each other*. Total variance = average within-group variance + between-group variance.
Concrete example: You roll a fair die to get , then flip fair coins. Let = number of heads. Given , , so E [ X ∣ N ] = N / 2 E[X \mid N] = N/2 and Var ( X ∣ N ) = N / 4 \text{Var}(X \mid N) = N/4 .
E [ Var ( X ∣ N ) ] = E [ N / 4 ] = E [ N ] / 4 = 3.5 / 4 = 0.875 E[\text{Var}(X \mid N)] = E[N/4] = E[N]/4 = 3.5 4 \frac{5}{4} = 0.875
Var ( E [ X ∣ N ] ) = Var ( N / 2 ) = Var ( N ) / 4 = ( 35 / 12 ) / 4 ≈ 0.729 \text{Var}(E[X \mid N]) = \text{Var}(N/2) = \text{Var}(N)/4 = (35 12 \frac{35}{12} )/4 \approx 0.729
Var ( X ) = 0.875 + 0.729 = 1.604 \text{Var}(X) = 0.875 + 0.729 = 1.604
When to use: Problems with hierarchical randomness — first a parameter is drawn randomly, then observations are generated conditional on that parameter. Common in compound distributions, Bayesian models, and random sample size problems. The formula tells you whether most variability comes from randomness within groups or differences between groups.
Ready to practice for the Valenke Finance Exam?
Adaptive practice powered by Item Response Theory targets your weak areas. Start with 3 free sessions.
Start free practice →