Sub topic 2
Measuring Risk: Variance and Standard Deviation
Assume you know basic algebra, expected return, and how to calculate a mean. This chapter uses those ideas to measure how widely investment returns vary around their expected value.
Variance: Average Squared Deviation
Variance measures the dispersion of possible returns. Dispersion is the degree to which observations differ from their average.
For an investment with possible returns and probabilities:
Variance = Σ [Probability × (Return − Expected return)²]
The symbol for variance is σ². The squared term prevents positive and negative deviations from canceling. It also gives greater weight to larger deviations.
Consider an investment with these possible one-year returns:
| Economic outcome | Probability | Return |
|---|---|---|
| Recession | 0.30 | -10% |
| Normal growth | 0.50 | 8% |
| Strong growth | 0.20 | 20% |
First calculate the expected return:
E(R) = 0.30(-10%) + 0.50(8%) + 0.20(20%) = 6%
Next calculate each probability-weighted squared deviation:
- Recession: 0.30 × (-10% − 6%)² = 0.000768
- Normal growth: 0.50 × (8% − 6%)² = 0.000200
- Strong growth: 0.20 × (20% − 6%)² = 0.000392
The variance is:
σ² = 0.00136
When returns are expressed as decimals, variance is expressed in decimal-squared units. This makes variance useful for calculations but difficult to interpret directly.
Standard Deviation: Risk in Return Units
Standard deviation is the square root of variance:
σ = √σ²
For the example:
σ = √0.00136 = 0.0369, or 3.69%
Standard deviation estimates the typical distance of returns from the expected return. A higher standard deviation means more uncertainty about the investment's outcome, assuming the returns are measured over the same period.
Population and Sample Variance
Use population variance when the possible outcomes and their probabilities describe the full distribution you want to analyze. This is common for an ex ante forecast.
For historical observations, you usually calculate sample variance:
s² = Σ(Rᵢ − R̄)² / (n − 1)
The denominator is n − 1, rather than n, because a sample estimates the variability of a larger population. The corresponding sample standard deviation is the square root of sample variance.
from math import sqrt
returns = [-0.10, 0.08, 0.20]
probabilities = [0.30, 0.50, 0.20]
expected_return = sum(p * r for p, r in zip(probabilities, returns))
variance = sum(
p * (r - expected_return) ** 2
for p, r in zip(probabilities, returns)
)
standard_deviation = sqrt(variance)
print(f"Expected return: {expected_return:.2%}")
print(f"Variance: {variance:.6f}")
print(f"Standard deviation: {standard_deviation:.2%}")How the Calculation Fits Together
A return distribution can have the same expected return as another distribution but a different standard deviation. The distribution with greater dispersion has greater measured risk. Standard deviation does not show whether a deviation is favorable or unfavorable. It treats unusually high returns and unusually low returns as risk because both differ from the mean.
Exercise
An investment has returns of 4%, 10%, and 16%, each with probability one-third. What are its expected return and standard deviation?
Show answer
The expected return is 10%. The deviations are -6%, 0%, and 6%, so variance is (0.06² + 0² + 0.06²) / 3 = 0.0024. Standard deviation is √0.0024 = 4.90%.