Skip to content
Part IA Easter Term

Expectation

Definition

The expected value (or expectation, mean) of a discrete random variable XX is:

E[X]=xxp(x)E[X] = \sum_{x} x \cdot p(x)

where the sum is over all values in the support of XX.

Interpretation: The long-run average if we repeatedly sample from XX.

Intuition

The expectation is a weighted average of possible values, weighted by their probabilities. Values that occur more often contribute more to the average.

Example: Fair Die

E[X]=i=16i16=1+2+3+4+5+66=216=3.5E[X] = \sum_{i=1}^{6} i \cdot \frac{1}{6} = \frac{1+2+3+4+5+6}{6} = \frac{21}{6} = 3.5

Note: 3.5 is not a possible outcome. The expectation need not be a value XX can take.

Example: Biased Coin

Let XX = number of heads in one flip, with P(X=1)=pP(X=1) = p.

E[X]=0(1p)+1p=pE[X] = 0 \cdot (1-p) + 1 \cdot p = p

The expected number of heads equals the success probability.

Example: Lottery

A lottery ticket costs £2. With probability 10610^{-6}, it wins £1{,}000{,}000. Otherwise, it wins £0.

E[winnings]=106×106+(1106)×0=1E[\text{winnings}] = 10^{-6} \times 10^6 + (1 - 10^{-6}) \times 0 = 1

Expected winnings: £1. Expected profit: £1 - £2 = -£1 (a loss).

Does Expectation Always Exist?

Not always. The expectation requires:

xxp(x)<\sum_{x} |x| \cdot p(x) < \infty

If XX can take values with x|x| so large that the weighted sum diverges, expectation does not exist.

Example: The Cauchy distribution has no finite expectation: its tails are too heavy.

Properties

1. Constant

E[c]=cE[c] = c

for any constant cc.

2. Monotonicity

If XYX \leq Y (with probability 1), then E[X]E[Y]E[X] \leq E[Y].

3. Non-negativity Preservation

If X0X \geq 0 (with probability 1), then E[X]0E[X] \geq 0.

Interpretations

Physical: Centre of Mass

Place masses p(x)p(x) at positions xx on a line. The expectation is the centre of mass: the balance point.

Expectation as centre of mass

Financial: Fair Price

If you pay E[X]E[X] to play a game with payout XX, you break even on average. This is the “fair price.”

Statistical: Sample Mean

By the Law of Large Numbers, the sample mean Xˉn=1ni=1nXi\bar{X}_n = \frac{1}{n}\sum_{i=1}^n X_i converges to E[X]E[X] as nn \to \infty.

Expectation of Functions

For a function gg:

E[g(X)]=xg(x)p(x)E[g(X)] = \sum_{x} g(x) \cdot p(x)

Note: In general, E[g(X)]g(E[X])E[g(X)] \neq g(E[X]). The expectation of a function is not the function of the expectation.

Example: Squared Die

E[X2]=i=16i216=1+4+9+16+25+366=91615.17E[X^2] = \sum_{i=1}^{6} i^2 \cdot \frac{1}{6} = \frac{1+4+9+16+25+36}{6} = \frac{91}{6} \approx 15.17

Compare: E[X]2=3.52=12.25E[X]^2 = 3.5^2 = 12.25. Not equal.

Jensen’s Inequality

For a convex function gg:

E[g(X)]g(E[X])E[g(X)] \geq g(E[X])

For a concave function gg:

E[g(X)]g(E[X])E[g(X)] \leq g(E[X])

Example: g(x)=x2g(x) = x^2 is convex, so E[X2]E[X]2E[X^2] \geq E[X]^2.

Summary

ConceptFormula
DefinitionE[X]=xxp(x)E[X] = \sum_x x \cdot p(x)
ConstantE[c]=cE[c] = c
FunctionE[g(X)]=xg(x)p(x)E[g(X)] = \sum_x g(x) p(x)
Centre of massPhysical interpretation