Skip to content
K Knidox Search…
Statistics · Probability

Expected Value

E(X) for a discrete distribution, with the variance and standard deviation that go with it.

Outcome 1-0.9
%
Outcome 20.45
%
Outcome 30.5
%
Probabilities total 100%
Expected value E(X)
0.05Favourable on average

Variance 28.1475 · standard deviation 5.3054

Expected value is the long-run average of a random outcome: multiply each value by its probability and add them up. A game that loses £1 nine times in ten, pays £5 once in eleven and £50 once in a hundred has E(X) = +£0.05 — a slight edge to the player.

An average you may never actually see

Expected value is a weighted mean, not a prediction of any single trial. The game above never pays out five pence; it pays −£1, £5 or £50. The 0.05 is what the average settles towards over many plays, and that is the only sense in which it is expected. A fair die has an expected value of 3.5, a face it does not have.

The law of large numbers is what makes it meaningful: as the number of trials grows, the observed average converges on E(X). Over ten plays the result is noise; over ten thousand it is close to the expectation. That gap is what casinos and insurers run on — each individual outcome is uncertain, the aggregate is not.

Why the variance matters just as much

Two games with the same expected value can feel completely different. One paying ±£1 on a coin flip and one paying ±£1,000 both have E(X) = 0, but only one of them can ruin you. Variance measures that spread — the average squared distance from the mean — and its square root, the standard deviation, puts it back in the original units. Quoting an expected value without it hides the risk entirely.

E(X) = Σ xᵢ · P(xᵢ) · Var(X) = Σ P(xᵢ)·(xᵢ − μ)²

the probabilities must sum to exactly 1, or the distribution is not a distribution

  1. 1
    List every outcome with its probability. Lose £1 with probability 0.90, win £5 with 0.09, win £50 with 0.01.
  2. 2
    Check the probabilities sum to 1. 0.90 + 0.09 + 0.01 = 1.00. If they do not, something is missing or double-counted.
  3. 3
    Multiply each value by its probability. −1 × 0.90 = −0.90, 5 × 0.09 = 0.45, 50 × 0.01 = 0.50.
  4. 4
    Add the products. −0.90 + 0.45 + 0.50 = 0.05, so E(X) = £0.05 per play.
  5. 5
    Work out the spread as well. The variance comes to 28.15 and the standard deviation to 5.31 — far larger than the mean, so single plays swing wildly.

Expected values worth knowing

Each is a weighted mean over the possible outcomes.

SituationExpected valueWhy
One fair die3.5(1+2+3+4+5+6) ÷ 6
Two fair dice summed7Twice the single-die expectation
A fair coin scored 1 for heads0.5Half the trials score 1
A fair bet0Gains and losses balance exactly
A casino gameNegative for the playerThe house edge is the expected loss per stake
An insurance premiumPositive for the insurerPremium exceeds the expected payout

Where expected value stops being the right guide

A positive expected value does not make a decision correct. The St Petersburg game has an infinite expectation yet nobody would pay much to play it, because almost every outcome is small and the huge ones are vanishingly rare. More practically, a bet with a positive edge is still a bad idea if losing the stake would be catastrophic — which is why risk is judged on the distribution rather than its mean alone.

Two technical notes. Expectation is linear: E(aX + b) = aE(X) + b, and E(X + Y) = E(X) + E(Y) whether or not X and Y are independent, which makes many problems far easier than they look. And the tool here handles discrete outcomes; a continuous variable replaces the sum with an integral, ∫x·f(x)dx, though the idea is identical.

What does expected value mean?
The long-run average of a random quantity — each outcome weighted by its probability. It describes where the average of many repetitions settles, not what any single trial will produce.
Why can the expected value be impossible?
Because it is a weighted average, not an outcome. A fair die has an expected value of 3.5 even though no face shows 3.5, just as an average household can have 1.8 children.
Must the probabilities add to 1?
Yes. If they do not, either an outcome has been left out or one has been counted twice, and the weighted average is meaningless until that is fixed.
What is the difference between expected value and variance?
Expected value is where the distribution is centred; variance is how widely it spreads around that centre. Two situations can share a mean and differ enormously in risk, which only the variance reveals.
How many trials before the average matches E(X)?
There is no fixed number — the convergence is gradual and depends on the variance. A low-variance quantity settles quickly; a game with rare large payouts can take an enormous number of plays before the average looks like the expectation.
Is a positive expected value always worth taking?
No. If a loss would be ruinous, the expectation alone is the wrong guide, because you may not survive long enough for the long-run average to arrive. The spread of outcomes matters alongside the mean.
How does expected value work for continuous variables?
The sum becomes an integral: E(X) = ∫x·f(x)dx over the range, where f is the probability density. The idea is unchanged — each value weighted by how likely it is.