Part 1 · ProbabilityLesson 310 minQuant Bible §2.2
Variance, and why diversification works
How spread adds up, the √n rule for averages, and standard deviations as arrows.
The mean tells you where a bet lands on average. Variance tells you how far it lands from there, and in trading that is the difference between a strategy you can run and one that blows up before its edge shows.
Definition
Variance is the expected squared distance from the mean, and the standard deviation σ is its square root, in the same units as X:
Var(X)=E[(X−μ)2]=E[X2]−(E[X])2,σ=Var(X).
The second form comes from expanding the square and using linearity. For a fair die, E[X2]=91/6 and E[X]2=12.25, so Var(X)=35/12≈2.92 and σ≈1.71.
How variance scales and adds
Shifting a variable doesn’t change its spread; scaling it scales the spread:
Var(aX+b)=a2Var(X).
For sums, there is a cross term:
Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y).
Only when X and Y are uncorrelated does it reduce to Var(X)+Var(Y). The original states that version without the condition; it is the most common slip in interviews, so say “if independent” out loud.
Standard deviations are arrows
Write Cov(X,Y)=ρσXσY and the formula becomes σX+Y2=σX2+σY2+2ρσXσY. That is the law of cosines. Draw σX and σY as arrows with the angle between them set so that cos(angle)=ρ, and the volatility of the sum is the length of the resultant arrow.
Figure 3.1Volatility as arrows, in 3D3D model
Correlation sets the angle. At ρ = 1 the arrows point the same way and risks simply add. At ρ = 0 they are perpendicular (Pythagoras). Switch to the hedge X − Y: with high correlation the resultant almost vanishes, which is exactly what a hedge is for.
This picture also explains the three-correlations puzzle in lesson 5: three arrows can’t have arbitrary pairwise angles.
The √n rule
If X1,…,Xn are independent with variance σ2 each,
Var(∑Xi)=nσ2,Var(Xˉ)=nσ2,sd(Xˉ)=nσ.
Averaging n independent things shrinks the noise by n, not n. Four times the data halves the error. If every pair has correlation ρ instead, Var(Xˉ)=σ2(n1+(1−n1)ρ), which never falls below ρσ2.
Figure 3.2The √n rule, and its floorInteractive
Top: 160 single draws against 160 averages of n draws, with ±1σ shaded. Bottom: σ of the average as n grows. Raise the correlation and the curve flattens onto a floor of √ρ: adding more correlated bets stops reducing risk.
In code
import numpy as nprng = np.random.default_rng(2)sx, sy, rho = 3.0, 2.0, 0.3print(np.sqrt(sx**2 + sy**2 + 2 * rho * sx * sy)) # sd of X + Y: 4.07print(np.sqrt(sx**2 + sy**2 - 2 * rho * sx * sy)) # sd of the hedge X - Y: 3.07# Averages of n draws shrink like 1/sqrt(n)for n in (1, 4, 16, 64): means = rng.standard_normal((100_000, n)).mean(axis=1) print(n, round(means.std(), 3), round(1 / np.sqrt(n), 3))
Check yourself
Two strategies each have annual volatility 10% and correlation 0.5. You run both with equal capital (half in each). What is the volatility of the combined book?
Var=0.52(0.01)+0.52(0.01)+2(0.5)(0.5)(0.5)(0.1)(0.1)=0.0075, so σ≈8.7%. Uncorrelated would give 7.1%, perfectly correlated 10%.