MathsStatistics & Probability

Expected Value
calculator.

Expected value is the average result per try of a bet, game or risky decision.

How it's worked out

OpenStax defines the expected value as the mean of a discrete probability distribution. Multiply each possible value by its chance, then add the results.

E(X)\displaystyle E(X)=∑x⋅P(x)\displaystyle {}= \sum x \cdot P(x)

Here x is one outcome and P(x) is its chance. The chances must add to 1, or an outcome is missing. The tool says so rather than guess, and it reads 0.25, 25% or 1/4 alike. A fraction stays exact, so 1/38 does not pick up a rounding error.

To see how much the results swing, find each gap from the expected value, square it, weight it by its chance and add. That total is the variance, and its square root is the standard deviation.

σ2\displaystyle \sigma^2=∑(x−μ)2⋅P(x)\displaystyle {}= \sum (x - \mu)^2 \cdot P(x)

Over many independent plays, the total has a mean of n times the mean and a standard deviation of the square root of n times sigma. So the average per play tightens as plays add up, even while the total swings more in raw terms.

total mean\displaystyle \text{total mean}=nμ\displaystyle {}= n\mu
total SD\displaystyle \text{total SD}=nσ\displaystyle {}= \sqrt{n}\,\sigma

Worked examples

A $1 bet on one roulette number

An American wheel has 38 pockets. A $1 bet on one number pays 35 with a 1 in 38 chance, and loses the dollar otherwise. The expected value is exactly −1 over 19, about −0.0526 per dollar. That is the house edge, at a bit over 5 cents.

To be fair at 38 pockets, the bet would have to pay 37 and not 35. Or, at 35 to 1, your chance would have to be 1 in 36.

Over 100 spins you can expect to be down about 5.26, with a standard deviation of 57.63. So a lucky session is common. By 10,000 spins the expected loss is 526 with a standard deviation of 576, and luck has far less room.

Open this example in the tool

A $5 raffle ticket with a $500 prize

Use net values, so the win is 495 after the ticket price and the loss is 5. With 500 tickets sold, the expected value is −4 per ticket.

The net win would have to be 2,495 to break even, which means a prize of 2,500, as 500 tickets at 5 bring in exactly that. A lower prize is how the raffle raises money, so a negative figure here is the point of the event, not a flaw.

Open this example in the tool

A product launch with three scenarios

A team puts a 30% chance on making 200,000, 50% on making 50,000 and 20% on losing 80,000. The expected value is 69,000, and the standard deviation is about 98,838.

The spread is larger than the expected value, so the average alone hides a lot. There is a 20% chance of an 80,000 loss, and the team should ask whether it can take that. The chances are also rough guesses. Moving the 20% with the chance curve shows how much the answer leans on it.

Open this example in the tool

Reading your result

It need not be a result you can get. A fair die has an expected value of 3.5, and no face shows 3.5. It is the long-run average, and the law of large numbers is why the average settles there.

The sign tells you who gains on average. Above 0 you gain per play, and below 0 you lose. Use net values, with what it costs you to take part taken off every outcome, or the sign means nothing.

Then read the spread. A sure 50 and a coin flip for 100 or nothing both have an expected value of 50, but the flip has a standard deviation of 50 and the sure thing has none. Two choices can match on average and feel nothing alike.

Small chances can drive the answer. OpenStax has a game where you pay $2 and could profit $100,000 at a chance of 0.00001. That one row is worth about $1 of expected value, against about $2 from the far likelier loss. If the small chance is a guess, the result is a guess too.

Check how far you can push the chances. If the best choice stays the same across a range of estimates, you can trust it more. If it flips when one chance moves by a little, gather more facts before you decide.

Common mistakes

  • Using gross prizes. Take the ticket price off the win as well as counting it as the loss. Listing a $500 win and a $5 loss counts the ticket as free when you win.
  • Leaving out an outcome. If your chances add to 0.9, a tenth of what can happen has no value at all. Add a row for everything else, even if its value is 0.
  • Overlapping outcomes. "Rain" and "a storm" can both be true. Each row must rule out the others, or the chances and values count some cases twice.
  • Rounding chances by hand. Typed as 0.33, 0.33 and 0.33, a three-way split adds to 0.99 and fails. Type 1/3 and it stays exact.
  • Mixing up the mean of many plays with what happens to you. For repeated yes or no trials where you want the count of wins, use the binomial distribution calculator and not this one.

Questions people ask

Less than it seems, because one play lands on one outcome and never on the average. In a single $1 roulette bet you lose the dollar about 97 times in 100, whatever the expected value says. It still tells you the fair price of the risk, so read it next to the spread and ask whether you could live with the worst outcome.

Sources