Probability Theory Fundamentals › Variance and Standard Deviation
Quantitative FinanceAll chapters Probability Theory Fundamentals › Variance and Standard DeviationOne section · Sections in this chapter6 / 15 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
While expected value describes the center of a distribution, it tells us nothing about spread. Two investments might have the same expected return but vastly different risk profiles. Consider two stocks, both with 10% expected return. One might reliably return between 8% and 12%, while the other swings between -30% and +50%. Expected value alone cannot distinguish these dramatically different risk profiles. Variance quantifies this dispersion.
For a random variable with a finite second moment, variance is the expected squared deviation from the mean:
where:
- : variance of random variable , measuring the spread or dispersion of values around the mean
- : expected value operator
- : mean of
- : squared deviation from the mean; squaring makes both signs contribute nonnegatively and emphasizes larger deviations
- : expected value of squared (the "mean of the square")
- : square of the expected value (the "square of the mean")
The standard deviation is , which returns the measure to the original units of .
Variance squares deviations to remove signs and give larger deviations more weight. This symmetric quadratic penalty is a modeling choice; general risk aversion does not imply that gains and losses of equal size should receive identical quadratic treatment.
The second formula, , is convenient for hand calculations. It says variance equals the "mean of the square minus the square of the mean." We can compute and separately and then combine them. In floating-point code, subtracting two nearly equal large numbers can lose precision, so a centered calculation is preferable when the mean is large relative to the spread.
To see why these formulas are equivalent, expand the definition:
Since , this gives us . The derivation uses linearity of expectation: we can pass the expectation through the sum and pull constants outside, reducing the problem to computing and .
Financial Interpretation
Standard deviation is a standard measure of return volatility, not a complete measure of financial risk. For returns measured over the same horizon and annualized under the same convention, 20% volatility indicates greater standard-deviation spread than 10% volatility. Under normality, roughly 68% of returns fall within one standard deviation of the mean, and 95% fall within two standard deviations. If the one-year simple return is modeled as normal with mean 10% and standard deviation 20%, its probability of falling between -10% and +30% is about two-thirds. Here 20% is the standard deviation of the specified one-year return. The later compounding exercise uses an annualized daily-volatility input, a different quantity.
# Using the binary model from before
# Expected return already calculated
expected_return_squared = np.sum(outcomes**2 * probabilities)
variance = expected_return_squared - expected_return**2
std_dev = np.sqrt(variance)E[R] = 8.00% E[R²] = 0.0280 Var(R) = E[R²] - (E[R])² = 0.0280 - (0.0800)² = 0.0216 Standard deviation = 14.70%
The 14.7% standard deviation indicates substantial uncertainty around the 8% expected return. This volatility measure helps investors understand the range of outcomes they face and calibrate position sizes appropriately. A risk-averse investor might demand higher expected returns from this volatile investment compared to a more stable alternative.
Properties of Variance
Variance has different properties than expected value, which reflects its role in measuring spread rather than center:
Scaling: . Doubling a position quadruples variance, while standard deviation scales by and expected-return exposure scales by . The quadratic statement applies to variance specifically, not to every risk measure.
Sum of independent variables: If and are independent with finite variances:
This result follows from independence: when and are independent, their covariance is zero, eliminating the cross term that would otherwise appear. Independence means knowing the value of one variable provides no information about the other, so their variances add without reinforcement or cancellation.
Sum of dependent variables: For and with finite variances:
where:
- : variance of the sum of and
- , : individual variances
- : covariance between and
- The factor of 2 arises because when expanding , the cross term appears, and its expectation is
The covariance term determines how asset interactions affect portfolio variance. For a two-asset combination with fixed marginal variances and weights of the same sign, negative covariance lowers variance relative to zero covariance. With opposite-sign weights, the covariance contribution reverses sign. Whether the portfolio is less volatile than every constituent also depends on weights, individual volatilities, and constraints.