How to calculate expected value
5 min read
Short answer
The expected value of a random variable is the average outcome weighted by how likely each one is. It is the long-run average if you repeat the experiment many times, not necessarily a value you can actually get.
Weighted average, not plain average
If all outcomes were equally likely, the expected value would be the ordinary average. When they are not, each outcome counts in proportion to its probability. Multiply every value by its probability and add.
Linearity: the big shortcut
For any random variables, and , even if and are dependent. This turns many hard problems into easy sums: the expected total of two dice is just .
Worked example
You roll a fair die. If the result is even you win that many dollars; if it is odd you lose $3. What is your expected winnings per roll?
The outcomes and their probabilities:
- 2, 4, 6 each with probability , payoffs .
- 1, 3, 5 each with probability , payoff .
On average you gain $0.50 per roll, even though no single roll pays exactly that.
Try it yourself
A 1000 and pays nothing otherwise. What is the expected net gain per ticket?
Show the answer
Expected payout dollar, so the expected net gain is 1-2=-\1$ per ticket.
Keep going with practice
Expectation and variance are part of Vidi's Linear Algebra & Probability course, with graded problems on weighted averages and linearity.