Expectation and Variance

Expectation is the probability-weighted average of a random variable; variance is the expected squared distance from that average. For a discrete variable,

The equivalent identity

is often easier to compute. These quantities define the parameters of many common distributions, the standard error in the central limit theorem, and the scale used in covariance and correlation.

Worked computation

Consider a discrete variable with values and probabilities .

00.500.000.00
10.300.300.30
20.150.300.60
50.050.251.25

The mean is . The second moment is , so

Variance is large relative to the mean because the rare value 5 contributes to the second moment, even though its probability is only 5 percent.

Caveats

The mean is not necessarily a typical value; skewed and heavy-tailed distributions can make it misleading. Some distributions have infinite variance, making normal standard-error formulas invalid.

References