Skip to content
Family Table Math
Auto

Expected Value

Is a $5 raffle ticket a good deal? Should you play a carnival game? The expected value answers questions like these: it’s the average result you’d get per try if you repeated an experiment many, many times. Businesses use it to set prices, and it’s the key idea behind insurance, lotteries, and games of chance.

The expected value of a discrete random variable XX is

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

Multiply each value by its probability, then add up the products. You’ll also see it written E(X)=x1P(x1)+x2P(x2)+⋯+xnP(xn)E(X) = x_1 P(x_1) + x_2 P(x_2) + \dots + x_n P(x_n).

E(X)E(X) is the long-run average. If you roll a fair die thousands of times, the average of all your rolls will be very close to E(X)=3.5E(X) = 3.5.

The expected value does not have to be a value XX can actually take. You can never roll 3.53.5; it’s an average, not a prediction for one roll.

Suppose a class of 2020 students has 44 students with no siblings, 1010 with one sibling, and 66 with two. The mean number of siblings is a weighted mean:

0(4)+1(10)+2(6)20=0(420)+1(1020)+2(620)=1.1\frac{0(4) + 1(10) + 2(6)}{20} = 0\left(\frac{4}{20}\right) + 1\left(\frac{10}{20}\right) + 2\left(\frac{6}{20}\right) = 1.1

The fractions 420\tfrac{4}{20}, 1020\tfrac{10}{20}, 620\tfrac{6}{20} act as weights. Expected value is the same calculation, with probabilities as the weights.

For a game, let XX be your net gain: what you win minus what you paid to play. (A loss is a negative gain.)

  • If E(X)>0E(X) \gt 0, the game favours you in the long run.
  • If E(X)<0E(X) \lt 0, the game favours the organizer.
  • If E(X)=0E(X) = 0, the game is fair: on average, nobody gains.

A shortcut: expected net gain == expected winnings −- cost to play.

Find the expected value of the number rolled on a fair die.

Solution. Each value has probability 16\tfrac{1}{6}:

E(X)=1(16)+2(16)+3(16)+4(16)+5(16)+6(16)=216=3.5\begin{aligned} E(X) &= 1\left(\tfrac{1}{6}\right) + 2\left(\tfrac{1}{6}\right) + 3\left(\tfrac{1}{6}\right) + 4\left(\tfrac{1}{6}\right) + 5\left(\tfrac{1}{6}\right) + 6\left(\tfrac{1}{6}\right) \\ &= \frac{21}{6} = 3.5 \end{aligned}

In the long run, the average roll is 3.53.5.

In a town, XX is the number of cars owned by a randomly chosen household:

xx00112233
P(X=x)P(X = x)0.100.100.350.350.400.400.150.15

Find E(X)E(X) and explain what it means.

Solution.

E(X)=0(0.10)+1(0.35)+2(0.40)+3(0.15)=0+0.35+0.80+0.45=1.6E(X) = 0(0.10) + 1(0.35) + 2(0.40) + 3(0.15) = 0 + 0.35 + 0.80 + 0.45 = 1.6

On average, households in this town own 1.61.6 cars. For example, 10001000 households would have about 16001600 cars in total.

A school sells 800800 raffle tickets at $5 each. The prizes are one $1000 gift card, two $250 gift cards, and five $50 gift cards. Find the expected net gain for someone who buys one ticket.

Solution. Find the expected winnings first. The total prize money is 1000+2(250)+5(50)=17501000 + 2(250) + 5(50) = 1750 dollars, spread over 800800 tickets:

E(winnings)=1000(1800)+250(2800)+50(5800)=1750800=2.1875E(\text{winnings}) = 1000\left(\tfrac{1}{800}\right) + 250\left(\tfrac{2}{800}\right) + 50\left(\tfrac{5}{800}\right) = \frac{1750}{800} = 2.1875

Now subtract the cost of the ticket:

E(net gain)=2.1875−5=−2.8125E(\text{net gain}) = 2.1875 - 5 = -2.8125

On average, each ticket loses about $2.81. That’s fine for a fundraiser: the school expects to raise 800(5)−1750=2250800(5) - 1750 = 2250 dollars, which is 800×2.8125800 \times 2.8125. ✓

A carnival game costs $2 to play. You roll two dice. A sum of 22 or 1212 wins $20, a sum of 77 wins $5, and anything else wins nothing. Is the game fair? What price would make it fair?

Solution. From the two-dice distribution, P(2 or 12)=236P(2 \text{ or } 12) = \tfrac{2}{36} and P(7)=636P(7) = \tfrac{6}{36}.

E(winnings)=20(236)+5(636)+0=7036≈1.944E(\text{winnings}) = 20\left(\tfrac{2}{36}\right) + 5\left(\tfrac{6}{36}\right) + 0 = \frac{70}{36} \approx 1.944 E(net gain)=7036−2≈−0.056E(\text{net gain}) = \frac{70}{36} - 2 \approx -0.056

The game isn’t fair: players lose about 66 cents per game on average. It would be fair if the price equalled the expected winnings: 7036\tfrac{70}{36} dollars, or about $1.94.

Forgetting to subtract the cost. Expected winnings and expected net gain are different. In Example 3, the ticket price must come off: 2.1875−52.1875 - 5, not just 2.18752.1875.

Counting the cost twice. If you use net values in the table (like 1000−5=9951000 - 5 = 995 for the top prize and −5-5 for losing), don’t subtract the $5 again at the end. Use one method or the other.

Dividing by the number of values. E(X)E(X) is not the plain average of the values unless they’re equally likely. Use the probabilities as weights.

Expecting E(X) to be a possible outcome. An expected value of 3.53.5 or 1.61.6 is a long-run average. It tells you nothing certain about a single trial.

Leaving out a value with zero payoff. It contributes 00 to the sum, but its probability still matters: the probabilities must add to 11. Check this before you compute.

1. (Warm-up) Find E(X)E(X).

xx112233
P(X=x)P(X = x)0.50.50.30.30.20.2
SolutionE(X)=1(0.5)+2(0.3)+3(0.2)=0.5+0.6+0.6=1.7E(X) = 1(0.5) + 2(0.3) + 3(0.2) = 0.5 + 0.6 + 0.6 = 1.7

2. (Warm-up) In a coin game, heads wins you $3 and tails loses you $1. Find your expected gain per game.

SolutionE(X)=3(12)+(−1)(12)=1.5−0.5=1E(X) = 3\left(\tfrac{1}{2}\right) + (-1)\left(\tfrac{1}{2}\right) = 1.5 - 0.5 = 1

You expect to gain $1 per game on average, so the game favours you.

3. (Warm-up) A spinner has 88 equal sections numbered 11 to 88. Find the expected value of the number spun.

SolutionE(X)=1+2+⋯+88=368=4.5E(X) = \frac{1 + 2 + \dots + 8}{8} = \frac{36}{8} = 4.5

4. (Core) A company sells a one-year phone protection plan for $60. From past data, 4%4\% of customers make a claim, and each claim costs the company $900. Find the company’s expected profit per plan.

Solution

Expected payout per plan: 900(0.04)+0(0.96)=36900(0.04) + 0(0.96) = 36 dollars.

Expected profit per plan: 60−36=2460 - 36 = 24 dollars. The company expects to make $24 per plan in the long run.

5. (Core) A scratch ticket costs $2. It has a 0.0010.001 chance of winning $500, a 0.010.01 chance of winning $20, and otherwise wins nothing. Find the expected net gain per ticket.

SolutionE(winnings)=500(0.001)+20(0.01)=0.5+0.2=0.7E(\text{winnings}) = 500(0.001) + 20(0.01) = 0.5 + 0.2 = 0.7E(net gain)=0.7−2=−1.3E(\text{net gain}) = 0.7 - 2 = -1.3

On average, a buyer loses $1.30 per ticket.

6. (Core) Three coins are flipped, and XX is the number of heads. Find E(X)E(X).

Solution

The distribution is P(0)=18P(0) = \tfrac{1}{8}, P(1)=38P(1) = \tfrac{3}{8}, P(2)=38P(2) = \tfrac{3}{8}, P(3)=18P(3) = \tfrac{1}{8}.

E(X)=0(18)+1(38)+2(38)+3(18)=128=1.5E(X) = 0\left(\tfrac{1}{8}\right) + 1\left(\tfrac{3}{8}\right) + 2\left(\tfrac{3}{8}\right) + 3\left(\tfrac{1}{8}\right) = \frac{12}{8} = 1.5

7. (Core) This distribution has E(X)=1.5E(X) = 1.5. Find aa and bb.

xx00112233
P(X=x)P(X = x)0.20.2aabb0.10.1
Solution

The probabilities add to 11: 0.2+a+b+0.1=10.2 + a + b + 0.1 = 1, so a+b=0.7a + b = 0.7.

The expected value: 0(0.2)+1a+2b+3(0.1)=1.50(0.2) + 1a + 2b + 3(0.1) = 1.5, so a+2b=1.2a + 2b = 1.2.

Subtracting the first equation from the second: b=0.5b = 0.5, so a=0.2a = 0.2.

Check: 0.2+2(0.5)+0.3=1.50.2 + 2(0.5) + 0.3 = 1.5. ✓

8. (Challenge) You roll a die until you get a 66, but stop after 33 rolls no matter what. On average, how many rolls do you make? (The distribution is P(1)=636P(1) = \tfrac{6}{36}, P(2)=536P(2) = \tfrac{5}{36}, P(3)=2536P(3) = \tfrac{25}{36}; see discrete random variables.)

SolutionE(X)=1(636)+2(536)+3(2536)=6+10+7536=9136≈2.53E(X) = 1\left(\tfrac{6}{36}\right) + 2\left(\tfrac{5}{36}\right) + 3\left(\tfrac{25}{36}\right) = \frac{6 + 10 + 75}{36} = \frac{91}{36} \approx 2.53

On average, you make about 2.532.53 rolls.

9. (Challenge) A multiple-choice test gives +4+4 points for a correct answer and −1-1 point for a wrong answer. Each question has 55 choices.

  • (a) Find the expected score from a random guess.
  • (b) You can rule out one choice for certain and guess among the rest. Should you guess? Explain using expected value.
Solution

(a) E=4(15)+(−1)(45)=45−45=0E = 4\left(\tfrac{1}{5}\right) + (-1)\left(\tfrac{4}{5}\right) = \tfrac{4}{5} - \tfrac{4}{5} = 0. A blind guess is a fair game: on average it neither helps nor hurts.

(b) With 44 choices left: E=4(14)+(−1)(34)=1−0.75=0.25E = 4\left(\tfrac{1}{4}\right) + (-1)\left(\tfrac{3}{4}\right) = 1 - 0.75 = 0.25. The expected score is positive, so guessing helps in the long run.