Expectation and Variance
Two numbers — where a distribution sits and how far it spreads — and the balance-point picture that makes them click.
Two numbers that summarize a whole distribution
A probability distribution can list many possible outcomes, each with its own chance of happening. That is a lot to hold in your head. Luckily, two numbers capture most of what you usually care about:
- Where the distribution sits — its center, the value you would land near on average. This is the expected value.
- How spread out it is — whether outcomes cluster tightly around that center or scatter far from it. This is the variance (and its friendlier cousin, the standard deviation).
Get comfortable with these two and you can describe almost any distribution in a single breath: center and spread.
How to compute it
You do not average the outcomes equally — you weight each one by its probability. Multiply every value \(x\) by its chance \(p(x)\), then add up all those pieces. Rare outcomes barely move the total; likely ones dominate it.
Spread: how far outcomes stray from the mean
Two distributions can share the exact same mean yet feel completely different — one packed tightly around \(\mu\), the other flung wide. Variance measures that difference. For each outcome, take its distance from the mean, \(x-\mu\), then square it (so misses on either side count as positive, and large misses are penalized heavily). Finally, average those squared distances, again weighting by probability.
Watch the balance point and the spread
In the simulation below, adjust the probability of each outcome and watch two things move. The triangle beneath the axis is a fulcrum — it sits exactly at \(E[X]\), the point where the distribution would balance. The shaded band spans \(\mu \pm \sigma\), one standard deviation on each side. Shift weight toward the high outcomes and the fulcrum slides right; bunch the weight together and the band narrows.
- Expected value: weight each outcome by its probability and add. \(E[X] = 1(0.2) + 2(0.5) + 3(0.3) = 0.2 + 1.0 + 0.9 = 2.1\).
- So the long-run average spin is \(\mu = 2.1\) — notice it is not even one of the possible outcomes, and it need not be.
- Variance: find each squared distance from the mean. \((1-2.1)^2 = 1.21\), \((2-2.1)^2 = 0.01\), \((3-2.1)^2 = 0.81\).
- Weight those by probability and add: \(\operatorname{Var}(X) = 0.2(1.21) + 0.5(0.01) + 0.3(0.81) = 0.242 + 0.005 + 0.243 = 0.49\).
- Standard deviation: \(\sigma = \sqrt{0.49} = 0.7\).
Check your understanding
- The expected value E[X] = Σ x·p(x) is the probability-weighted average — the long-run average and the balance point of the distribution.
- E[X] need not be a possible outcome; it is simply where the distribution balances.
- Variance Var(X) = E[(X−μ)²] averages the squared distances from the mean; larger variance means more spread.
- The standard deviation σ = √Var(X) reports that spread as a typical distance in the original units.
- Shifting every value by a constant moves the mean by that constant but leaves the variance and standard deviation unchanged.