Expected Value Calculator
Find the expected value E[X], variance, and standard deviation of a discrete random variable. Enter your outcomes and their matching probabilities to get the complete distribution summary, a per-outcome weighted breakdown table, and a plain-English interpretation of the results.
Formula
Worked example
For outcomes 10, -5, 0 with probabilities 0.2, 0.3, 0.5: E[X] = (10 x 0.2) + (-5 x 0.3) + (0 x 0.5) = 2 - 1.5 + 0 = 0.5. E[X^2] = (100 x 0.2) + (25 x 0.3) + (0 x 0.5) = 20 + 7.5 + 0 = 27.5. Var(X) = 27.5 - 0.5^2 = 27.25. Sigma(X) = sqrt(27.25) = 5.22.
What expected value means
The expected value of a discrete random variable, written E[X], is the probability-weighted average of all the values it can take. You multiply each outcome by the probability of that outcome and sum the products. The result is the long-run average you would converge toward if you repeated the experiment many times. It is important to understand that the expected value need not be a value the variable can actually take: a standard die has an expected value of 3.5 even though no face shows 3.5. Expected value is the center of gravity of the distribution, not a prediction of any single trial.
Variance and standard deviation of a discrete distribution
The variance, Var(X), measures how spread out outcomes are around the expected value. It is calculated as E[X^2] minus (E[X])^2, where E[X^2] is the probability-weighted average of the squared outcomes. The standard deviation sigma(X) is simply the square root of the variance, bringing the spread back into the same units as the outcomes. A high standard deviation means results can land far from the expected value even if the long-run average is favorable, while a low standard deviation means outcomes cluster closely around E[X]. Together, E[X] and sigma(X) give a much fuller picture of a distribution than the expected value alone.
Why the probabilities should sum to one
A complete probability distribution assigns a probability to every possible outcome, and because one of those outcomes must occur, the probabilities must add up to exactly 1 (or 100%). If your probabilities sum to less than or more than 1, the distribution is incomplete or double-counts, and both the expected value and variance become hard to interpret. This calculator reports the running total so you can verify it, and it accepts probabilities either as fractions like 0.25 or as percentages like 25. When the total drifts away from 1, treat the results as a warning sign to recheck your numbers before relying on the answer.
Where expected value is used
Expected value is the backbone of decision-making under uncertainty. Gamblers and casinos use it to determine whether a bet has a positive or negative edge; insurers use it to price premiums against the probability and cost of claims; investors use it to weigh potential returns against their likelihoods; engineers use it to quantify risk in reliability models. A positive expected value means the average outcome works in your favor over the long run, while a negative one means it works against you. Crucially, expected value describes the average over many repetitions, so it is most meaningful when a decision is repeated. A single high-stakes gamble may still be unwise even when its expected value is positive if the standard deviation is large and you cannot sustain losses.
Key distribution statistics and their meaning
| Statistic | Formula | What it tells you |
|---|---|---|
| E[X] (expected value) | Sum of x * P(x) | The long-run average outcome per trial |
| Var(X) (variance) | E[X^2] - (E[X])^2 | Average squared distance from the mean; higher = more spread |
| sigma(X) (std dev) | sqrt(Var(X)) | Typical spread in the same units as the outcomes |
| Probability total | Sum of P(x) | Should equal 1 for a valid distribution |
The three statistics this calculator computes and how to interpret each one.
Frequently asked questions
Can the expected value be a number none of my outcomes equal?
Yes, and that is normal. The expected value is a weighted average, so it usually lands between your outcomes rather than on one of them. A fair six-sided die has an expected value of 3.5 even though it can only show whole numbers from 1 to 6. Think of it as the long-run average, not a value you will actually observe on any single trial.
Should I enter probabilities as decimals or percentages?
Either works. You can enter 0.25 or 25 for a one-in-four chance, the calculator detects values above 1 and treats them as percentages. Whichever style you use, keep it consistent across all outcomes, and check the probability total output: for a valid distribution it should equal 1 (or 100%).
What does a negative expected value tell me?
A negative expected value means that over many repetitions the average outcome is a loss. Most casino games have a negative expected value for the player, which is the house edge. A positive expected value means the average outcome favors you, and a zero expected value describes a fair, break-even proposition over the long run.
How do I interpret variance and standard deviation here?
Variance measures how spread out outcomes are around the mean: a variance of 0 means all outcomes are the same, while a large variance means outcomes can differ wildly from E[X]. The standard deviation is the square root of the variance and is in the same units as your outcomes, making it easier to interpret. For example, if E[X] = 5 and sigma = 3, you know typical outcomes range roughly between 2 and 8, even though individual trials can land anywhere.
What is the relationship between E[X^2] and variance?
E[X^2] is the expected value of the squared outcomes, computed by weighting each x^2 by its probability and summing. The variance formula Var(X) = E[X^2] minus (E[X])^2 follows from expanding the definition of variance as the expected squared deviation from the mean. This shortcut formula is often easier to compute than summing (x - mu)^2 * P(x) for each outcome directly.
Can I use this calculator for a coin flip or dice roll?
Yes. For a fair coin where heads = 1 and tails = 0, enter outcomes 1, 0 and probabilities 0.5, 0.5. You get E[X] = 0.5 and sigma = 0.5. For a fair six-sided die, enter outcomes 1, 2, 3, 4, 5, 6 and probabilities 0.1667 for each (or enter six equal probabilities that sum to 1). The expected value is 3.5 and the standard deviation is about 1.7078.