Expected Value

Expected value is the average outcome you'd get if you repeated an experiment many times, weighted by how likely each outcome is.

E(X)=xiP(xi)E(X) = \sum x_i\,P(x_i)

Solve a problem with Expected Value

Type the problem. The solver will use Expected Value where Expected Value is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Expected Value takes
XX
xix_i
Expected Value
SymbolMeaning
XXA random variable representing the outcome of an experiment that can take different values with different probabilities; misreading it as a fixed number loses the averaging and variation in the situation.
xix_iOne specific possible value that the random variable XX can take; confusing it with the final answer gives you a single case instead of the overall weighted average.

When to use it

Use expected value when you need to predict the long-term average result of a random situation.

Level

Usually taught in: Statistics · Appears on: AP Statistics

Worked examples

1. Expected value of a fair die roll

Problem

A fair six-sided die is rolled once. Find the expected value of the number showing.
  1. E(X)=116+216+316+416+516+616E(X) = 1 \cdot \frac{1}{6} + 2 \cdot \frac{1}{6} + 3 \cdot \frac{1}{6} + 4 \cdot \frac{1}{6} + 5 \cdot \frac{1}{6} + 6 \cdot \frac{1}{6}

    Write out the formula E(X)=xiP(xi)E(X) = \sum x_i \cdot P(x_i) with each outcome and its probability; for a fair die, each outcome has probability 1/61/6.

  2. E(X)=1+2+3+4+5+66E(X) = \frac{1 + 2 + 3 + 4 + 5 + 6}{6}

    Combine all the fractions by finding a common denominator and adding the numerators.

  3. E(X)=216E(X) = \frac{21}{6}

    Add up the values in the numerator: 1+2+3+4+5+6=211 + 2 + 3 + 4 + 5 + 6 = 21.

  4. E(X)=72=3.5E(X) = \frac{7}{2} = 3.5

    Simplify the fraction by dividing both numerator and denominator by their common factor of 3.

Answer: E(X)=72 or 3.5E(X) = \frac{7}{2} \text{ or } 3.5

The expected value formula multiplies each outcome by its probability and sums them. For a fair die, all outcomes are equally likely, so each gets multiplied by 1/61/6 before being added together.

2. Expected value of a game with wins and losses

Problem

A game involves rolling a fair die once. Rolling a 1, 2, or 3 means you lose $2. Rolling a 4 or 5 means you win $1. Rolling a 6 means you win $5. What is the expected value of your winnings from one roll?
  1. E(X)=(2)36+(1)26+(5)16E(X) = (-2) \cdot \frac{3}{6} + (1) \cdot \frac{2}{6} + (5) \cdot \frac{1}{6}

    Identify each outcome and its probability: losing 22 happens on three outcomes (probability 3/63/6), winning 11 happens on two (probability 2/62/6), and winning 55 happens once (probability 1/61/6).

  2. E(X)=66+26+56E(X) = \frac{-6}{6} + \frac{2}{6} + \frac{5}{6}

    Multiply each outcome by its probability: (2)(3/6)=6/6(-2) \cdot (3/6) = -6/6, (1)(2/6)=2/6(1) \cdot (2/6) = 2/6, and (5)(1/6)=5/6(5) \cdot (1/6) = 5/6.

  3. E(X)=6+2+56E(X) = \frac{-6 + 2 + 5}{6}

    Combine the fractions over a common denominator by adding the numerators.

  4. E(X)=16E(X) = \frac{1}{6}

    Simplify: 6+2+5=1-6 + 2 + 5 = 1, so the expected value is 1/61/6 dollars, or approximately 0.170.17 per roll.

Answer: E(X)=160.17E(X) = \frac{1}{6} \approx 0.17

This example shows how to handle negative values in expected value calculations. Losses of 22 are weighted heavily (probability 3/63/6) because they're most likely, which pulls the expected value down despite the possibility of winning 55.

3. Expected value of cookie sales at a bake sale

Problem

A student tracks sales at a bake sale over many days and notices the following pattern: they sell 10 cookies with probability 0.3, 15 cookies with probability 0.5, or 20 cookies with probability 0.2. What is the expected number of cookies they will sell on a given day?
  1. E(X)=100.3+150.5+200.2E(X) = 10 \cdot 0.3 + 15 \cdot 0.5 + 20 \cdot 0.2

    Apply the expected value formula with each possible number of cookies and its probability from the observed data.

  2. E(X)=3+7.5+4E(X) = 3 + 7.5 + 4

    Compute each product: 10×0.3=310 \times 0.3 = 3, 15×0.5=7.515 \times 0.5 = 7.5, and 20×0.2=420 \times 0.2 = 4.

  3. E(X)=14.5 cookiesE(X) = 14.5 \text{ cookies}

    Add the products together: 3+7.5+4=14.53 + 7.5 + 4 = 14.5 cookies.

Answer: E(X)=14.5 cookiesE(X) = 14.5 \text{ cookies}

This word problem demonstrates that expected value applies to any random variable, not just die rolls or games. The expected value is 14.5 cookies, a value that can never actually occur in reality, because expected value is the long-run average across many days.

Common mistakes

Where Expected Value usually goes wrong
Answer came out wrong
Computing E(X)=(10+15+20)/3=15E(X) = (10 + 15 + 20) / 3 = 15 for the bake sale problem instead of weighting by probabilities.
Always multiply each outcome by its probability: E(X)=10(0.3)+15(0.5)+20(0.2)=14.5E(X) = 10(0.3) + 15(0.5) + 20(0.2) = 14.5.
Saying the expected value of the bake sale is 15 cookies because that's the most likely outcome.
Remember that expected value E(X)=xiP(xi)E(X) = \sum x_i \cdot P(x_i) weights all outcomes, not just the one with highest probability.
Computing E(X)=(2)(1/6)+(1)(1/6)+(5)(1/6)=4/6E(X) = (-2)(1/6) + (1)(1/6) + (5)(1/6) = 4/6 for the game instead of using the correct probabilities.
Count carefully: three outcomes give 2-2 (probability 3/63/6), two give +1+1 (probability 2/62/6), and one gives +5+5 (probability 1/61/6). Then compute E(X)=(2)(3/6)+(1)(2/6)+(5)(1/6)=1/6E(X) = (-2)(3/6) + (1)(2/6) + (5)(1/6) = 1/6.
The mistakeWhy it is wrongThe fix
Computing E(X)=(10+15+20)/3=15E(X) = (10 + 15 + 20) / 3 = 15 for the bake sale problem instead of weighting by probabilities.Treating all outcomes as equally likely forgets that 15 cookies is more likely (probability 0.5) than 10 or 20.Always multiply each outcome by its probability: E(X)=10(0.3)+15(0.5)+20(0.2)=14.5E(X) = 10(0.3) + 15(0.5) + 20(0.2) = 14.5.
Saying the expected value of the bake sale is 15 cookies because that's the most likely outcome.Expected value is the long-run average (mean), not the most likely single value (mode) — these are different concepts.Remember that expected value E(X)=xiP(xi)E(X) = \sum x_i \cdot P(x_i) weights all outcomes, not just the one with highest probability.
Computing E(X)=(2)(1/6)+(1)(1/6)+(5)(1/6)=4/6E(X) = (-2)(1/6) + (1)(1/6) + (5)(1/6) = 4/6 for the game instead of using the correct probabilities.Using wrong probabilities (treating all outcomes as equally likely when they're not) gives you an incorrect weighted average.Count carefully: three outcomes give 2-2 (probability 3/63/6), two give +1+1 (probability 2/62/6), and one gives +5+5 (probability 1/61/6). Then compute E(X)=(2)(3/6)+(1)(2/6)+(5)(1/6)=1/6E(X) = (-2)(3/6) + (1)(2/6) + (5)(1/6) = 1/6.

Tips and when to use something else

  • Expected value tells you the long-term average over many repetitions, not what will happen on a single trial — you won't usually get the expected value itself on any one roll or trial.
  • When choosing between risky options, calculate expected value for each choice, but also check Variance of a Random Variable to understand how spread out the outcomes are.
  • Don't confuse expected value with the mode (most likely outcome) or the median (middle value when outcomes are ordered).
  • For discrete random variables, use E(X)=xiP(xi)E(X) = \sum x_i \cdot P(x_i); for continuous ones, the sum becomes an integral.

Frequently asked questions

Can expected value be negative?
Yes, absolutely. Expected value is negative whenever losses or costs are more likely or more severe than gains. For example, if a game is rigged in the house's favor, your expected winnings are negative.
Why is the expected value of a die roll 3.5 when you can never roll 3.5?
Expected value is the long-run average: if you rolled a die millions of times and averaged all the results, you'd get extremely close to 3.5, even though no single roll ever shows 3.5. It's the value you'd expect to see on average over many trials.
How is expected value different from the regular average?
Expected value is a weighted average where each outcome is weighted by its probability; a regular average treats all values equally. They're the same only when all outcomes are equally likely.
How do insurance companies use expected value?
Insurance companies use expected value to calculate what they expect to pay out on average. They set premiums so that the expected payout is less than what they collect, ensuring they make a profit on a large number of policies.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18