How to find expected value (step by step)

By Jude Wallis · Published

Multiply each outcome by its probability, then add the products: $\mu_X = \sum x_i P(x_i)$. Check first that the probabilities add to 1. The result is the long-run average per trial, not a prediction about any single trial, and it does not have to be a value the variable can take.

AP Statistics: Unit 2 (topics 2.9 Parameters of Random Variables). Calculating and interpreting the mean and standard deviation of a discrete random variable is Unit 2 topic 2.9 in the Fall 2026 AP Statistics course, which defines the expected value as the long-run average outcome and asks for both parameters to be interpreted in context.

The expected value formula

The expected value of a discrete random variable is a weighted average of its possible values, with the probabilities acting as the weights. Written out:

μX=xiP(xi)\mu_X = \sum x_i P(x_i)

Here XX is the random variable, xix_i is one of its possible values, and P(xi)P(x_i) is the probability of that value. The symbol μX\mu_X (mu sub X, read as "the mean of X") is the standard name for it, and you will also see it written as E(X)E(X).

Expected value is a parameter: one fixed number that describes an entire probability distribution. That makes it different from the sample mean xˉ\bar{x} (x-bar), a statistic that changes every time you collect new data. The page on expected value vs sample mean works through the distinction.

Check that the probabilities add to 1 first

Before you multiply anything, add up the probabilities. A valid probability distribution has every P(xi)P(x_i) between 0 and 1, and the probabilities sum to exactly 1. If they do not, either an outcome is missing from the table or one of the probabilities is wrong.

This check catches the most common setup error in these problems. A table whose probabilities sum to 0.95 is missing 0.05 of the probability, and every number you compute from it will be off.

The four steps, worked on a table

Here is a distribution for XX, the number of drinks in one order at a coffee shop.

xix_i1234
P(xi)P(x_i)0.450.300.180.07

Run four steps.

  1. Add the probabilities: 0.45+0.30+0.18+0.07=1.000.45 + 0.30 + 0.18 + 0.07 = 1.00, so the distribution is valid.
  2. Multiply each value by its probability: 1(0.45)=0.451(0.45) = 0.45, 2(0.30)=0.602(0.30) = 0.60, 3(0.18)=0.543(0.18) = 0.54, and 4(0.07)=0.284(0.07) = 0.28.
  3. Add those four products: 0.45+0.60+0.54+0.28=1.870.45 + 0.60 + 0.54 + 0.28 = 1.87.
  4. Attach units and context: the mean order contains 1.87 drinks.

Do not divide by 4 at the end. The probabilities already do the weighting, so dividing by the number of outcomes would shrink the answer for no reason. You can check any table like this one with the expected value calculator.

What 1.87 drinks actually means

Expected value is the long-run average per trial. If the shop takes thousands of orders from this distribution, the average number of drinks per order settles near 1.87.

It is not a statement about the next order. No single order will ever contain 1.87 drinks, and expected value never claims one will. Read it as "on average, over many orders" rather than "what happens next".

Wording carries points on the AP exam, where topic 2.9 asks you to interpret this parameter in context. A full interpretation names the variable, gives the number with units, and says "on average over many trials" or "in the long run".

Expected value does not have to be a possible outcome

Survey summaries often report something like an average of 2.3 children per household. No household has 2.3 children, and that is not a flaw in the number. Expected value is the balance point of the distribution, not a member of it.

The coffee example behaves the same way. Orders arrive in whole drinks, yet μX=1.87\mu_X = 1.87 lands between 1 and 2, pulled toward 1 because 1 carries the largest probability. When an expected value does come out as a possible value, that is a coincidence rather than a requirement.

Standard deviation of the same random variable

Expected value gives the center. The standard deviation gives the typical distance of the values from that center:

σX=(xiμX)2P(xi)\sigma_X = \sqrt{\sum (x_i - \mu_X)^2 P(x_i)}

The symbol σX\sigma_X (sigma sub X) is the standard deviation of XX, and the quantity under the square root is the variance, σX2\sigma_X^2. This is a population formula, so there is no n1n - 1 anywhere: you are describing a whole distribution, not a sample. Compare it with the sample version in standard deviation by hand.

Work it on the same coffee table, using μX=1.87\mu_X = 1.87.

xix_ixiμXx_i - \mu_X(xiμX)2(x_i - \mu_X)^2P(xi)P(x_i)(xiμX)2P(xi)(x_i - \mu_X)^2 P(x_i)
1-0.870.75690.450.340605
20.130.01690.300.005070
31.131.27690.180.229842
42.134.53690.070.317583

Add the last column to get the variance: 0.340605+0.005070+0.229842+0.317583=0.89310.340605 + 0.005070 + 0.229842 + 0.317583 = 0.8931. Then take the square root: σX=0.89310.945\sigma_X = \sqrt{0.8931} \approx 0.945 drinks.

Interpret it the way you interpret any standard deviation. Order sizes typically fall about 0.945 drinks away from the mean of 1.87 drinks.

Comparing two options by expected value

When you have to choose between two uncertain options, computing μX\mu_X for each one turns the comparison into two numbers. Build a probability distribution for the payoff of each option, find the expected payoff of each, and take the larger one if your goal is the best long-run average.

Two cautions come with that. The larger expected value only wins out over many repetitions, so for a one-time choice it is a planning number rather than a guarantee. Options with similar expected values can also carry very different risk, which is why you compute σX\sigma_X next to μX\mu_X. The second worked example below does both for a pair of fundraisers.

Mistakes that cost points

  • Dividing the sum of the products by the number of outcomes. The probabilities have already weighted everything.
  • Skipping the check that the probabilities add to 1, then computing a mean from an incomplete table.
  • Using prize amounts instead of net gains in a game problem, which drops the cost of playing and inflates μX\mu_X.
  • Taking xiμX|x_i - \mu_X| instead of (xiμX)2(x_i - \mu_X)^2 in the standard deviation, or forgetting the final square root.
  • Interpreting the answer as a prediction, as in "the next order will have 1.87 drinks".

Binomial random variables have shortcuts for both parameters, μX=np\mu_X = np and σX=np(1p)\sigma_X = \sqrt{np(1-p)}, shown in the binomial probability guide. For drill on tables like the ones above, work through the expected value practice set.

Is this carnival game fair?

A ring toss costs 3 dollars to play. You win 10 dollars with probability 0.15, win 2 dollars with probability 0.30, and win nothing with probability 0.55. Let XX be your net gain in dollars on one play. Find μX\mu_X and σX\sigma_X, and decide whether the game is fair.

  1. Check the probabilities: 0.15+0.30+0.55=1.000.15 + 0.30 + 0.55 = 1.00, so the distribution is valid.

  2. Turn prizes into net gains by subtracting the 3-dollar cost: 103=710 - 3 = 7, 23=12 - 3 = -1, and 03=30 - 3 = -3.

  3. Multiply each net gain by its probability and add: μX=7(0.15)+(1)(0.30)+(3)(0.55)=1.050.301.65=0.90\mu_X = 7(0.15) + (-1)(0.30) + (-3)(0.55) = 1.05 - 0.30 - 1.65 = -0.90.

  4. Compare with 0. A fair game has an expected net gain of exactly 0 dollars, so this game is not fair.

  5. Square the deviations from μX=0.90\mu_X = -0.90: (7(0.90))2=7.902=62.41(7 - (-0.90))^2 = 7.90^2 = 62.41, (1(0.90))2=(0.10)2=0.01(-1 - (-0.90))^2 = (-0.10)^2 = 0.01, and (3(0.90))2=(2.10)2=4.41(-3 - (-0.90))^2 = (-2.10)^2 = 4.41.

  6. Weight and add for the variance: 62.41(0.15)+0.01(0.30)+4.41(0.55)=9.3615+0.0030+2.4255=11.7962.41(0.15) + 0.01(0.30) + 4.41(0.55) = 9.3615 + 0.0030 + 2.4255 = 11.79.

  7. Take the square root: σX=11.793.43\sigma_X = \sqrt{11.79} \approx 3.43 dollars.

  8. Find the fair price by averaging the prizes: 10(0.15)+2(0.30)+0(0.55)=1.50+0.60+0=2.1010(0.15) + 2(0.30) + 0(0.55) = 1.50 + 0.60 + 0 = 2.10 dollars.

μX=0.90\mu_X = -0.90 dollars and σX3.43\sigma_X \approx 3.43 dollars. The game is not fair, since you lose 90 cents per play on average over many plays, so about 90 dollars over 100 plays. A ticket price of 2 dollars and 10 cents would make the expected net gain 0 and the game fair.

Choosing between two fundraisers

A school club must pick one fundraiser. A bake sale returns a profit of 150 dollars with probability 0.50, 80 dollars with probability 0.35, and 20 dollars with probability 0.15. A car wash returns 300 dollars with probability 0.30, 70 dollars with probability 0.45, and a 40-dollar loss with probability 0.25. Compare them by expected value.

  1. Check both distributions. Bake sale: 0.50+0.35+0.15=1.000.50 + 0.35 + 0.15 = 1.00. Car wash: 0.30+0.45+0.25=1.000.30 + 0.45 + 0.25 = 1.00.

  2. Bake sale expected profit: 150(0.50)+80(0.35)+20(0.15)=75+28+3=106150(0.50) + 80(0.35) + 20(0.15) = 75 + 28 + 3 = 106 dollars.

  3. Car wash expected profit, writing the loss as 40-40: 300(0.30)+70(0.45)+(40)(0.25)=90+31.510=111.5300(0.30) + 70(0.45) + (-40)(0.25) = 90 + 31.5 - 10 = 111.5 dollars.

  4. Compare the two means: 111.50106.00=5.50111.50 - 106.00 = 5.50, so the car wash averages 5.50 dollars more per event.

  5. Bake sale variance: (150106)2(0.50)+(80106)2(0.35)+(20106)2(0.15)=1936(0.50)+676(0.35)+7396(0.15)=968+236.6+1109.4=2314(150 - 106)^2(0.50) + (80 - 106)^2(0.35) + (20 - 106)^2(0.15) = 1936(0.50) + 676(0.35) + 7396(0.15) = 968 + 236.6 + 1109.4 = 2314, so σX=231448.10\sigma_X = \sqrt{2314} \approx 48.10 dollars.

  6. Car wash variance: (300111.5)2(0.30)+(70111.5)2(0.45)+(40111.5)2(0.25)=35532.25(0.30)+1722.25(0.45)+22952.25(0.25)=10659.675+775.0125+5738.0625=17172.75(300 - 111.5)^2(0.30) + (70 - 111.5)^2(0.45) + (-40 - 111.5)^2(0.25) = 35532.25(0.30) + 1722.25(0.45) + 22952.25(0.25) = 10659.675 + 775.0125 + 5738.0625 = 17172.75, so σX=17172.75131.04\sigma_X = \sqrt{17172.75} \approx 131.04 dollars.

  7. Read the two pairs together: the car wash gains 5.50 dollars in expected profit while carrying about 2.7 times the standard deviation and a 0.25 chance of losing money.

The car wash has the higher expected profit, 111.50 dollars against 106.00 dollars, a gap of 5.50 dollars per event. Over many events the car wash comes out ahead. For a single event the bake sale is the safer pick: its standard deviation is about 48.10 dollars against about 131.04 dollars, and its worst outcome is still a 20-dollar profit.

Frequently asked questions

Does the expected value have to be one of the possible outcomes?

No. Expected value is a weighted average, so it usually falls between the possible values rather than on one of them. An average of 2.3 children per household is a real and useful number even though no household has 2.3 children.

Why do I not divide by the number of outcomes at the end?

Because the probabilities are already the weights. In μX=xiP(xi)\mu_X = \sum x_i P(x_i), each outcome contributes in proportion to how often it happens, and the probabilities add to 1. Dividing again by the number of rows would count that weighting twice and shrink the answer.

Is the standard deviation formula here the sample one or the population one?

It is the population version. A probability distribution describes a whole population of outcomes, so σX=(xiμX)2P(xi)\sigma_X = \sqrt{\sum (x_i - \mu_X)^2 P(x_i)} has no n1n - 1 correction. The n1n - 1 divisor belongs to the sample standard deviation ss, computed from data.

What makes a game fair?

A game is fair when the expected net gain is exactly 0 dollars per play, counting the cost to play as part of the outcome. A positive expected net gain favors the player and a negative one favors the house. Almost every commercial game has a negative expected net gain for the player.

How is expected value different from a sample mean?

Expected value is a parameter, a fixed number computed from a probability distribution. The sample mean xˉ\bar{x} is a statistic computed from data you actually collected, and it varies from sample to sample. Over many trials the sample mean tends toward the expected value.