Expected Value Calculator

Compute the expected value E(X) = Σ xᵢ·pᵢ of a discrete random variable. Enter each possible outcome and its probability, and the calculator returns the long-run average.

Quick Facts

Formula
E(X) = Σ xi · pi
Each outcome weighted by its probability; probabilities should sum to 1. A fair die gives E(X) = 3.5.

Your Results

Calculated
Expected value E(X)
-
Probability-weighted mean
Total probability
-
Should equal 1

Ready

Enter your outcomes and probabilities, then press Calculate.

What the expected value tells you

The expected value of a discrete random variable X, written E(X) or μ, is the probability-weighted average of every outcome it can take. If X can take values x₁, x₂, …, xₙ with probabilities p₁, p₂, …, pₙ, then:

E(X) = Σ xᵢ · pᵢ = x₁p₁ + x₂p₂ + … + xₙpₙ

You multiply each outcome by how likely it is, then add up the products. Because it is an average over the whole distribution, the expected value is a single number that summarizes the "center of mass" of the outcomes. It is what you would converge to if you repeated the experiment many, many times and averaged the results — this is the meaning made precise by the law of large numbers.

Why the expected value is often not a possible outcome

A common misconception is that the expected value must be one of the outcomes. It usually is not. Roll a fair six-sided die: the outcomes are 1 through 6, each with probability 1/6, so E(X) = (1+2+3+4+5+6)/6 = 21/6 = 3.5. You can never roll a 3.5, yet 3.5 is the long-run average roll. The expected value is a property of the distribution, not a prediction of any single trial.

Probabilities must sum to 1

For a valid probability distribution, every pᵢ is between 0 and 1 and the probabilities sum to exactly 1 (100%). If your probabilities do not add to 1, either an outcome is missing or a value is mistyped, and the resulting E(X) will be biased. This calculator reports the total probability alongside the answer so you can check it at a glance. If you only have relative weights rather than true probabilities, divide each weight by the sum of all weights first so they normalize to 1.

Common reference values

  • Fair coin, heads = 1, tails = 0: E(X) = 0.5.
  • Fair six-sided die: E(X) = 3.5. A fair 20-sided die gives 10.5, and in general a fair die with faces 1…n has E(X) = (n+1)/2.
  • Sum of two fair dice: E(X) = 7 (each die averages 3.5, and expectation adds).
  • Single European roulette number (pays 35:1): stake $1, win $35 with probability 1/37 and lose $1 with probability 36/37, so E(net) = 35·(1/37) − 1·(36/37) = −1/37 ≈ −$0.027 per $1 bet.
  • Bernoulli trial (success = 1 with probability p): E(X) = p.

Expected value of a bet or gamble

A frequent use is deciding whether a wager or investment is worth taking. Set each outcome to the net gain or loss (winnings minus stake), weight by probability, and sum. A positive expected value means the bet favors you on average; a negative one means it favors the house. Nearly every casino game has a negative expected value for the player by design — that negative number is the house edge.

Frequently Asked Questions

What is the formula for expected value?
For a discrete random variable, E(X) = Σ xᵢ·pᵢ: multiply each possible outcome by its probability and add the products. The probabilities must be non-negative and sum to 1. For a continuous variable the sum becomes an integral, E(X) = ∫ x·f(x) dx, but this calculator handles the discrete case.
Do the probabilities have to add up to 1?
Yes, for a proper probability distribution. Each probability lies between 0 and 1 and they sum to exactly 1. If you have raw counts or weights instead, normalize them first by dividing each by their total. This calculator shows the running total so you can confirm it equals 1 before trusting the result.
Does the expected value have to be one of the outcomes?
No. It is a weighted average, so it is frequently a value that can never occur on a single trial — the fair die's expected value of 3.5 is the classic example. Treat it as a long-run average, not a forecast of the next result.
What is the difference between expected value and mean?
For a probability distribution they are the same thing: the expected value is the (population) mean of the random variable. The word "mean" is also used for the simple average of a data sample, which is the special case where every observed value is equally likely (each has probability 1/n).