How Math Works
Probability & Statisticsconceptintermediate

Expected Value & Variance

The expected value is a probability-weighted 'long-run average'.

The formula

E(X) = Σ xᵢ pᵢ

How to read it: the expected value multiplies each possible outcome by its probability and adds them up — the long-run average

xᵢ
each possible value (outcome)
pᵢ
the probability that value occurs
E(X)
the expected value — the probability-weighted average

The hook

Roll a die — what's the average number? 3.5 — a value that never actually comes up is the 'expected value'.

In plain words

When you know the probabilities of the outcomes, it's each value times its probability, all summed. Repeat enormously many times and it's the 'long-run average' things settle to.

The intuition

The expected value is a center of mass using probabilities as weights. Frequent values (large p) pull harder on the average. So it tells you not any single result but 'on average, over the long run, how much'. Variance measures how scattered the values are around that average.

How it's built

E(X)=Σ xᵢpᵢ adds up 'value × probability'. The variance V(X) averages the squared distance of each value from the mean, growing with the spread. The standard deviation takes the root of the variance to return to the original units.

Example

A fair die: E(X) = 1·(1/6)+2·(1/6)+…+6·(1/6) = (1+2+3+4+5+6)/6 = 21/6 = 3.5.

Common mistake

The expected value is neither the 'most frequent value' nor a value that actually occurs. A die's expected value 3.5 isn't even on a face — it's purely a 'long-run average'.

Where it's used

Pricing insurance and lotteries, expected investment returns, game-design balance, decision-making criteria — anywhere you measure the 'average value of an uncertain outcome'.

Where it came from

The idea of expected value was born in the 17th-century work of Pascal, Fermat, and Huygens on dividing gambling stakes 'fairly'.

Prerequisites

Quick check

What is the expected value of one fair die?

  • 3
  • 3.5
  • 4
  • 6

Practice

A coin game pays 1000 won for heads and 0 for tails. Find the expected value.

Answer: 500

Solution:
  1. E(X) = 1000·(1/2) + 0·(1/2)
  2. = 500 + 0 = 500

Takeaway: Expected value = Σ(value × probability).

X takes values 1, 2, 3 with probabilities 1/2, 1/4, 1/4. Find E(X).

Answer: 1.75

Solution:
  1. E(X) = 1·(1/2) + 2·(1/4) + 3·(1/4)
  2. = 0.5 + 0.5 + 0.75 = 1.75

Takeaway: The average is pulled toward higher-probability values.

Compute the expected value of a fair die directly.

Answer: 3.5

Solution:
  1. (1+2+3+4+5+6)/6 = 21/6
  2. = 3.5

Takeaway: With equal probabilities the expected value is just the average.

Explain in one line why variance measures the 'spread' of data.

Answer: undefined

Solution:
  1. It averages the squared distance of each value from the mean
  2. The more scattered, the larger those squared distances
  3. So a large variance means widely spread data

Takeaway: Variance is 'how far the values scatter from the mean'.

Keep learning in the app

Touch-and-drag widgets, self-graded practice and daily formulas — free on iOS and Android.