The expected value is the probability-weighted average of all possible outcomes: the number you would average per play if you could repeat a game, bet or decision an enormous number of times. A fair six-sided die has E(X) = (1 + 2 + 3 + 4 + 5 + 6) ÷ 6 = 3.5, even though 3.5 can never come up on a single roll.
Enter the outcomes in one box and their probabilities in the same order in the other. Probabilities can be decimals that add up to 1 or percentages that add up to 100; if they add up to something else, the calculator warns you and rescales them so you still get an answer. Negative outcomes (losses) are fine.
Besides E(X) you get the variance and standard deviation, which show how far a single result typically falls from the average. Two bets can have the same expected value but very different risk. The calculator also adds up the probability of a positive and of a negative outcome and draws the distribution, making it easy to compare insurance, lottery, investment or game choices.
How to use the Expected Value Calculator
- Outcomes (values of X)
- Probabilities (same order): Decimals adding to 1 or percentages adding to 100.
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Each outcome is multiplied by its probability and the products are added. The variance uses the shortcut E(X²) − E(X)², and the standard deviation is its square root. If the probabilities do not sum to 1 they are divided by their total first.
Worked example
A raffle-style game pays 100 with probability 0.05, 20 with probability 0.25, nothing with probability 0.4 and costs 10 (−10) with probability 0.3. E(X) = 100 × 0.05 + 20 × 0.25 + 0 × 0.4 + (−10) × 0.3 = 5 + 5 + 0 − 3 = 7. E(X²) = 500 + 100 + 0 + 30 = 630, so Var(X) = 630 − 49 = 581 and SD = 24.10. You gain something 30% of the time and lose 30% of the time, yet the average result per play is +7.
When expected value is not enough
- Rare catastrophic losses: insurance has a negative expected value for the buyer but removes ruinous risk.
- One-off decisions: with no repetition, the spread (standard deviation) matters as much as the average.
- Utility: people value a certain 50 more than a 50/50 chance of 0 or 100 even though both average 50.
Formula
E(X) = Σ xᵢ × P(xᵢ)
Var(X) = Σ xᵢ² × P(xᵢ) − E(X)² · SD = √Var(X)
Worked example
Inputs: Outcomes (values of X): 100, 20, 0, -10; Probabilities (same order): 0.05, 0.25, 0.4, 0.3.
Results: Expected value E(X) = 7; Check of the probabilities = The probabilities add up to 1 – a valid distribution.; Standard deviation = 24.1039; Variance = 581; Sum of the probabilities entered = 1; Probability of a positive outcome = 30 %.
Key terms
- Expected value
- The probability-weighted mean of a random variable, E(X).
- Random variable
- A quantity whose value is determined by chance.
- Variance
- The expected squared distance from the mean, E(X²) − E(X)².
Frequently asked questions
How do you calculate expected value?
Multiply every outcome by its probability and add the products. For outcomes 100, 20, 0 and −10 with probabilities 0.05, 0.25, 0.4 and 0.3: 5 + 5 + 0 − 3 = 7.
Do the probabilities have to add up to 1?
Yes, for a valid distribution. If yours add to 100 they are read as percentages; any other total triggers a warning and the values are rescaled.
What is the expected value of a die roll?
3.5 for a fair six-sided die. For two dice the expected total is 7.
What does a negative expected value mean?
On average you lose. A bet with a 35% chance to win 100 and a 65% chance to lose 45 has E = 35 − 29.25 = +5.75, but with a 20% chance to win 100 and an 80% chance to lose 45 it is 20 − 36 = −16.
Is the expected value the most likely result?
No. It is a long-run average and may not even be a possible outcome; the most likely outcome is the mode.
Why also show the standard deviation?
It measures risk. Two choices with the same expected value can differ greatly in how much a single result varies.
How is expected value used in a chi-square test?
There "expected count" means row total × column total ÷ grand total (the count you would expect if the variables were independent).