Learn
Lesson · Discrete Probability · Random variables

Expected Value

E[X] = Σ k·P(X = k). It is the long-run average, it need not be a possible value, and it is not the most likely outcome. Those three clarifications prevent most misuse.

E[X] = Σ_k k · P(X = k) E[X] need not be a value X can take E[X] is NOT the most likely value E[aX + b] = a·E[X] + b
The definition and three cautions

Core ideas

What this lesson establishes

Expectation is a one-line definition whose interpretation is where the difficulty lies.

1

It is a weighted average

Each value weighted by its probability. For equally likely outcomes it is the ordinary mean.

2

It need not be attainable

The expected value of a die roll is 3.5, and no die shows 3.5. The expectation summarises the distribution, not any single outcome.

3

It is not the mode

The most likely value and the average are different summaries and often differ, especially for skewed distributions.

The material

Expectation

The definition, the linear rule, and the games it settles.

Definition · Expected value

For a discrete random variable X taking finitely many values, E[X] = Σ_k k · P(X = k), summed over the values X takes. Equivalently E[X] = Σ_{s ∈ S} X(s)P(s).

The second form is often more useful: sum over outcomes rather than over values. It makes the linearity of “Linearity of Expectation” immediate.

Example · A fair die

E[X] = (1+2+3+4+5+6)/6 = 3.5. Not a value the die can show, and that is not a defect: it is the long-run average of many rolls.

Theorem · Linear transformation

E[aX + b] = aE[X] + b for constants a, b.

E[aX + b] = Σ_s (aX(s) + b)P(s) = a Σ_s X(s)P(s) + b Σ_s P(s) = aE[X] + b, using that the probabilities sum to 1.

□

Theorem · Expectation of a function

E[g(X)] = Σ_k g(k)P(X = k). Note E[g(X)] ≠ g(E[X]) in general: for a fair die E[X²] = 91/6 ≈ 15.17 while (E[X])² = 12.25.

That inequality is not a curiosity; it is the reason variance is defined the way “Variance and Standard Deviation” defines it, and it is behind the general fact that averaging and transforming do not commute.

Fair games and expected winnings

Example · A carnival game

Pay £2 to roll a die and win £X where X is the face shown. E[winnings] = 3.5 − 2 = £1.50 per play in your favour, so the game is not one anybody would offer.

Example · Roulette

European roulette has 37 pockets. A £1 bet on a single number pays 35 to 1. E[profit] = 35 · (1/37) − 1 · (36/37) = −1/37 ≈ −£0.027 per pound staked. Every bet on the wheel has the same expectation, which is the design.

Definition · Fair game

A game is fair when the expected net gain is 0. Casino games are deliberately unfair by a small margin, and the margin is what the house relies on over many plays.

What expectation does not tell you

  • Not the most likely outcome. The expected number of heads in 3 flips is 1.5, which is impossible.
  • Not a guarantee. A game with positive expectation can lose for a long time; “Variance and Standard Deviation”'s variance is what measures that.
  • Not enough to compare two options. Two bets with equal expectation can differ enormously in risk, and expectation alone cannot see it.

Interactive

Distribution, expectation, variance

Definition first, formula second

Distribution
P(X = k)E[X]

Method

Computing an expectation

From the definition first; formulas afterwards.

1

List the values and their probabilities

The distribution. If it does not sum to 1, stop and fix it.

2

Multiply each value by its probability and sum

That is the definition, and for small distributions it is the fastest route.

3

Use linearity where it applies

E[aX + b] = aE[X] + b avoids recomputing a whole distribution after a shift or a scaling.

4

Sanity-check the position

The expectation lies between the smallest and largest values, and near the bulk of the probability. Anything outside that range is an error.

Expectation

Score 0 / 0

An insurance calculation

A policy pays £10 000 on an event with probability 0.002, and the premium is £30.

From the insurer's point of view, let X be the net gain on one policy. no claim: X = +30 P = 0.998 claim: X = 30 − 10000 = −9970 P = 0.002 E[X] = 30(0.998) + (−9970)(0.002) = 29.94 − 19.94 = £10.00 per policy The customer's expectation is exactly −£10. The insurer's edge comes from selling MANY policies, where the average approaches the expectation — which is “Variance and Standard Deviation”'s subject.

Both parties can be acting sensibly. The customer accepts a negative expectation to remove a large downside they could not absorb; the insurer accepts the risk because across many policies the variance of the average collapses. Expectation alone explains neither decision.

Common mistakes

1
Expecting the expectation to be attainable3.5 for a die and 1.5 heads in three flips are both fine. The expectation summarises the distribution.
2
Reading the expectation as the typical outcomeFor skewed distributions the mean can be far from anything likely. The geometric distribution in “The Geometric Distribution and Waiting Times” is the standard example.
3
Applying a function inside the expectationE[g(X)] ≠ g(E[X]) unless g is linear. This is the source of many wrong risk calculations.

Check your understanding

✓
Finish when you can compute an expectation and say what it does not claim.

Compute the expected number of heads in five fair flips from the definition, then state in one sentence why 2.5 is a sensible answer for a quantity that must be an integer.

Note: “Linearity of Expectation” gives a much faster route to most expectations. Linearity holds without independence, which makes decomposing a complicated variable into indicators the dominant technique in the rest of this course.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.