Expected Value
Reference for expected value E(X) = Σ[x·P(x)] and E(X) = ∫x f(x)dx.
Covers variance, linearity property, and applications in gambling and risk analysis.
The Formula
The expected value is the long-run average of a random variable over many trials. It tells you what outcome to expect "on average" when an experiment is repeated many times.
Variables
| Symbol | Meaning |
|---|---|
| E(X) | Expected value of random variable X |
| xᵢ | Each possible outcome |
| P(xᵢ) | Probability of each outcome |
| Σ | Sum over all possible outcomes |
Example 1
Expected value of a fair six-sided die
E(X) = 1(1/6) + 2(1/6) + 3(1/6) + 4(1/6) + 5(1/6) + 6(1/6)
= (1 + 2 + 3 + 4 + 5 + 6) / 6 = 21/6
= 3.5
Example 2
A lottery ticket costs $2. You win $100 with probability 0.01 and $0 otherwise.
E(X) = 100(0.01) + 0(0.99) = 1.00
Expected profit = 1.00 - 2.00 (cost)
= -$1.00 (you lose $1 on average per ticket)
When to Use It
Use the expected value formula when:
- Evaluating whether a gamble or investment is worth taking
- Calculating the mean of a probability distribution
- Making decisions under uncertainty (decision theory)
- Analyzing insurance premiums, game strategies, or business projections
Key Notes
- Expected value is a long-run average, not a guaranteed single-trial result — rolling a fair die once will never give 3.5; E(X) describes behavior over many repetitions
- Linearity property: E(aX + b) = a·E(X) + b; for independent variables, E(X + Y) = E(X) + E(Y) — this simplifies complex probability calculations dramatically
- Expected value alone is insufficient for decision-making under risk — two options with the same E(X) can have very different variances; a lottery ticket and a low-risk bond can share an expected value while differing enormously in spread
- For continuous distributions the formula becomes E(X) = ∫x·f(x)dx; for discrete it is Σx·P(x) — same concept, same interpretation, different notation
Key Notes
- Discrete: E[X] = Σ xᵢ × P(xᵢ): Weighted average of all possible values, weighted by their probabilities. E[X] need not be a possible value of X — the expected value of a fair die is 3.5, which is never actually rolled.
- Linearity: E[aX + bY] = aE[X] + bE[Y]: This holds regardless of whether X and Y are independent or correlated. Linearity is the most powerful and commonly applied property — it lets you decompose complex expected values into simpler components without worrying about dependence structure.
- E[X²] ≠ (E[X])² in general: The difference E[X²] − (E[X])² = Var(X) ≥ 0 — always non-negative (Jensen's inequality for convex functions). Confusing E[X²] with (E[X])² is a common source of errors in probability calculations.
- Law of Large Numbers: As the sample size n → ∞, the sample mean x̄ converges in probability to E[X]. This is the mathematical foundation of insurance, casinos, and all statistical inference — averages become predictable even when individual outcomes are random.
- Applications: Expected value is used in insurance pricing (expected loss), casino game design (house edge), financial derivatives valuation (risk-neutral expected payoff), decision theory (maximize expected utility), A/B test analysis (expected effect size), and reinforcement learning (expected cumulative reward).