Statistics · Random variables and sampling distributions

A random variable and its expectation

A number attached to an outcome, and a weighted average of it.

3.5 on a die with no 3.5

The expectation of a die roll is 3.5 — a number no face carries and no roll will ever produce. Yet it is the right description of the die. If it does not describe the next roll, what exactly does it describe?

A random variable attaches a number to every outcome of a process. Once that is done, the whole distribution can be summarised the way any distribution is: by a centre and a spread. The centre is called the expectation, and it is a weighted average rather than a plain one.

E(X) = \sum x_i \, P(x_i)

The termWhat it is
A random variableA number attached to every outcome
ExpectationAn average weighted by the probabilities
VarianceThe spread about the expectation

Two worked examples

Example 1 — a value that never occurs

  1. A fair die: each face has probability one sixth.
  2. Weight each value by its probability. E(X) = \frac{1+2+3+4+5+6}{6}
  3. That gives three and a half. E(X) = 3.5
  4. No face carries that number.

Example 2 — when expectation is the wrong guide

  1. A bet has expectation of plus one unit.
  2. Played ten thousand times, gain is near certain.
  3. Played once for everything you own, it is not.
  4. Same expectation, wholly different decision.
A calculator: Expectation against spread: a bet repeated — sliders for The gain on a win (units), The loss on a loss (units), The probability of winning, Number of plays, with results that update at once.