Expected Value Calculator
Calculate the expected value of a random variable from outcomes and their probabilities. Enter values for instant results with step-by-step formulas.
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer
Expected Value Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: E(X) = sum of (x_i x P(x_i)) for all outcomes i
Worked example — Expected Value: $39.00 | Std Dev: $63.32 | Favorable (positive EV)
Formula
E(X) = sum of (x_i x P(x_i)) for all outcomes i
The expected value E(X) is calculated by multiplying each possible outcome value x_i by its probability P(x_i) and summing all products. Variance is calculated as E(X^2) - [E(X)]^2, and standard deviation is the square root of variance.
Worked Examples
Example 1: Investment Decision Analysis
Problem:An investment has three possible outcomes: $100 profit (30% chance), $50 profit (50% chance), or $80 loss (20% chance). Calculate the expected value.
Solution:E(X) = ($100 x 0.30) + ($50 x 0.50) + (-$80 x 0.20) E(X) = $30.00 + $25.00 + (-$16.00) E(X) = $39.00 Variance = (100^2 x 0.30 + 50^2 x 0.50 + 80^2 x 0.20) - 39^2 Variance = (3000 + 1250 + 1280) - 1521 = 4009 Std Dev = sqrt(4009) = 63.32
Result:Expected Value: $39.00 | Std Dev: $63.32 | Favorable (positive EV)
Example 2: Lottery Ticket Expected Value
Problem:A $2 lottery ticket has a 1/1000 chance of winning $1000, 1/100 chance of winning $20, and 989/1000 chance of winning $0.
Solution:E(X) = ($1000 x 0.001) + ($20 x 0.01) + ($0 x 0.989) - $2 ticket cost E(X) = $1.00 + $0.20 + $0.00 - $2.00 E(X) = -$0.80 For every $2 ticket, you lose $0.80 on average Return on investment: -40%
Result:Expected Value: -$0.80 per ticket | Unfavorable (negative EV)
Frequently Asked Questions
What is expected value and why is it important in probability?
Expected value is the long-run average outcome of a random variable when an experiment is repeated many times. It is calculated by multiplying each possible outcome by its probability and summing all the products. The concept is fundamental in probability theory, statistics, economics, and decision-making because it provides a single number that summarizes the central tendency of a probability distribution. For example, if a game pays $10 with 50% probability and $0 with 50% probability, the expected value is $5. This does not mean you will ever win exactly $5, but over thousands of plays, your average winnings will converge to $5 per play. Insurance companies, casinos, and investors all rely heavily on expected value calculations.
How do you calculate expected value step by step?
To calculate expected value, follow these steps. First, list all possible outcomes of the random event or experiment. Second, assign a probability to each outcome, ensuring all probabilities sum to exactly 1.0 or 100 percent. Third, multiply each outcome value by its probability to get the weighted value. Fourth, sum all the weighted values to obtain the expected value. For example, consider a dice game where rolling 1-2 wins $30, rolling 3-4 wins $10, and rolling 5-6 loses $20. The calculation is E(X) = $30 x (2/6) + $10 x (2/6) + (-$20) x (2/6) = $10.00 + $3.33 + (-$6.67) = $6.67. The positive expected value indicates this game favors the player over many repetitions.
What is the difference between expected value and variance in probability?
Expected value and variance describe different aspects of a probability distribution. Expected value measures the central tendency or average outcome, telling you where the distribution is centered. Variance measures the spread or dispersion of outcomes around the expected value, indicating how much variability or risk is involved. Two distributions can have identical expected values but very different variances. For instance, receiving $100 with certainty has an expected value of $100 and zero variance. A coin flip paying $200 or $0 also has an expected value of $100 but high variance of $10,000. The standard deviation, which is the square root of variance, is often more interpretable because it is expressed in the same units as the outcomes.
Can expected value be negative and what does that mean?
Yes, expected value can be negative, and this indicates that on average, the outcome results in a loss rather than a gain over many repetitions. Most casino games have negative expected values for the player, which is how casinos maintain profitability. For example, American roulette has an expected value of approximately negative 5.26 cents per dollar wagered because of the house edge created by the zero and double-zero pockets. A negative expected value does not mean you will always lose, as short-term results can vary widely. However, the law of large numbers guarantees that over many repetitions, your average result will converge to the expected value. Understanding negative expected value helps rational decision-makers avoid systematically unfavorable bets.
How is expected value used in real-world decision making?
Expected value is widely applied across numerous fields for rational decision-making under uncertainty. In finance, investors use expected returns weighted by probability scenarios to evaluate portfolios and compare investment options with different risk profiles. Insurance companies calculate expected claim costs to set premium prices that ensure long-term profitability while covering policyholder losses. In healthcare, expected value analysis helps evaluate treatment options by weighting health outcomes by their likelihood of occurrence. Project managers use expected monetary value to quantify risks and determine appropriate contingency budgets. Game theory applications include poker strategy, where players calculate expected value of each possible action to determine optimal play. Even everyday decisions like choosing insurance deductibles or warranty purchases benefit from expected value thinking.
What is the law of large numbers and how does it relate to expected value?
The law of large numbers is a fundamental theorem in probability that states the average of results obtained from a large number of trials converges to the expected value as the number of trials increases. This means that while individual outcomes can deviate wildly from the expected value, the average over many repetitions will approach the mathematical expectation. For example, a fair coin has an expected value of 0.5 heads per flip, but you might flip 7 heads in 10 tries. Over 10,000 flips, however, the proportion of heads will be very close to 50%. This principle underpins casino profitability, insurance pricing, and portfolio diversification strategies.
What happens when probabilities do not sum to exactly one?
When probabilities do not sum to exactly one, the expected value calculation may produce misleading results. If probabilities sum to less than one, it means some possible outcomes have been omitted from the analysis, and the true expected value could be higher or lower depending on the missing outcomes. If probabilities sum to more than one, the outcomes are overlapping or double-counted, which inflates the expected value. In practice, always verify that your probability distribution is valid by checking that all probabilities are between zero and one and that they sum to exactly one. Expected Value Calculator provides a warning when probabilities deviate from a sum of one to help you identify potential errors.
How do you compare two options using expected value?
To compare two options, calculate the expected value of each and choose the one with the higher expected value if you are risk-neutral. For example, Option A might pay $500 with 30% probability and $0 otherwise, giving an EV of $150. Option B might pay $200 with 80% probability and $0 otherwise, giving an EV of $160. A risk-neutral decision maker would choose Option B. However, risk-averse individuals might prefer the option with lower variance even if it has a slightly lower expected value. This is why many analysts also compute the standard deviation alongside expected value to provide a complete picture of both the average outcome and the uncertainty involved.
What is the St. Petersburg paradox and what does it reveal about expected value?
The St. Petersburg paradox is a famous thought experiment where a coin is flipped repeatedly until tails appears, and the payoff doubles with each flip. The expected value of this game is mathematically infinite, yet most people would only pay a small amount to play. This paradox reveals a limitation of using expected value alone for decision making. Daniel Bernoulli resolved it by introducing the concept of expected utility, arguing that people value gains logarithmically rather than linearly. A dollar gained when you are wealthy matters less than a dollar gained when you are poor. This insight led to utility theory, which accounts for risk preferences and diminishing marginal returns in decision making.
How is expected value calculated for a bet?
Expected value (EV) = (probability of winning × amount won) − (probability of losing × amount lost). A positive EV means the bet is profitable over many repetitions. Casino games are designed to have negative EV for players. For example, a coin flip paying $1.90 for a $1 bet has EV = (0.5 × 1.90) − (0.5 × 1) = $0.45 average loss per dollar wagered.
References
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer · Editorial policy
Related Calculators
🧮Card Hand Probability Calculator
Calculate card hand probability with inputs, formulas, and instant results.
🧮Gacha Probability Calculator
Calculate gacha probability with inputs, formulas, and instant results.
🧮Match Win Probability Calculator
Calculate match win probability with inputs, formulas, and instant results.
🧮Card Probability Calculator
Calculate the probability of drawing specific cards from a standard 52-card deck.
🧮Dice Probability Calculator
Calculate the probability of rolling specific outcomes with any number and type of dice.
🧮Coin Toss Probability Calculator
Calculate the probability of getting a specific sequence of heads and tails in multiple flips.
🧮Gaming Pc Fps Calculator
Estimate frames per second based on GPU, CPU, resolution, and game optimization level.
🧮Dice Odds Calculator
Calculate dice odds with inputs, formulas, and instant results.