Statistics · easy

Explain expected value with a simple example, and why it is not the same as the likely outcome.

Asked in Data Scientist interviews, in the Statistics round.

Short answer

Expected value is the probability-weighted average of the outcomes. A ticket that pays 1,000 with probability 0.001 has an expected value of 1, a number you never actually win. It is the long-run average per play, not what happens on any one play.

How to answer it

Definition

The probability-weighted average of every outcome. It is what you would average per attempt over many repetitions, which is not the same as what you should expect on any single one.

Formula

E[X] = sum over outcomes of  probability * value

Example

A lottery ticket pays 1,000 with probability 0.001, otherwise nothing.

E[X] = 0.001 * 1000  +  0.999 * 0
     = 1

Expected value: 1.
Likely outcome: 0, which happens 99.9% of the time.

The expected value here is a number you can never actually win. That gap is the whole point of the question.

Where the two diverge

Skewed payoffs      most outcomes are small, a rare one is enormous, so the
                    mean sits above almost every observation

Bimodal outcomes    a deal closes for 100,000 or for nothing; the expected
                    value of 40,000 describes neither case

Heavy tails         the mean is unstable and moves with each new extreme
                    observation

Why it still matters

For repeated, independent, affordable decisions, expected value is exactly the right criterion: over many bets the average converges to it, which is the law of large numbers. It stops being right when the decision is one-off, or when a bad outcome is unrecoverable. A bet with positive expected value and a 5% chance of bankruptcy is not a good bet, because you do not get to play the long run.

Key points

FAQ

The 30-second answer

Expected value is the probability-weighted average of the outcomes: what you would average per attempt if you repeated the situation many times.
The example I would use is a ticket that pays a thousand with probability one in a thousand. Its expected value is one, but the likely outcome is zero, which happens ninety-nine point nine percent of the time. The expected value is a number you can never actually receive.
It matters because expected value is the right criterion for repeated affordable decisions, where the average genuinely converges. It is the wrong one for a single decision, or where a bad outcome is unrecoverable: a bet with positive expected value and a five percent chance of ruin is still a bad bet, because you never reach the long run.

In the interview

Practice this for real