Expected Value Calculator

Expected value is the long-run average outcome of a random variable, found by multiplying each outcome by its probability and adding the results: E(X) = Σ x × P(x). For outcomes 0, 1, 2, 3 with probabilities 0.1, 0.3, 0.4, 0.2, E(X) = 1.7.

Last updated · By · Runs in your browser, nothing is uploaded

Result

Step-by-Step Solution

Enter your values above to see the full working.

What Is Expected Value?

Expected value (EV), or expectation, is the average result you would get if you could repeat a random process an enormous number of times. It is a weighted average in which each outcome is weighted by how likely it is. It does not have to be a value you can actually observe: the expected value of a fair die roll is 3.5, even though no roll ever shows 3.5.

Expected value is the standard tool for judging bets, investments, insurance and games. A positive EV means that, on average, you gain per play. A negative EV means you lose on average, even if you sometimes win. The variance and standard deviation, which this calculator also reports, show how widely individual results scatter around that average.

Expected Value at a Glance

SituationOutcomes and probabilitiesExpected value
Fair die roll1–6, each 1 ÷ 63.5
Coin bet: win $1 on heads, lose $1 on tails+1 (0.5), −1 (0.5)$0, a fair game
The default example0 (0.1), 1 (0.3), 2 (0.4), 3 (0.2)1.7

Expected Value Formula

E(X) = Σ xᵢ × P(xᵢ) Variance = E(X²) − [E(X)]² where E(X²) = Σ xᵢ² × P(xᵢ) Standard deviation = √Variance
  • xᵢ is each possible outcome.
  • P(xᵢ) is the probability of that outcome. All the probabilities must add up to 1.
  • E(X) is the expected value, the probability-weighted mean.
  • E(X²) is the expected value of the squared outcomes, used to get the variance.

The calculation is a weighted version of the ordinary mean. For equally likely outcomes it reduces to the plain average, and the variance step mirrors the variance calculator.

Handy Properties

Expected value is linear: E(aX + b) = a × E(X) + b, and E(X + Y) = E(X) + E(Y) for any two random variables. With E(X) = 1.7, the variable 2X + 1 has an expected value of 2 × 1.7 + 1 = 4.4. Variance behaves differently: adding a constant changes nothing and multiplying by a scales it by a². So Var(2X + 1) = 4 × 0.81 = 3.24, giving a standard deviation of 1.8.

Worked Example: A Discrete Distribution

A random variable takes values 0, 1, 2, 3 with probabilities 0.1, 0.3, 0.4, 0.2.

xP(x)x × P(x)x² × P(x)
00.100
10.30.30.3
20.40.81.6
30.20.61.8
Total1.01.73.7
  1. Expected value: E(X) = 0 + 0.3 + 0.8 + 0.6 = 1.7.
  2. E(X²): 0 + 0.3 + 1.6 + 1.8 = 3.7.
  3. Variance: 3.7 − 1.7² = 3.7 − 2.89 = 0.81.
  4. Standard deviation: √0.81 = 0.9.

Example: Is This Raffle Ticket Worth It?

A ticket costs $2. It wins $50 with probability 0.02, wins $5 with probability 0.10 and wins nothing otherwise. Counting net gain after paying for the ticket, the outcomes are +$48, +$3 and −$2 with probabilities 0.02, 0.10 and 0.88.

E = 48 × 0.02 + 3 × 0.10 + (−2) × 0.88 = 0.96 + 0.30 − 1.76 = −$0.50. On average you lose 50 cents per ticket. The standard deviation of about $7.09 shows that individual results vary hugely, which is why the game can still feel worth playing.

How to Use This Expected Value Calculator

  1. Type the possible outcomes in the first box, separated by commas or spaces. Negative numbers are fine for losses.
  2. Type the matching probabilities in the same order in the second box.
  3. Check that the probabilities add up to 1.
  4. Read the expected value, variance, standard deviation and E(X²). The steps show every product.

If your probabilities come from a counted number of trials, use the binomial calculator to generate them first.

Real-World Uses of Expected Value

  • Insurance: premiums are set above the expected payout so that the insurer profits on average.
  • Investing and business: comparing projects by their probability-weighted returns.
  • Gambling and lotteries: showing that most games have a negative expected value for the player.
  • Decision analysis: choosing between options with uncertain payoffs, from drug trials to marketing campaigns.
  • Operations: computing average demand, waiting times or inventory needs.

What Are the Most Common Mistakes With the Expected Value Calculator?

  • Probabilities that do not sum to 1. Check the total before trusting the result.
  • Mismatched order. Each probability must line up with its outcome.
  • Forgetting costs. Include the price paid when working out net gain.
  • Equating EV with a typical result. The expected value can be a number that never occurs, and a single play can end far from it.
  • Ignoring risk. Two options with the same EV can have very different variance. Consider both.
  • Small number of plays. Expected value describes long-run averages, not guarantees for a handful of trials.

Where Can You Verify These Formulas?

The definitions and formulas on this page follow standard references. Check them against these sources:

Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.

Frequently Asked Questions

How do you calculate expected value?

Multiply each outcome by its probability and add the results: E(X) = Σ x × P(x). For outcomes 0–3 with probabilities 0.1, 0.3, 0.4, 0.2, E(X) = 1.7.

What does a negative expected value mean?

It means that on average you lose money or value per play. In the raffle example the expected value is −$0.50 per ticket.

Is expected value the same as the average?

It is the long-run average of a random process. It equals the ordinary mean only when all outcomes are equally likely or when the probabilities are the observed frequencies.

How do I find the variance of a random variable?

Compute E(X²) = Σ x² × P(x), then subtract the square of the expected value: Var(X) = E(X²) − [E(X)]².

Can the expected value be a number that cannot occur?

Yes. A fair die has an expected value of 3.5 even though you can never roll 3.5.

Do probabilities have to add up to exactly 1?

Yes. If they do not, some outcomes are missing or a probability is wrong. The calculator will warn you.