Expected Value Calculator
Compute the probability-weighted average of a discrete random variable — the long-run result per trial — along with the variance and standard deviation that describe how much individual outcomes swing around it.
Before You Calculate
- List every possible outcome exactly once, with its numeric value — payoffs, counts, gains, or losses (negative values are fine).
- Enter each probability as a decimal between 0 and 1; a 15% chance is 0.15.
- The probabilities of a complete distribution must sum to 1. The calculator warns you if they do not, so you can spot a missing outcome.
What the Tool Returns
Expected value E(X): The sum of each outcome times its probability — what you average per trial over many repetitions.
Variance and standard deviation: The probability-weighted spread around E(X), the standard measure of risk.
Probability sum: A completeness check on the distribution you entered.
Related Calculators
Standard Deviation Calculator
Calculate standard deviation, variance, and spread with clear statistical outputs.
Binomial Distribution Calculator
Compute exact and cumulative binomial probabilities with mean, variance, and standard deviation.
Probability Calculator
Calculate combinations, events, and basic probability outcomes.
The Expected Value Formula
For a discrete random variable X with outcomes x₁, x₂, …, xₙ and probabilities p₁, p₂, …, pₙ:
E(X) = Σ xᵢ pᵢ = x₁p₁ + x₂p₂ + … + xₙpₙ
Var(X) = Σ (xᵢ − E(X))² pᵢ
SD(X) = √Var(X)
Where:
- xᵢ = the numeric value of outcome i
- pᵢ = the probability of outcome i, with Σ pᵢ = 1
- E(X) = expected value, also written μ
- Var(X), SD(X) = spread of outcomes around E(X)
Expected value is a weighted mean: outcomes that are more likely pull the result toward themselves in exact proportion to their probability. An equivalent shortcut for the variance is Var(X) = E(X²) − [E(X)]², which computes the same number from the probability-weighted average of the squared outcomes.
A Long-Run Average, Not a Prediction
E(X) rarely tells you what will happen on any single trial — it tells you what the average converges to over many trials, a guarantee formalized by the law of large numbers. A fair six-sided die has E(X) = 3.5, a value the die can never show. Roll it 10,000 times, though, and the running average will settle very close to 3.5.
This is why expected value is the right lens for decisions that repeat — pricing thousands of insurance policies, running a promotion across many customers — and a potentially misleading lens for one-shot, high-stakes choices, where the full distribution of outcomes matters more than its average.
Same Expectation, Different Risk
Two prospects can share an expected value and still be radically different choices. A guaranteed $8 has E(X) = 8 with a standard deviation of 0. A gamble paying $100 with probability 0.05, $20 with probability 0.15, and $0 otherwise also has E(X) = 8 — but its standard deviation is about 22.27, nearly three times the expectation itself.
That spread is precisely what the variance output captures. Comparing E(X) values ranks alternatives by average return; comparing standard deviations ranks them by volatility. Sound decisions usually weigh both, which is why finance pairs expected return with risk and why insurers charge a premium above the expected loss.
Real Applications
- Insurance pricing: The pure premium of a policy is the expected claim cost — each possible payout times its probability — before expenses and margin are added.
- Games and lotteries: The expected payoff of a ticket, almost always below its price, quantifies the house edge.
- Business decisions: Decision trees value each branch by the expected payoff of its outcomes, letting managers compare launch, delay, and abandon options on one scale.
- Inventory and operations: Expected demand drives order quantities, and the standard deviation around it sets the safety stock.
Worked Example: Valuing a Warranty Program
An electronics retailer models the per-unit cost of a one-year warranty. Historical data says each unit sold has a 5% chance of a major repair costing $100, a 15% chance of a minor repair costing $20, and an 80% chance of no claim ($0). What should the retailer expect to pay per unit?
- Check the distribution: 0.05 + 0.15 + 0.80 = 1, so the outcomes are complete.
- Weight each outcome: E(X) = 100 × 0.05 + 20 × 0.15 + 0 × 0.80 = 5 + 3 + 0 = $8 per unit.
- Measure the spread: Var(X) = (100 − 8)² × 0.05 + (20 − 8)² × 0.15 + (0 − 8)² × 0.80 = 423.2 + 21.6 + 51.2 = 496.
- Standard deviation: √496 ≈ $22.2711.
Interpretation: across thousands of units the warranty costs about $8 each, so pricing the warranty at, say, $15 covers expected claims with margin. The large standard deviation relative to the mean reflects that most units cost nothing while a few cost $100 — individual outcomes are lumpy even though the average is stable. Entering the three rows (100, 0.05), (20, 0.15), and (0, 0.80) reproduces E(X) = 8, variance 496, and standard deviation 22.2711.
Frequently Asked Questions
Can the expected value be a number that never actually occurs?
Yes, and it usually is. A fair die has E(X) = 3.5 even though no face shows 3.5, and the warranty example averages $8 although every actual claim costs $0, $20, or $100. Expected value is a long-run average across trials, not a forecast of any single trial.
What does a negative expected value mean?
On average you lose that amount per trial. Casino games and lottery tickets have negative expected values for the player by design - a ticket with E(X) = -0.40 costs you 40 cents per play in the long run. A negative expectation can still be rational to accept when it buys protection, which is exactly what insurance premiums do.
Why do my probabilities need to sum to 1?
A probability distribution must account for every possible outcome exactly once, and 'something happens' has probability 1. If your entries sum to 0.9, an outcome is missing or a value is mistyped, and E(X) will be biased. This calculator warns you rather than blocking, because intermediate what-if entries are sometimes useful, but final results should always come from probabilities summing to 1.
How is expected value different from a simple average?
A simple average weights every observation equally at 1/n and describes data you have already collected. Expected value weights each possible outcome by its probability and describes a random process before you observe it. They connect through the law of large numbers: as trials accumulate, the sample average converges to the expected value.
Should I always choose the option with the highest expected value?
Not necessarily. Expected value ignores risk: a coin flip between $0 and $1,000,000 has a higher E(X) than a certain $400,000, yet many people reasonably prefer the certainty. For repeated, low-stakes decisions, maximizing E(X) is sound; for one-shot or high-stakes choices, weigh the variance and worst cases too - that is what utility theory formalizes.