The expected value $E[X] = \sum x\,P(X = x)$ is the long-run average of $X$. Often we need the average of something computed from $X$: a payoff, a square, a cost. There is no need to find the distribution of that new quantity first.
Key idea
Why it works
| $x$ | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| $P(X = x)$ | $\frac{1}{6}$ | $\frac{1}{6}$ | $\frac{1}{6}$ | $\frac{1}{6}$ | $\frac{1}{6}$ | $\frac{1}{6}$ |
| $x^{2}$ | 1 | 4 | 9 | 16 | 25 | 36 |
| $\max(x - 4, 0)$ | 0 | 0 | 0 | 0 | 1 | 2 |
Worked examples
Worked example: The square of a die roll
- $$E[X^{2}] = \frac{1 + 4 + 9 + 16 + 25 + 36}{6} = \frac{91}{6} \approx 15.17$$
- $E[X] = \frac{7}{2}$, so $(E[X])^{2} = \frac{49}{4} = 12.25$.
- They differ by $\frac{91}{6} - \frac{49}{4} = \frac{35}{12}$, which will turn out to be the variance.
Answer: $E[X^{2}] = \frac{91}{6}$, larger than $(E[X])^{2} = \frac{49}{4}$.
Worked example: A payoff
- $$E[\max(X - 4, 0)] = 0 \cdot \frac{4}{6} + 1 \cdot \frac{1}{6} + 2 \cdot \frac{1}{6} = \frac{1}{2}$$
- Plugging in the mean gives $\max(3.5 - 4, 0) = 0$, which would call the game worthless.
Answer: \$0.50
Worked example: A reciprocal
- $$E\left[\frac{1}{X}\right] = \frac{1}{6}\left(1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6}\right) = \frac{1}{6} \cdot \frac{49}{20} = \frac{49}{120} \approx 0.41$$
- Compare $\frac{1}{E[X]} = \frac{2}{7} \approx 0.29$.
Answer: $\frac{49}{120}$
The same rule handles any function the problems might use: $\lvert X - c \rvert$ (an average distance), $X(X - 1)$ (useful for counting pairs), $2^{X}$ (a doubling payoff) or $(X - c)^{2}$. In each case make a row of $g$-values, multiply by the probabilities, and add.
Common mistake