How to Calculate Expected Value
Calculate expected value step by step: build the probability table, multiply each outcome by its probability, and add. Examples from dice to insurance.
How to Calculate Expected Value
Expected value tells you the long-run average of a random event, and knowing how to calculate expected value is straightforward: sum each possible outcome multiplied by its probability: E[X] = Σ x·P(x). That single number, expressed in the same units as the outcomes, is what you would average per trial if you repeated the event thousands of times. It is not the outcome you will see on any single roll, draw, or bet.
The Expected Value Formula and What Each Symbol Means
The formula is E[X] = Σ (xᵢ × P(xᵢ)). E[X] is the expected value of the random variable X. The symbol Σ means sum over every possible outcome. xᵢ is one possible outcome value, and P(xᵢ) is its probability. Probabilities must be between 0 and 1 and must add up to exactly 1. If they do not, the calculation is invalid.
OpenIntro Statistics (4th ed.) section 3.4 defines random variables and this weighted average. OpenStax Introductory Statistics 2e, ch. 4.2 covers the same formula for discrete random variables and also shows how to compute the standard deviation from it.
The units of expected value match the units of the outcomes. If you are computing net gain in dollars, E[X] is in dollars. If you are computing points on a die, E[X] is in points. The result is a mean, but weighted by probability instead of by frequency.
Step 1: Define the Random Variable and Its Values
Decide what you are measuring. For a die, the random variable is the number shown: 1, 2, 3, 4, 5, 6. For a betting game, the random variable is net gain, not total payout. Net gain subtracts the cost of playing. A game that costs $5 to play and pays $20 if you win has a net gain of $15 when you win and -$5 when you lose. Using total payout instead of net gain is the most common error in expected value word problems.
List every distinct outcome. If you miss one, your probabilities will not sum to 1. Write the values as numbers, including negatives for losses.
Step 2: Assign Probabilities That Sum to 1
Each outcome gets a probability between 0 and 1. For a fair die, each face gets 1/6. For a biased coin, assign P(heads) = 0.6 and P(tails) = 0.4. Sum all probabilities. If the total is not 1, you either missed an outcome or assigned incorrect probabilities.
Use a probability table: outcomes in one column, probabilities in another. Check the sum of the probability column before you multiply. OpenStax Introductory Statistics 2e uses this table approach for discrete random variables.
Steps 3-4: Multiply and Sum
For each outcome, multiply the outcome value by its probability. Add all those products. That sum is E[X].
For a fair die: (1 × 1/6) + (2 × 1/6) + (3 × 1/6) + (4 × 1/6) + (5 × 1/6) + (6 × 1/6) = 21/6 = 3.5. The expected value of a fair die is 3.5, even though you can never roll a 3.5.
For a bet where you win $10 with probability 0.4 and lose $1 with probability 0.6, net gain outcomes are +$9 and -$1. (9 × 0.4) + (-1 × 0.6) = 3.6 - 0.6 = 3.0. The expected net gain is $3.00 per game.
Expected Value Examples: Four Worked Word Problems With Tables
Single Fair Die
Roll a fair six-sided die. What is the expected value of the number shown?
| Outcome (x) | Probability P(x) | x·P(x) |
|---|---|---|
| 1 | 1/6 | 1/6 ≈ 0.1667 |
| 2 | 1/6 | 2/6 ≈ 0.3333 |
| 3 | 1/6 | 3/6 = 0.5 |
| 4 | 1/6 | 4/6 ≈ 0.6667 |
| 5 | 1/6 | 5/6 ≈ 0.8333 |
| 6 | 1/6 | 6/6 = 1 |
Sum: 21/6 = 3.5. The expected value of a fair die is 3.5. Over many rolls the average will be close to 3.5.
Raffle Ticket
A charity raffle sells 1000 tickets at $5 each. One ticket wins $2000. Five tickets win $100 each. What is the expected net gain per ticket?
| Outcome (net gain) | Probability | x·P(x) |
|---|---|---|
| +$1995 (win $2000 minus $5 cost) | 1/1000 = 0.001 | 1.995 |
| +$95 (win $100 minus $5 cost) | 5/1000 = 0.005 | 0.475 |
| -$5 (lose) | 994/1000 = 0.994 | -4.97 |
Sum: 1.995 + 0.475 + (-4.97) = -2.50. The expected net gain per ticket is -$2.50. The raffle is a losing bet for the buyer.
Insurance Policy
An insurance company sells a $500 one-year policy on a $20,000 boat. The probability of a total loss during the year is 0.002. The probability of a minor claim (average $3000) is 0.01. What is the insurance company's expected profit per policy?
| Outcome for company (profit) | Probability | x·P(x) |
|---|---|---|
| +$500 (no claim) | 0.988 | 494 |
| +$500 - $3000 = -$2500 (minor claim) | 0.01 | -25 |
| +$500 - $20000 = -$19500 (total loss) | 0.002 | -39 |
Sum: 494 - 25 - 39 = 430. The company's expected profit per policy is $430. This is positive because the premium exceeds the expected claim cost.
Multiple-Choice Guessing
A multiple-choice exam has four options per question. A correct answer earns 4 points; a wrong answer loses 1 point. What is the expected value of guessing on one question?
| Outcome (points) | Probability | x·P(x) |
|---|---|---|
| +4 | 1/4 = 0.25 | 1.0 |
| -1 | 3/4 = 0.75 | -0.75 |
Sum: 1.0 - 0.75 = 0.25. The expected value of a random guess is 0.25 points. Guessing is better than leaving it blank if blank answers score 0, because 0.25 > 0.
Common Mistakes in Expected Value Word Problems
Forgetting the cost. In any betting or purchase scenario, the outcome must be net gain. A $5 raffle ticket that wins $100 has a net gain of $95, not $100. Ignoring the cost inflates the expected value.
Probabilities not summing to 1. If you list three outcomes with probabilities 0.2, 0.3, and 0.4, the sum is 0.9. You are missing a 0.1 outcome, or you assigned probabilities incorrectly. Always check the total.
Confusing expected value with most likely outcome. The expected value of a die is 3.5, but 3.5 never appears. The most likely outcomes are equally-likely 1 through 6. Expected value is a long-run average, not a prediction for one trial.
Using raw counts instead of probabilities. If an event happens 3 times out of 10, use 0.3, not 3.
Blitzstein & Hwang, Introduction to Probability (2nd ed.) ch. 4 covers linearity of expectation, which can simplify many problems. The same chapter introduces indicator random variables, which let you compute expected value without building a full probability table when the random variable can be expressed as a sum of simpler ones.
Practice Set With Answers
Try these problems. Build a probability table for each one.
- A coin is tossed three times. You win $2 for each head and lose $1 for each tail. What is the expected net gain?
- A lottery sells 500 tickets at $10 each. One ticket wins $2000. Ten tickets win $100 each. What is the expected net gain per ticket?
- A game costs $2 to play. You roll a fair die. If you roll a 6, you win $10. If you roll a 1 or 2, you win $1. Otherwise you lose your $2. What is the expected net gain?
- A multiple-choice test has five options. Correct answers get 5 points. Wrong answers lose 2 points. What is the expected value of a random guess?
Answers:375) = $0.75.80. (3) Outcomes: +$8 (1/6), -$1 (2/6), -$2 (3/6). E[X] = $0.00. (4) E[X] = (5 × 0.2) + (-2 × 0.8) = -0.6 points.
Expected Value Formula: E[X] = Σ x·P(x) Explained
The expected value formula is the weighted average of all possible outcomes, where the weights are probabilities. Each outcome x is multiplied by its probability P(x), and those products are summed. The result is the center of the probability distribution.
Blitzstein & Hwang (2nd ed.) ch. 4 explains that this formula works for any discrete random variable. For continuous random variables, the sum becomes an integral, but the concept is identical.
The formula also applies to functions of a random variable. E[g(X)] = Σ g(x)·P(x). This is how you compute variance: Var(X) = E[(X - μ)²] = Σ (x - μ)²·P(x). Variance and standard deviation measure the spread around the expected value, and they are covered separately in other resources.
Expected Value Examples: More Word Problems
Carnival Game A carnival game costs $3 to play. You draw a card from a standard 52-card deck. If you draw an Ace, you win $20. If you draw a King, Queen, or Jack, you win $5. What is the expected net gain?
| Outcome (net gain) | Probability | x·P(x) |
|---|---|---|
| +$17 (Ace) | 4/52 ≈ 0.0769 | 1.3077 |
| +$2 (face card) | 12/52 ≈ 0.2308 | 0.4615 |
| -$3 (other) | 36/52 ≈ 0.6923 | -2.0769 |
Sum: 1.3077 + 0.4615 - 2.0769 = -0.3077. The expected net gain is -$0.31. The game favors the operator.
Investment Decision An investment costs $10,000. There is a 0.3 probability of a $5,000 profit, a 0.5 probability of a $2,000 profit, and a 0.2 probability of a $0 profit (break even). What is the expected profit?
| Outcome (profit) | Probability | x·P(x) |
|---|---|---|
| +$5,000 | 0.3 | 1,500 |
| +$2,000 | 0.5 | 1,000 |
| $0 | 0.2 | 0 |
Sum: 1,500 + 1,000 + 0 = 2,500. The expected profit is $2,500. The expected value properties include linearity, which means you can compute the expected value of a sum of investments by adding their individual expected values.
Expected Value Word Problems: Building the Probability Table
When a problem gives you raw counts instead of probabilities, convert them into probabilities first. For example, a jar contains 10 red marbles, 20 blue marbles, and 30 green marbles. Total = 60. P(red) = 10/60 = 1/6, P(blue) = 20/60 = 1/3, P(green) = 30/60 = 1/2.
OpenStax Introductory Statistics 2e, ch. 4.2 shows how to construct the probability table from a frequency distribution. The mean (expected value) and standard deviation are both computed from that table.
If the problem asks for the expected value of a binomial random variable, use the shortcut E[X] = np, where n is the number of trials and p is the probability of success. OpenStax Introductory Statistics 2e, ch. 4.3 covers the binomial distribution. The shortcut comes from linearity of expectation applied to indicator random variables for each trial.
Who Expected Value Suits and Who Should Skip It
Expected value suits anyone making repeated decisions under uncertainty: students computing homework problems, bettors evaluating wagers, and project managers using EMV in decision trees. It also suits casual users who want to check the true edge of a lottery or casino game. The Kelly criterion (1956) extends EV to optimal bet sizing for positive-EV opportunities, but that is a separate tool for serious gamblers and investors.
Anyone looking for a guarantee on a single trial is in the wrong place. Expected value cannot tell you whether you will win this hand, this draw, or this project. For that, you need a probability-of-an-event calculator. Anyone making investment decisions with EV alone, ignoring risk tolerance and utility, should also look elsewhere. Risk-averse investors should consider expected utility theory, which adjusts for diminishing marginal value of money, as covered in Blitzstein & Hwang (2nd ed.) chapter on utility.
| Problem | Outcomes | Probabilities | E[X] |
|---|---|---|---|
| Fair die roll | 1, 2, 3, 4, 5, 6 | 1/6 each | 3.5 points |
| Raffle ticket ($5) | +$1995, +$95, -$5 | 0.001, 0.005, 0.994 | -$2.50 |
| Insurance policy ($500) | +$500, -$2500, -$19500 | 0.988, 0.01, 0.002 | +$430 |
| Multiple-choice guess (4 options) | +4, -1 | 0.25, 0.75 | 0.25 points |
| Carnival game ($3) | +$17, +$2, -$3 | 4/52, 12/52, 36/52 | -$0.31 |
| Investment ($10,000) | +$5000, +$2000, $0 | 0.3, 0.5, 0.2 | +$2500 |
Common Questions
How do I calculate expected value for a probability distribution?
List every outcome and its probability. Multiply each outcome by its probability. Sum those products. The result is the expected value. Make sure probabilities sum to exactly 1.
What is the formula for expected value E[X]?
E[X] = Σ (xᵢ × P(xᵢ)). The sigma means sum over all outcomes. xᵢ is each possible outcome value, and P(xᵢ) is its probability.
Can the expected value be a number that never occurs?
Yes. The expected value of a fair die is 3.5, but no die face shows 3.5. Expected value is the long-run average, not a prediction for a single trial.
How do I handle cost in expected value calculations?
Use net gain, not total payout. Subtract the cost of playing from each winning outcome. A $10 bet that pays $100 has a net gain of $90 when you win and -$10 when you lose.
What is the expected value of a binomial random variable?
E[X] = np, where n is the number of trials and p is the probability of success on each trial. This shortcut comes from linearity of expectation and is covered in OpenStax Introductory Statistics ch. 4.3.