Expected Value Calculator
Calculate mathematical expectation for discrete probability distributions.
Enter outcome values and their probabilities to compute E[X], variance, and standard deviation.
Expected Value Calculator
Calculate mathematical expectation for discrete probability distributions.
Outcome ValueProbability
About the Expected Value Calculator
The expected value, also known as the mathematical expectation or mean of a probability distribution, is one of the most important concepts in probability theory and statistics. It represents the long-run average outcome of a random experiment if it were repeated many times under identical conditions. For a discrete random variable X with outcomes x₁, x₂, …, xₙ and corresponding probabilities p₁, p₂, …, pₙ, the expected value is defined as E[X] = Σ xᵢ pᵢ.
The expected value is not necessarily a value that the random variable can actually take — it is a weighted average of all possible outcomes. For example, rolling a fair six-sided die has an expected value of 3.5, even though 3.5 is not a face on the die. This interpretation as a long-run average is formalized by the Law of Large Numbers, which states that the sample mean converges to the expected value as the number of trials increases.
This calculator also computes the variance Var(X) = E[(X − E[X])²] = E[X²] − (E[X])², which measures how spread out the distribution is around its mean. The standard deviation σ = √Var(X) is the square root of the variance and is expressed in the same units as X, making it easier to interpret practically.
Expected value has countless applications across science, economics, finance, and engineering. In decision theory, it forms the basis of expected utility maximization — the idea that rational agents choose the action with the highest expected payoff. In insurance, actuaries use expected value to price policies: the premium must cover the expected payout plus operating costs and profit margin. In game design, expected value determines whether a game is fair. In portfolio theory, the expected return of an investment portfolio is the weighted average of the expected returns of its assets.
When working with the calculator, be sure that all probabilities are non-negative and sum to exactly 1 (within a small tolerance). If the probabilities do not sum to 1, the distribution is not properly defined and the expected value calculation will not be meaningful. Common mistakes include entering percentages instead of decimal probabilities (e.g., entering 25 instead of 0.25) or forgetting to account for all possible outcomes.
Examples
These examples illustrate how expected value applies across different real-world scenarios.
| Outcomes & Probabilities | E[X] | Notes |
|---|---|---|
| Die: values 1–6, each with probability 1/6 ≈ 0.1667 | E[X] = 3.5 | Fair six-sided die; classic textbook example |
| Investment: +$1000 (30%), +$500 (40%), −$200 (20%), −$500 (10%) | E[X] = $410 | Positive expected return despite downside risk |
| Insurance: $0 payout (95%), $5,000 (4%), $25,000 (1%) | E[X] = $450 | Average annual payout per policy; used for premium pricing |
| Quality control: $0 cost (85%), $50 (10%), $150 (4%), $500 (1%) | E[X] = $15 | Expected defect cost per unit in manufacturing |
How to Use This Calculator
- Enter each possible outcome in the Outcome Value field — this can be any real number (positive, negative, or zero) representing the payoff or result.
- Enter the corresponding probability in the Probability field — this must be a decimal between 0 and 1 (e.g., enter 0.25 for 25%).
- Add more outcome rows using the Add Outcome button until all possible outcomes are listed.
- Verify that the probabilities sum to 1 before clicking Calculate Expected Value — the calculator will show an error if they do not.
- Click Calculate Expected Value to see E[X], variance, standard deviation, and the sum of probabilities.
Frequently Asked Questions
What is the expected value?
The expected value E[X] is the probability-weighted average of all possible outcomes of a random variable. It represents the long-run mean you would observe if the experiment were repeated many times. Formally, E[X] = Σ xᵢ × pᵢ, where xᵢ is each possible outcome and pᵢ is its probability.
Do the probabilities have to sum to exactly 1?
Yes, for a valid probability distribution the probabilities must sum to exactly 1 (or very close to 1 within rounding tolerance). If they do not, the distribution is not properly specified and the expected value is meaningless. This calculator checks the sum and will show an error if it deviates from 1 by more than 1%.
What is the difference between expected value and average?
The terms are closely related but used in different contexts. 'Average' (or sample mean) refers to the arithmetic mean of an observed set of data values. 'Expected value' refers to the theoretical mean of a probability distribution — the mean you would expect to observe in the long run. As sample size grows, the sample mean converges to the expected value (Law of Large Numbers).
Can the expected value be negative?
Yes, the expected value can be any real number, including negative values. A negative expected value means the process is unfavorable on average — for example, most casino games have a negative expected value for the player. A positive expected value means the process is favorable on average, which is why all legitimate insurance and investment products are priced to have positive expected value for the provider.
What does variance tell me about a distribution?
Variance Var(X) = E[(X − E[X])²] measures the average squared deviation from the mean. A high variance means outcomes are widely spread — the distribution has heavy tails or extreme values. A low variance means outcomes cluster tightly around the mean. Standard deviation σ = √Var(X) is often preferred because it has the same units as X, making interpretation more intuitive.
How is expected value used in decision-making?
In decision theory, the expected value criterion says a rational agent should choose the action with the highest expected payoff. This principle underlies insurance pricing, investment analysis, game theory, and clinical trial design. However, expected value alone does not capture risk aversion — a person might prefer a certain $50 gain over a 50% chance of $120, even though the latter has higher expected value. This is why expected utility theory extends the basic framework.