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
- Expected value is a long-run average, not a prediction for one trial.
- It can be a value that no single outcome can produce.
- With skewed payoffs the mean can sit above nearly every observation, which is why the median often describes experience better.
- It is the right tool for repeated affordable decisions and the wrong one for ruinous ones.
- Report the distribution alongside it: a range or a median tells the reader what actually tends to happen.
FAQ
- How does this relate to the median? The median is the typical outcome; the mean is the long-run average. On skewed data they differ, and both are worth quoting.
- Is expected value always the right decision rule? No. Utility is often non-linear in money, which is why insurance is rational despite negative expected value.
- Where does this show up in product work? Expected revenue per user, expected value of a lead, and any model score used to prioritize, all of which are averages over unlike cases.
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
- What they are checking: the definition, an example where the expected value is not a possible outcome, and the long-run versus one-shot distinction.
- Common mistake: treating the expected value as a prediction of the next observation.