Expected Value Calculator — Step-by-Step Solutions
The Expected Value Calculator computes E(X) from probability distributions, frequency tables, or game scenarios. It also calculates variance and standard deviation to give you a complete picture of the distribution.
Enter your values and their probabilities or frequencies, and get instant results with step-by-step working. The game mode tells you whether a game is fair or which side has the advantage.
Your calculations will appear here
How to Use the Expected Value Calculator
- Choose a mode: From Probability Table when you know the probability of each outcome, From Frequency Table when you have counts, or Expected Value of a Game for bets and payoffs.
- Enter one row for each outcome: the value (x) in the first column and the probability or frequency in the second. Use Add row for more outcomes and the x button to delete one.
- For probabilities, the values must add up to 1 (a small rounding tolerance is allowed). For a frequency table the counts are converted to probabilities for you.
- In game mode, enter the net gain or loss for each outcome: a loss is a negative number. The result tells you the average win or loss per play and whether the game is fair.
Formula and Theory
The expected value is the long-run average of a random quantity: the value you would see on average if you repeated the experiment many times. For a discrete variable it is the sum of each outcome times its probability: E(X) = sum of x x P(x).
It does not have to be a possible outcome. A fair die has an expected value of 3.5, even though no roll can show 3.5. It describes the centre of the distribution, not a single result.
The variance, E(X^2) - (E(X))^2, and the standard deviation, its square root, measure how widely the outcomes spread around the expected value. Two bets can have the same expected value but very different risk.
In a game, the expected value of the net gain tells you whether the game favours you. A positive value means you win on average, a negative value means you lose on average, and zero is a fair game. Frequencies are turned into probabilities by dividing by the total count.
Worked Examples
Example 1: Fair die
Problem: Find the expected value, variance and standard deviation of a single roll of a fair die.
Solution: Each face has probability 1/6. E(X) = (1 + 2 + 3 + 4 + 5 + 6) / 6 = 21 / 6 = 3.5. E(X^2) = (1 + 4 + 9 + 16 + 25 + 36) / 6 = 91 / 6 = 15.1667. Variance = 15.1667 - 3.5^2 = 15.1667 - 12.25 = 2.9167. SD = sqrt(2.9167) = 1.7078.
Answer: E(X) = 3.5, Var = 2.9167, SD = 1.7078
Example 2: From a frequency table
Problem: In a survey, 5 households have 0 pets, 12 have 1, 8 have 2 and 5 have 3. Find the expected number of pets per household.
Solution: Total households = 5 + 12 + 8 + 5 = 30. E(X) = (0 x 5 + 1 x 12 + 2 x 8 + 3 x 5) / 30 = (0 + 12 + 16 + 15) / 30 = 43 / 30 = 1.4333. E(X^2) = (0 + 12 + 32 + 45) / 30 = 2.9667, so variance = 2.9667 - 1.4333^2 = 0.9122 and SD = 0.9551.
Answer: E(X) = 1.4333 pets, SD = 0.9551
Example 3: A fair raffle
Problem: A ticket costs $10. There is a 10% chance of winning a $100 prize. Is the game fair?
Solution: Net outcomes: win $100 and pay $10 gives +$90 with probability 0.1; otherwise lose $10 with probability 0.9. E = 90 x 0.1 + (-10) x 0.9 = 9 - 9 = 0.
Answer: E = $0 per play, so the game is fair
Example 4: A game that favours the house
Problem: In American roulette (38 pockets), a $1 bet on one number pays $35 profit if it hits and loses the $1 otherwise. What is the expected result per spin?
Solution: P(win) = 1/38 and P(lose) = 37/38. E = 35 x (1/38) + (-1) x (37/38) = (35 - 37) / 38 = -2/38 = -0.0526.
Answer: About -$0.053 per $1 bet (the house keeps 5.26%)
Frequently Asked Questions
What is expected value in simple terms?
Can the expected value be a number that never happens?
Why must the probabilities add up to 1?
How do I calculate the expected value of a bet?
What does a positive expected value guarantee?
How is expected value related to the mean?
Related Statistics Calculators
Probability Calculator
Calculate probability of events, complements, unions, and intersections. Free online probability calculator for statistics.
Standard Deviation Calculator
Calculate standard deviation, variance, mean, and more for any dataset. Supports population and sample statistics. Free online tool.
Z-Score Calculator
Calculate z-scores, find values from z-scores, and determine probabilities. Free online z-score calculator with bell curve visualisation.
Binomial Calculator
Calculate binomial probabilities, cumulative distributions, and expected values. Free online binomial distribution calculator with bar chart.
Normal Distribution Calculator
Calculate probabilities for normal distributions. Find areas under the bell curve, percentiles, and inverse values. Free online tool.
Correlation Calculator
Calculate Pearson correlation coefficient, R-squared, and regression line. Free online correlation calculator with scatter plot.