Quant Memo
Foundational

Expectation, Variance & Moments

Expectation as the Lebesgue integral against a distribution, LOTUS, the algebra of variance and covariance, and the higher moments (skewness, kurtosis) that decide whether a Gaussian risk model is safe or lethal.

Prerequisites: Random Variables & Distributions

Expectation is the single most reused operation in quantitative finance, every price is a discounted expected payoff, every risk number is a moment. It is worth internalising it not as "average" but as the integral of a random variable against its law, because that definition is what makes it linear, monotone, and immune to the paradoxes of averaging. Variance and the higher moments are then just expectations of specific functions, and their algebra is the grammar of portfolio risk.

Expectation as an integral

For a random variable XX on (Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P}) (see Probability Spaces), the expectation is the Lebesgue integral E[X]=ΩX(ω)dP(ω),\mathbb{E}[X] = \int_\Omega X(\omega)\,d\mathbb{P}(\omega), which specialises to the familiar sums and integrals: E[X]=xxp(x)(discrete),E[X]=Rxf(x)dx(continuous).\mathbb{E}[X] = \sum_x x\,p(x) \quad\text{(discrete)}, \qquad \mathbb{E}[X] = \int_{\mathbb{R}} x\,f(x)\,dx \quad\text{(continuous)}. It exists (is finite) precisely when EX<\mathbb{E}|X| < \infty; otherwise the mean is undefined, not merely large. The two defining properties are linearity, E[aX+bY]=aE[X]+bE[Y]\mathbb{E}[aX + bY] = a\,\mathbb{E}[X] + b\,\mathbb{E}[Y] for any X,YX, Y, independent or not, and monotonicity, XYE[X]E[Y]X \le Y \Rightarrow \mathbb{E}[X] \le \mathbb{E}[Y]. Linearity without an independence requirement is the workhorse; it is why the expected value of a sum of correlated asset returns is just the sum of the means.

LOTUS: expectation of a function

You almost never integrate against the law of g(X)g(X) directly. The Law of the Unconscious Statistician lets you use the law of XX: E[g(X)]=Rg(x)fX(x)dx.\mathbb{E}[g(X)] = \int_{\mathbb{R}} g(x)\,f_X(x)\,dx. This is "unconscious" because practitioners apply it without deriving the distribution of g(X)g(X) first, and it is exactly what justifies computing option values E[(STK)+]\mathbb{E}[(S_T - K)^+] by integrating the payoff against the price density.

Variance, covariance, and their algebra

The variance is the second central moment, the expected squared deviation: Var(X)=E[(Xμ)2]=E[X2]μ2,μ=E[X].\operatorname{Var}(X) = \mathbb{E}\big[(X - \mu)^2\big] = \mathbb{E}[X^2] - \mu^2, \qquad \mu = \mathbb{E}[X]. The second form (from expanding and using linearity) is the computational one; the first is the meaning. Covariance generalises it to pairs: Cov(X,Y)=E[(XμX)(YμY)]=E[XY]μXμY.\operatorname{Cov}(X, Y) = \mathbb{E}\big[(X - \mu_X)(Y - \mu_Y)\big] = \mathbb{E}[XY] - \mu_X\mu_Y. The master identity for portfolios follows from bilinearity of covariance. For a weighted sum P=iwiXiP = \sum_i w_i X_i, Var(P)=ijwiwjCov(Xi,Xj)=wΣw,\operatorname{Var}(P) = \sum_i \sum_j w_i w_j \operatorname{Cov}(X_i, X_j) = w^\top \Sigma\, w, where Σ\Sigma is the covariance matrix. This quadratic form is the entire basis of mean–variance optimisation and portfolio risk. For two assets it reads Var(aX+bY)=a2Var(X)+b2Var(Y)+2abCov(X,Y)\operatorname{Var}(aX + bY) = a^2\operatorname{Var}(X) + b^2\operatorname{Var}(Y) + 2ab\operatorname{Cov}(X,Y), the cross term is where diversification lives. Correlation normalises covariance to [1,1][-1,1]: ρ=Cov(X,Y)/(σXσY)\rho = \operatorname{Cov}(X,Y)/(\sigma_X\sigma_Y).

Crucially, independence implies zero covariance, but not conversely. Covariance sees only the linear part of dependence; XX and X2X^2 (with XX symmetric) are uncorrelated yet dependent. This gap is why covariance-only (Gaussian) risk models miss nonlinear and tail co-movement.

Higher moments: skewness and kurtosis

The kk-th central moment is μk=E[(Xμ)k]\mu_k = \mathbb{E}[(X - \mu)^k]. Standardising by σk\sigma^k gives shape numbers that don't depend on units:

Skewness γ1=μ3/σ3\gamma_1 = \mu_3/\sigma^3 measures asymmetry. Negative skew, the equity-index norm, means the left tail is longer: many small gains, occasional large crashes. A strategy that "picks up pennies" (short vol, carry) has negative skew; a trend follower has positive skew.

Kurtosis γ2=μ4/σ4\gamma_2 = \mu_4/\sigma^4 measures tail heaviness. The Gaussian has kurtosis exactly 33; excess kurtosis γ23\gamma_2 - 3 is reported so the normal sits at zero. Financial return series routinely show excess kurtosis of 5–30+ at daily frequency, fat tails. Under fat tails, "3-sigma" days arrive far more often than a normal predicts, and this is not a rounding error: it is the difference between a risk model that survives and one that blows up.

Worked example, variance of a fair die. With XX uniform on {1,,6}\{1,\dots,6\}, E[X]=3.5\mathbb{E}[X] = 3.5 and E[X2]=16(1+4+9+16+25+36)=916\mathbb{E}[X^2] = \tfrac{1}{6}(1+4+9+16+25+36) = \tfrac{91}{6}, so Var(X)=9163.52=15.1612.25=2.916=3512\operatorname{Var}(X) = \tfrac{91}{6} - 3.5^2 = 15.1\overline{6} - 12.25 = 2.91\overline{6} = \tfrac{35}{12}. The computational identity E[X2]μ2\mathbb{E}[X^2] - \mu^2 did all the work; you never touched the definition's squared deviations.

Failure modes and subtleties

  • The mean may not exist. For a Cauchy (Student-tt with 1 d.o.f.) the integral xf(x)dx\int x f(x)\,dx diverges, the sample mean of Cauchy draws does not converge, wrecking the The Law of Large Numbers. Heavy-tailed financial data can have undefined higher moments; a "sample kurtosis" that keeps growing with sample size is the tell that the population moment is infinite.
  • Sample vs. population. E[X]\mathbb{E}[X] is a property of the law; Xˉ\bar X estimates it with error σ/n\sigma/\sqrt{n}. The unbiased variance estimator divides by n1n-1 (Bessel's correction) because using Xˉ\bar X in place of μ\mu removes one degree of freedom.
  • Variance is not risk. It penalises upside and downside symmetrically and ignores skew and kurtosis entirely, hence semivariance, VaR, and expected shortfall. Two portfolios with identical variance can have utterly different crash risk.
  • Correlation breakdown in stress. Estimated covariances are regime-dependent; correlations tend toward 1 in crashes exactly when diversification (the cross term) is supposed to help. The moment exists but is non-stationary.
  • Jensen's inequality. For convex gg, E[g(X)]g(E[X])\mathbb{E}[g(X)] \ge g(\mathbb{E}[X]): the expected value of a nonlinear function is not the function of the expected value. This gap (the "convexity" or "gamma" of a position) is where a great deal of derivatives P&L comes from.

In interviews

Expectation and variance questions are the bread and butter of quant screens. Be fluent with Var(X)=E[X2]E[X]2\operatorname{Var}(X) = \mathbb{E}[X^2] - \mathbb{E}[X]^2 and derive it on demand. Know the two-asset variance formula cold, including the sign of the cross term for a hedge. Expect LOTUS in disguise: "XX uniform on [0,1][0,1], find E[Xn]\mathbb{E}[X^n]" is 01xndx=1/(n+1)\int_0^1 x^n dx = 1/(n+1). A favourite conceptual trap is asserting "uncorrelated implies independent", give the X,X2X, X^2 counterexample. And when a desk asks why they don't just model returns as Gaussian, the one-word answer is kurtosis, expanded into the fat-tail argument above. These moments feed directly into Moment Generating Functions (which package all of them at once) and The Central Limit Theorem.

Related concepts

Practice in interviews

Further reading

  • Casella & Berger, Statistical Inference (Ch. 2)
  • Durrett, Probability: Theory and Examples
  • Cont & Tankov, Financial Modelling with Jump Processes
ShareTwitterLinkedIn