Mathematics · Glossary

What is Moments, variance?

Also known as: variance · standard deviation · covariance

Definition 22.13 University Mathematics — Year 2 · Chapter 22 — Discrete Random Variables

XX has a moment of order 2 if X2X^2 has an expectation (then so does XX, by domination: X1+X22\abs X \leq \frac{1 + X^2}{2}). Its variance and standard deviation are then

V(X)=E((XE(X))2)=E(X2)E(X)2,σ(X)=V(X),V(X) = \E\bigl((X - \E(X))^2\bigr) = \E(X^2) - \E(X)^2 , \qquad \sigma(X) = \sqrt{V(X)} ,

(the second form — the König–Huygens formula — by expanding the square and using linearity:

E((XEX)2)=E(X22XEX+E(X)2)=E(X2)2E(X)2+E(X)2,\E\bigl((X - \E X)^2\bigr) = \E\bigl(X^2 - 2X\,\E X + \E(X)^2\bigr) = \E(X^2) - 2\,\E(X)^2 + \E(X)^2 ,

the middle term using that EX\E X is a constant). For X,YX, Y with second moments, the covariance is

Cov(X,Y)=E((XEX)(YEY))=E(XY)E(X)E(Y).\operatorname{Cov}(X, Y) = \E\bigl((X - \E X)(Y - \E Y)\bigr) = \E(XY) - \E(X)\E(Y) .

Examples

Example 22.16 (Uncorrelated but glued together)

Roll two fair dice, XX and YY independent, and set S=X+YS = X + Y, D=XYD = X - Y. By bilinearity of the covariance,

Cov(S,D)=V(X)V(Y)+Cov(Y,X)Cov(X,Y)=V(X)V(Y)=0:\operatorname{Cov}(S, D) = V(X) - V(Y) + \operatorname{Cov}(Y, X) - \operatorname{Cov}(X, Y) = V(X) - V(Y) = 0 :

sum and difference are uncorrelated. Independent? Certainly not: S=12S = 12 forces D=0D = 0, while P(D=0)=16\P(D = 0) = \frac16 unconditionally. Correlation only tests the linear part of a dependence; here the dependence is carried by the constraint that SS and DD have the same parity, invisible to covariance. (For this pair, zero covariance needed V(X)=V(Y)V(X) = V(Y): identical distributions, not independence, did the work.)

Example 22.17 (When Markov is exact)

Markov’s inequality is an equality precisely when nothing is wasted in the bound a1XaXa\,\mathbf 1_{X\geq a} \leq X: the variable must take only the values 00 and aa. Concretely, if P(X=a)=π\P(X = a) = \pi and P(X=0)=1π\P(X = 0) = 1 - \pi, then E(X)=aπ\E(X) = a\pi and

P(Xa)=π=E(X)a.\P(X \geq a) = \pi = \frac{\E(X)}{a} .

A realistic reading: in a population where average wealth is 100100 and wealth is either 00 or 10610^6, the proportion of millionaires is exactly 10410^{-4} — Markov’s bound, hit exactly by maximal inequality. Whenever XX spreads over intermediate values the bound is strict, often wildly so; but as the extreme case shows, no better inequality can be extracted from the mean alone.

Example 22.18 (Chebyshev is sharp — without further hypotheses)

Fix ε>0\varepsilon > 0, q(0,1]q \in \intoc01, and let XX take the values ±ε\pm\varepsilon with probability q2\frac q2 each and 00 with probability 1q1 - q. Then E(X)=0\E(X) = 0, V(X)=qε2V(X) = q\varepsilon^2, and

P(XEXε)=q=V(X)ε2:\P\bigl(\abs{X - \E X} \geq \varepsilon\bigr) = q = \frac{V(X)}{\varepsilon^2} :

equality in Chebyshev. So the inequality cannot be improved using only the variance — the 1/ε21/\varepsilon^2 decay is the exact price of second-moment information. Faster decay requires stronger hypotheses: boundedness of the variable buys exponential concentration, as Exercise 22.7 previews and this chapter’s weekend problem develops systematically.

Read in context →