letx=

Probability and statistics

Expected value

The long-run average outcome of a random variable: each value weighted by its probability.

E(X)=∑xipi
VarianceVar(X)=∑pi(xi−E(X))2

Calculator

The live calculator needs JavaScript. The worked example below shows the same steps it would.

What the symbols mean

E(X)
the expected value (mean) of X
xi
the possible values xi
pi
the probability pi of each value; together they must add up to 1

When to use it

Use it to judge games, bets, insurance and business decisions: a negative expected value means you lose on average over many plays. Enter the values and their probabilities as two lists in the same order (fractions like 1/6 work). The expected value need not be a possible outcome: a die never shows 3.5.

Worked example

A game pays 10 points with probability 0.1, pays 2 points with probability 0.3, and costs 1 point (a value of −1) with probability 0.6. What is the expected value per game?

  1. Start from the formula: multiply each value by its probability and add.

    E(X)=∑xipi
  2. The probabilities add up to 1, so the list is complete.

    E(X)=10×0.1+2×0.3+(−1)×0.6=1+0.6+(−0.6)=1
  3. For the spread: the variance is ∑pi(xi−E)2 = 10.8, so the standard deviation is 3.28634.

Answer E(X) = 1 point per game

Why it works

Over many repetitions, value xi turns up in about a fraction pi of them, so the average of all the outcomes approaches ∑xipi (the law of large numbers).

Common mistakes

  • Forgetting an outcome, so the probabilities do not add up to 1.
  • Ignoring the cost of playing, which belongs in the values as a negative number.
  • Expecting the expected value to happen in a single play; it is an average over many.