← Statistics

Statistics

Expected Value

Lesson

A discrete random variable XX can take a finite list of values, each with its own probability. The list of (value, probability) pairs is a probability distribution — and the probabilities must sum to 1.

The expected value of XX is its weighted average — multiply each value by its probability, then add:

E(X)=ixiP(xi)E(X) = \sum_{i} x_i \cdot P(x_i)

Think of E(X)E(X)as the long-run average per trial. If you played a game many times, your average outcome would approach the expected value. A “fair game” is one where the expected profit (after the cost to play) is 0.

Worked example 1

A die roll. XX = the number rolled. Each value 1–6 has probability 16\tfrac{1}{6}.

E(X)=16(1+2+3+4+5+6)=216=3.5E(X) = \tfrac{1}{6}(1 + 2 + 3 + 4 + 5 + 6) = \tfrac{21}{6} = 3.5

Worked example 2 — game with a cost

You pay $5 to play. You win $20 with probability 0.2, otherwise you win nothing. What’s the expected profit?

Profit on each outcome subtracts the $5 cost:

E(profit)=0.2(205)+0.8(05)=0.2(15)+0.8(5)=34=1\begin{aligned} E(\text{profit}) &= 0.2(20 - 5) + 0.8(0 - 5) \\ &= 0.2(15) + 0.8(-5) \\ &= 3 - 4 = -1 \end{aligned}

On average, you lose $1 per play — not a fair game.

How to type your answer

A single number. Use a decimal point or a fraction. Examples: 3.5, 0, -1, 1.7.

Practice

Work through these. Stuck? Click Get a hint.

Warm-Up

Quick problems to get going.

Problem 1

Coin: heads = $1, tails = -$1. E(X)\text{Coin: heads = \$1, tails = -\$1. } E(X)

Problem 2

Roll a die. X=value rolled. E(X)\text{Roll a die. } X = \text{value rolled. } E(X)

Problem 3

P(X=8)=1/4, P(X=0)=3/4. E(X)P(X=8) = 1/4,\ P(X=0) = 3/4.\ E(X)

Problem 4

P(X=10)=1/2, P(X=0)=1/2. E(X)P(X=10) = 1/2,\ P(X=0) = 1/2.\ E(X)

Practice

Standard problems matching the lesson.

Problem 5

Game: win $5 with P=0.3, $0 with P=0.7. E(winnings)\text{Game: win \$5 with } P=0.3,\ \$0 \text{ with } P=0.7.\ E(\text{winnings})

Problem 6

P(X=1)=0.5, P(X=2)=0.3, P(X=3)=0.2. E(X)P(X=1)=0.5,\ P(X=2)=0.3,\ P(X=3)=0.2.\ E(X)

Problem 7

P(X=0)=0.2, P(X=1)=0.5, P(X=2)=0.3. E(X)P(X=0)=0.2,\ P(X=1)=0.5,\ P(X=2)=0.3.\ E(X)

Problem 8

Lottery: $100 with P=0.01, $0 with P=0.99. E(prize)\text{Lottery: \$100 with } P=0.01,\ \$0 \text{ with } P=0.99.\ E(\text{prize})

Problem 9

4 red ($5), 6 blue ($0). Draw one. E(winnings)\text{4 red (\$5), 6 blue (\$0). Draw one. } E(\text{winnings})

Problem 10

Two dice. X=sum.E(X)\text{Two dice. } X = \text{sum}. E(X)

Problem 11

Roll die. 1-3: lose $2; 4-6: win $3. E(profit)\text{Roll die. 1-3: lose \$2; 4-6: win \$3. } E(\text{profit})

Problem 12

P(X=10)=0.1, P(20)=0.2, P(30)=0.3, P(40)=0.4. E(X)P(X=10)=0.1,\ P(20)=0.2,\ P(30)=0.3,\ P(40)=0.4.\ E(X)

Problem 13

Red (0.4): $10, Blue (0.3): $5, Green (0.3): -$5. E\text{Red (0.4): \$10, Blue (0.3): \$5, Green (0.3): -\$5. } E

Problem 14

Raffle: $100 (P=0.01), $20 (P=0.05), else $0. E(winnings)\text{Raffle: \$100 (P=0.01), \$20 (P=0.05), else \$0. } E(\text{winnings})

Challenge

Harder problems — edge cases, trickier numbers, multiple steps.

Problem 15

P(X=2)=0.1, P(1)=0.2, P(0)=0.4, P(1)=0.2, P(2)=0.1. E(X)P(X=-2)=0.1,\ P(-1)=0.2,\ P(0)=0.4,\ P(1)=0.2,\ P(2)=0.1.\ E(X)

Problem 16

Pay $5. Win $20 (P=0.2), $0 (P=0.8). E(profit)\text{Pay \$5. Win \$20 (P=0.2), \$0 (P=0.8). } E(\text{profit})

Problem 17

P(X=1)=P(X=2)==P(X=5)=1/5. E(X)P(X=1)=P(X=2)=\cdots=P(X=5)=1/5.\ E(X)

Problem 18

Weighted die: P(1)=P(2)=0.1, P(3)=P(4)=P(5)=P(6)=0.2. E(X)\text{Weighted die: } P(1)=P(2)=0.1,\ P(3)=P(4)=P(5)=P(6)=0.2.\ E(X)

Problem 19

Insurance: $1000 claim with P=0.01, $0 else. E(claim)\text{Insurance: \$1000 claim with } P=0.01,\ \$0 \text{ else}.\ E(\text{claim})

Problem 20

Hold 2 of 100 raffle tickets; $50 prize. E(winnings)\text{Hold 2 of 100 raffle tickets; \$50 prize. } E(\text{winnings})

Problem 21

Roll die. Win $11 if 6; lose $1 otherwise. E(profit)\text{Roll die. Win \$11 if 6; lose \$1 otherwise. } E(\text{profit})

Problem 22

P(X=0)=0.1, P(1)=0.2, P(2)=0.4, P(3)=0.2, P(4)=0.1. E(X)P(X=0)=0.1,\ P(1)=0.2,\ P(2)=0.4,\ P(3)=0.2,\ P(4)=0.1.\ E(X)