Random variables and expected value
- Read it, not yetReach the end of the page
- Practice it, not yetAnswer a few questions
- Master it, not yet80% on a drill of 8 or more
A random variable is a number that depends on chance. Its expected value is the long-run average, weighted by probability. Its SD is the risk around that.
Why it matters
Expected value is what a bet is worth if you could make it a thousand times.
Businesses live on repeated bets: insurance, pricing, inventory. Expected value says which pay off; SD says if you survive the bad runs.
- InsurancePremiums start from expected claims, plus a cushion for the swings.
- StartupsA 10% shot at $10 million is worth $1 million, on average.
- InventoryExpected demand sets the order; the SD sets the safety stock.
Finance example
A returns 2% or 14%, 50/50: E = 8%, σ = 6%. B: −6, 6, 12 or 24% with odds 0.1, 0.3, 0.4, 0.2: E = 10.8%, σ = 8.4%. B pays more; A has less risk per unit of return (CV 75% vs 78%).
Check yourself
Expected value of one roll of a four-sided die (1 to 4)?
2.5You never roll a 2.5; it is the long-run average.Toss 3 coins, Y = number of heads. E(Y)?
1.53 × 0.5, or 0(.125) + 1(.375) + 2(.375) + 3(.125).Y: −50 (0.1), 20 (0.5), 80 (0.3), 150 (0.1). Mean?
44−5 + 10 + 24 + 15.
The trap
The mistake people make most on this one.
The expected value is not the most likely outcome, and may be impossible (2.5 on a four-sided die). It is the long-run average.
Formulas
5 formulas and a way to remember them.
- Expected value
- E(Y) = μ = Σ y · P(y)
- Variance
- σ² = Σ (y − μ)² · P(y) = Σ y²P(y) − μ²
- SD and CV
- σ = √σ², CV = σ / μ
- Constants
- E(a + bY) = a + b · E(Y), Var(a + bY) = b² · Var(Y)
- Discrete uniform
- k equally likely values, each with probability 1/k. The mean is the plain average of the values
- Remember it
- Expected value: a bet's long-run worth. SD: how far one try can land. CV: risk per unit of reward, lower is better.
Watch and go deeper
3 free videos and pages.
- StatQuest: Expected Values, Main IdeasWhat an expected value means as a long run average, with a worked example. About 14 minutes.
- jbstatistics: The Expected Value and Variance of Discrete Random VariablesThe formulas for E(X) and Var(X) worked by hand from a probability table. About 11 minutes.
- Seeing Theory: Basic Probability, Expectation and VarianceScroll to Expectation, roll the die 100 times and watch the running mean settle near 3.5, then bias the die. About 8 minutes.