Skip to main content
Daily Math Minute

Unit 4: Probability, Random Variables & Probability Distributions

Mean & Variance of Random Variables

Calculating the mean and variance of a discrete random variable.

Advanced25 min lesson2 min readUpdated August 12, 2026Author not yet attributed

Prerequisites

  • Conditional Probability

The Long-Run Average of an Outcome That Varies

A raffle ticket pays $0 with probability 0.70, $10 with probability 0.20, $50 with probability 0.08, and $100 with probability 0.02. Before reading on: no single ticket will ever actually win exactly some 'average' amount — so what would it even mean to compute one number summarizing this raffle's typical payout?

Definition — Mean and Variance of a Discrete Random Variable

For a discrete random variable X with possible values x and probabilities p(x), the mean (expected value) is E(X) = Σ x·p(x), and the variance is Var(X) = Σ(x − μ)²·p(x). This is the same weighted-average structure as a sample's mean and variance, just weighting by probability instead of by relative frequency in a sample.
E(X)=xp(x)E(X) = \sum x \cdot p(x)

Worked Example — Computing Expected Value and Variance

For the raffle: E(X) = 0(0.70) + 10(0.20) + 50(0.08) + 100(0.02) = 0 + 2 + 4 + 2 = 8. So E(X) = $8. This does not mean any ticket wins $8 — every actual ticket wins exactly $0, $10, $50, or $100. It means that over many, many tickets, the average payout would settle near $8. Var(X) = (0−8)²(0.70) + (10−8)²(0.20) + (50−8)²(0.08) + (100−8)²(0.02) = 44.8 + 0.8 + 141.12 + 169.28 = 356, so the standard deviation is √356 ≈ 18.87 — a large typical spread, reflecting how different the four possible outcomes are from each other.

E(X) also supports a practical decision: if a ticket costs $10 to buy, the expected net result is E(X) − 10 = 8 − 10 = −$2 per ticket — on average, a player loses $2 per ticket in the long run, even though many individual tickets win more than that.

Tip

Expected value describes long-run average behavior across many repetitions — it is not a prediction about any single outcome, which is why $8 doesn't even appear among the raffle's four actual possible payouts.

Common Mistakes

  • Treating E(X) as the most likely single outcome.

    The most likely outcome here is $0 (probability 0.70) — E(X) = $8 is a probability-weighted average across all outcomes, not the mode, and the two can be very different.

  • Computing variance using the sample formula's n−1 correction.

    A random variable's variance sums over its actual probabilities, p(x) — there's no 'minus one' correction here, since this isn't estimating a variance from a limited sample; the probabilities are treated as exactly known.

Key Takeaways

  • E(X) = Σx·p(x) is a probability-weighted average — the long-run average outcome over many repetitions, not a prediction about any one trial.
  • Var(X) = Σ(x−μ)²p(x) measures the typical squared distance of outcomes from the mean, weighted by probability.
  • Expected value can directly answer practical questions, like whether a game or ticket is a good deal on average.

Summary

Mean and variance describe any discrete random variable. The next lesson studies two specific, especially common random-variable patterns — repeated yes/no trials with a fixed probability of success.