M
Math Coach Amy
Amy Ferguson Moncure

IB AA · 8A Discrete Random Variables

Expected Value from an Experiment

Build the probability distribution first. Then multiply each value by its probability and add.

Jump to section:

Find P(X = x) for every x.

E(X) = Σ x P(X = x)

What to Remember

Distribution first

List the values and their probabilities. Check that the probabilities add to 1.

Then the expected value

E(X) = Σ x P(X = x).

A count from a bag

Use the paths for two draws without replacement, then put those probabilities into the expected-value formula.

A sum

Count the ways to get each sum. Each pair of faces is equally likely.

Easy

Easy

A fair coin, or one fair die.

Example
A fair coin is tossed twice. X is the number of heads. Find the probability distribution of X, and find E(X).

Each trial has 2 equally likely results, H and T.

2 trials give 4 equally likely outcomes.

The outcomes are TT, TH, HT, HH.

X = 0: TT. 1 outcome.

X = 1: TH, HT. 2 outcomes.

X = 2: HH. 1 outcome.

P(X = x) = number of outcomestotal outcomes

P(X = 0) = 14

P(X = 1) = 24

P(X = 1) = 12

P(X = 2) = 14

X012
P(X = x)141214

The probabilities add to 1.

14 + 24 + 14 = 44

44 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 14 + 1 × 12 + 2 × 14

E(X) = 02 + 12 + 12

E(X) = 22

E(X) = 1

Answer: E(X) = 1

1
A fair coin is tossed twice. X is the number of tails. Find the probability distribution of X, and find E(X).
Show Answer

Each trial has 2 equally likely results, H and T.

2 trials give 4 equally likely outcomes.

The outcomes are TT, TH, HT, HH.

X = 0: HH. 1 outcome.

X = 1: TH, HT. 2 outcomes.

X = 2: TT. 1 outcome.

P(X = x) = number of outcomestotal outcomes

P(X = 0) = 14

P(X = 1) = 24

P(X = 1) = 12

P(X = 2) = 14

X012
P(X = x)141214

The probabilities add to 1.

14 + 24 + 14 = 44

44 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 14 + 1 × 12 + 2 × 14

E(X) = 02 + 12 + 12

E(X) = 22

E(X) = 1

Answer: E(X) = 1

2
A fair coin is tossed three times. X is the number of heads. Find the probability distribution of X, and find E(X).
Show Answer

Each trial has 2 equally likely results, H and T.

3 trials give 8 equally likely outcomes.

The outcomes are TTT, TTH, THT, THH, HTT, HTH, HHT, HHH.

X = 0: TTT. 1 outcome.

X = 1: TTH, THT, HTT. 3 outcomes.

X = 2: THH, HTH, HHT. 3 outcomes.

X = 3: HHH. 1 outcome.

P(X = x) = number of outcomestotal outcomes

P(X = 0) = 18

P(X = 1) = 38

P(X = 2) = 38

P(X = 3) = 18

X0123
P(X = x)18383818

The probabilities add to 1.

18 + 38 + 38 + 18 = 88

88 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 18 + 1 × 38 + 2 × 38 + 3 × 18

E(X) = 08 + 38 + 68 + 38

E(X) = 128

E(X) = 32

Answer: E(X) = 32

3
Three fair coins are tossed. X is the number of tails. Find the probability distribution of X, and find E(X).
Show Answer

Each trial has 2 equally likely results, H and T.

3 trials give 8 equally likely outcomes.

The outcomes are TTT, TTH, THT, THH, HTT, HTH, HHT, HHH.

X = 0: HHH. 1 outcome.

X = 1: THH, HTH, HHT. 3 outcomes.

X = 2: TTH, THT, HTT. 3 outcomes.

X = 3: TTT. 1 outcome.

P(X = x) = number of outcomestotal outcomes

P(X = 0) = 18

P(X = 1) = 38

P(X = 2) = 38

P(X = 3) = 18

X0123
P(X = x)18383818

The probabilities add to 1.

18 + 38 + 38 + 18 = 88

88 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 18 + 1 × 38 + 2 × 38 + 3 × 18

E(X) = 08 + 38 + 68 + 38

E(X) = 128

E(X) = 32

Answer: E(X) = 32

4
A fair six-sided die is rolled once. X is the number shown. Find the probability distribution of X, and find E(X).
Show Answer

The possible values are 1, 2, 3, 4, 5, 6.

There are 6 equally likely outcomes.

P(X = x) = 16

X123456
P(X = x)161616161616

The probabilities add to 1.

16 + 16 + 16 + 16 + 16 + 16 = 66

66 = 1

E(X) = Σ x P(X = x)

E(X) = 1 × 16 + 2 × 16 + 3 × 16 + 4 × 16 + 5 × 16 + 6 × 16

E(X) = 16 + 26 + 36 + 46 + 56 + 66

E(X) = 216

E(X) = 72

Answer: E(X) = 72

5
A fair four-sided die, numbered 1 to 4, is rolled once. X is the number shown. Find the probability distribution of X, and find E(X).
Show Answer

The possible values are 1, 2, 3, 4.

There are 4 equally likely outcomes.

P(X = x) = 14

X1234
P(X = x)14141414

The probabilities add to 1.

14 + 14 + 14 + 14 = 44

44 = 1

E(X) = Σ x P(X = x)

E(X) = 1 × 14 + 2 × 14 + 3 × 14 + 4 × 14

E(X) = 14 + 24 + 34 + 44

E(X) = 104

E(X) = 52

Answer: E(X) = 52

Medium

Medium

Two objects are taken without replacement.

Example
A bag contains 5 red counters and 3 blue counters. Two counters are taken at random, without replacement. X is the number of red counters. Find the probability distribution of X, and find E(X).

Two are drawn, one after the other, without putting the first one back.

First red, probability 58

then red, probability 47

then blue, probability 37

First blue, probability 38

then red, probability 57

then blue, probability 27

P(X = 2) = P(red then red)

P(X = 2) = 58 × 47

P(X = 2) = 2056

P(X = 2) = 514

P(X = 1) = P(red then blue) + P(blue then red)

P(red then blue) = 58 × 37

P(red then blue) = 1556

P(blue then red) = 38 × 57

P(blue then red) = 1556

P(X = 1) = 1556 + 1556

P(X = 1) = 16803136

P(X = 1) = 1528

P(X = 0) = P(blue then blue)

P(X = 0) = 38 × 27

P(X = 0) = 656

P(X = 0) = 328

X012
P(X = x)3281528514

The probabilities add to 1.

328 + 1528 + 1028 = 2828

2828 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 328 + 1 × 1528 + 2 × 514

E(X) = 028 + 1528 + 2028

E(X) = 3528

E(X) = 54

Answer: E(X) = 54

1
A bag contains 4 red marbles and 4 blue marbles. Two marbles are taken at random, without replacement. X is the number of red marbles. Find the probability distribution of X, and find E(X).
Show Answer

Two are drawn, one after the other, without putting the first one back.

First red, probability 12

then red, probability 37

then blue, probability 47

First blue, probability 12

then red, probability 47

then blue, probability 37

P(X = 2) = P(red then red)

P(X = 2) = 12 × 37

P(X = 2) = 314

P(X = 1) = P(red then blue) + P(blue then red)

P(red then blue) = 12 × 47

P(red then blue) = 414

P(red then blue) = 27

P(blue then red) = 12 × 47

P(blue then red) = 414

P(blue then red) = 27

P(X = 1) = 27 + 27

P(X = 1) = 2849

P(X = 1) = 47

P(X = 0) = P(blue then blue)

P(X = 0) = 12 × 37

P(X = 0) = 314

X012
P(X = x)31447314

The probabilities add to 1.

314 + 814 + 314 = 1414

1414 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 314 + 1 × 47 + 2 × 314

E(X) = 07 + 47 + 37

E(X) = 77

E(X) = 1

Answer: E(X) = 1

2
A bag contains 6 yellow counters and 2 green counters. Two counters are taken at random, without replacement. X is the number of yellow counters. Find the probability distribution of X, and find E(X).
Show Answer

Two are drawn, one after the other, without putting the first one back.

First yellow, probability 34

then yellow, probability 57

then green, probability 27

First green, probability 14

then yellow, probability 67

then green, probability 17

P(X = 2) = P(yellow then yellow)

P(X = 2) = 34 × 57

P(X = 2) = 1528

P(X = 1) = P(yellow then green) + P(green then yellow)

P(yellow then green) = 34 × 27

P(yellow then green) = 628

P(yellow then green) = 314

P(green then yellow) = 14 × 67

P(green then yellow) = 628

P(green then yellow) = 314

P(X = 1) = 314 + 314

P(X = 1) = 84196

P(X = 1) = 37

P(X = 0) = P(green then green)

P(X = 0) = 14 × 17

P(X = 0) = 128

X012
P(X = x)128371528

The probabilities add to 1.

128 + 1228 + 1528 = 2828

2828 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 128 + 1 × 37 + 2 × 1528

E(X) = 014 + 614 + 1514

E(X) = 2114

E(X) = 32

Answer: E(X) = 32

3
A bag contains 10 red beads and 6 blue beads. Two beads are taken at random, without replacement. X is the number of blue beads. Find the probability distribution of X, and find E(X).
Show Answer

Two are drawn, one after the other, without putting the first one back.

First blue, probability 38

then blue, probability 13

then red, probability 23

First red, probability 58

then blue, probability 25

then red, probability 35

P(X = 2) = P(blue then blue)

P(X = 2) = 38 × 13

P(X = 2) = 324

P(X = 2) = 18

P(X = 1) = P(blue then red) + P(red then blue)

P(blue then red) = 38 × 23

P(blue then red) = 624

P(blue then red) = 14

P(red then blue) = 58 × 25

P(red then blue) = 1040

P(red then blue) = 14

P(X = 1) = 14 + 14

P(X = 1) = 816

P(X = 1) = 12

P(X = 0) = P(red then red)

P(X = 0) = 58 × 35

P(X = 0) = 1540

P(X = 0) = 38

X012
P(X = x)381218

The probabilities add to 1.

38 + 48 + 18 = 88

88 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 38 + 1 × 12 + 2 × 18

E(X) = 04 + 24 + 14

E(X) = 34

Answer: E(X) = 34

4
Two cards are dealt from a standard pack of 52 cards. X is the number of aces. Find the probability distribution of X, and find E(X).
Show Answer

Two are drawn, one after the other, without putting the first one back.

First ace, probability 113

then ace, probability 117

then non-ace, probability 1617

First non-ace, probability 1213

then ace, probability 451

then non-ace, probability 4751

P(X = 2) = P(ace then ace)

P(X = 2) = 113 × 117

P(X = 2) = 1221

P(X = 1) = P(ace then non-ace) + P(non-ace then ace)

P(ace then non-ace) = 113 × 1617

P(ace then non-ace) = 16221

P(non-ace then ace) = 1213 × 451

P(non-ace then ace) = 48663

P(non-ace then ace) = 16221

P(X = 1) = 16221 + 16221

P(X = 1) = 707248841

P(X = 1) = 32221

P(X = 0) = P(non-ace then non-ace)

P(X = 0) = 1213 × 4751

P(X = 0) = 564663

P(X = 0) = 188221

X012
P(X = x)188221322211221

The probabilities add to 1.

188221 + 32221 + 1221 = 221221

221221 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 188221 + 1 × 32221 + 2 × 1221

E(X) = 0221 + 32221 + 2221

E(X) = 34221

E(X) = 213

Answer: E(X) = 213

5
Two cards are dealt from a standard pack of 52 cards. X is the number of face cards. There are 12 face cards. Find the probability distribution of X, and find E(X).
Show Answer

Two are drawn, one after the other, without putting the first one back.

First face card, probability 313

then face card, probability 1151

then other card, probability 4051

First other card, probability 1013

then face card, probability 417

then other card, probability 1317

P(X = 2) = P(face card then face card)

P(X = 2) = 313 × 1151

P(X = 2) = 33663

P(X = 2) = 11221

P(X = 1) = P(face card then other card) + P(other card then face card)

P(face card then other card) = 313 × 4051

P(face card then other card) = 120663

P(face card then other card) = 40221

P(other card then face card) = 1013 × 417

P(other card then face card) = 40221

P(X = 1) = 40221 + 40221

P(X = 1) = 1768048841

P(X = 1) = 80221

P(X = 0) = P(other card then other card)

P(X = 0) = 1013 × 1317

P(X = 0) = 130221

P(X = 0) = 1017

X012
P(X = x)10178022111221

The probabilities add to 1.

130221 + 80221 + 11221 = 221221

221221 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 1017 + 1 × 80221 + 2 × 11221

E(X) = 0221 + 80221 + 22221

E(X) = 102221

E(X) = 613

Answer: E(X) = 613

Hard

Hard

A sum of two dice, a repeated roll, or two cards.

Example
Two fair dice, each numbered 1 to 5, are rolled. X is the sum. Find the probability distribution of X, and find E(X).
+12345
123456
234567
345678
456789
5678910

There are 25 equally likely outcomes. The cell is the sum.

P(X = x) = number of ways25

P(X = 2) = 125

P(X = 3) = 225

P(X = 4) = 325

P(X = 5) = 425

P(X = 6) = 525

P(X = 6) = 15

P(X = 7) = 425

P(X = 8) = 325

P(X = 9) = 225

P(X = 10) = 125

X2345678910
P(X = x)12522532542515425325225125

The probabilities add to 1.

125 + 225 + 325 + 425 + 525 + 425 + 325 + 225 + 125 = 2525

2525 = 1

E(X) = Σ x P(X = x)

E(X) = 2 × 125 + 3 × 225 + 4 × 325 + 5 × 425 + 6 × 15 + 7 × 425 + 8 × 325 + 9 × 225 + 10 × 125

E(X) = 225 + 625 + 1225 + 2025 + 3025 + 2825 + 2425 + 1825 + 1025

E(X) = 15025

E(X) = 6

Answer: E(X) = 6

1
A fair six-sided die is rolled twice. X is the number of 6s. Find the probability distribution of X, and find E(X).
Show Answer

The two results are independent.

P(X = 0) = P(not a 6) × P(not a 6)

P(X = 0) = 56 × 56

P(X = 0) = 2536

P(X = 2) = P(a 6) × P(a 6)

P(X = 2) = 16 × 16

P(X = 2) = 136

P(X = 1) = P(a 6 then not a 6) + P(not a 6 then a 6)

P(a 6 then not a 6) = 16 × 56

P(a 6 then not a 6) = 536

P(not a 6 then a 6) = 56 × 16

P(not a 6 then a 6) = 536

P(X = 1) = 536 + 536

P(X = 1) = 1036

P(X = 1) = 518

X012
P(X = x)2536518136

The probabilities add to 1.

2536 + 1036 + 136 = 3636

3636 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 2536 + 1 × 518 + 2 × 136

E(X) = 018 + 518 + 118

E(X) = 618

E(X) = 13

Answer: E(X) = 13

2
A fair four-sided die, numbered 1 to 4, is rolled three times. X is the number of 4s. Find the probability distribution of X, and find E(X).
Show Answer

The three results are independent.

P(X = 0) = not a 4 then not a 4 then not a 4

P(X = 0) = 34 × 34 × 34

P(X = 0) = 2764

1 a 4: the 3 orders are SFF, FSF, FFS.

S means a 4, and F means not a 4.

P(one outcome with 1 a 4) = 14 × 34 × 34

P(one outcome with 1 a 4) = 964

P(X = 1) = 3 × 964

P(X = 1) = 2764

2 a 4: the 3 orders are SSF, SFS, FSS.

S means a 4, and F means not a 4.

P(one outcome with 2 a 4) = 14 × 14 × 34

P(one outcome with 2 a 4) = 364

P(X = 2) = 3 × 364

P(X = 2) = 964

P(X = 3) = a 4 then a 4 then a 4

P(X = 3) = 14 × 14 × 14

P(X = 3) = 164

X0123
P(X = x)27642764964164

The probabilities add to 1.

2764 + 2764 + 964 + 164 = 6464

6464 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 2764 + 1 × 2764 + 2 × 964 + 3 × 164

E(X) = 064 + 2764 + 1864 + 364

E(X) = 4864

E(X) = 34

Answer: E(X) = 34

3
A bag contains 9 red sweets and 5 yellow sweets. Two sweets are taken at random, without replacement. X is the number of yellow sweets. Find the probability distribution of X, and find E(X).
Show Answer

Two are drawn, one after the other, without putting the first one back.

First yellow, probability 514

then yellow, probability 413

then red, probability 913

First red, probability 914

then yellow, probability 513

then red, probability 813

P(X = 2) = P(yellow then yellow)

P(X = 2) = 514 × 413

P(X = 2) = 20182

P(X = 2) = 1091

P(X = 1) = P(yellow then red) + P(red then yellow)

P(yellow then red) = 514 × 913

P(yellow then red) = 45182

P(red then yellow) = 914 × 513

P(red then yellow) = 45182

P(X = 1) = 45182 + 45182

P(X = 1) = 1638033124

P(X = 1) = 4591

P(X = 0) = P(red then red)

P(X = 0) = 914 × 813

P(X = 0) = 72182

P(X = 0) = 3691

X012
P(X = x)369145911091

The probabilities add to 1.

3691 + 4591 + 1091 = 9191

9191 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 3691 + 1 × 4591 + 2 × 1091

E(X) = 091 + 4591 + 2091

E(X) = 6591

E(X) = 57

Answer: E(X) = 57

4
Two cards are dealt from a standard pack of 52 cards. X is the number of clubs. Find the probability distribution of X, and find E(X).
Show Answer

Two are drawn, one after the other, without putting the first one back.

First club, probability 14

then club, probability 417

then non-club, probability 1317

First non-club, probability 34

then club, probability 1351

then non-club, probability 3851

P(X = 2) = P(club then club)

P(X = 2) = 14 × 417

P(X = 2) = 468

P(X = 2) = 117

P(X = 1) = P(club then non-club) + P(non-club then club)

P(club then non-club) = 14 × 1317

P(club then non-club) = 1368

P(non-club then club) = 34 × 1351

P(non-club then club) = 39204

P(non-club then club) = 1368

P(X = 1) = 1368 + 1368

P(X = 1) = 17684624

P(X = 1) = 1334

P(X = 0) = P(non-club then non-club)

P(X = 0) = 34 × 3851

P(X = 0) = 114204

P(X = 0) = 1934

X012
P(X = x)19341334117

The probabilities add to 1.

1934 + 1334 + 234 = 3434

3434 = 1

E(X) = Σ x P(X = x)

E(X) = 0 × 1934 + 1 × 1334 + 2 × 117

E(X) = 034 + 1334 + 434

E(X) = 1734

E(X) = 12

Answer: E(X) = 12

5
Two fair six-sided dice are rolled. X is the sum of the two numbers. Find the probability distribution of X, and find E(X).
Show Answer
+123456
1234567
2345678
3456789
45678910
567891011
6789101112

There are 36 equally likely outcomes. The cell is the sum.

P(X = x) = number of ways36

P(X = 2) = 136

P(X = 3) = 236

P(X = 3) = 118

P(X = 4) = 336

P(X = 4) = 112

P(X = 5) = 436

P(X = 5) = 19

P(X = 6) = 536

P(X = 7) = 636

P(X = 7) = 16

P(X = 8) = 536

P(X = 9) = 436

P(X = 9) = 19

P(X = 10) = 336

P(X = 10) = 112

P(X = 11) = 236

P(X = 11) = 118

P(X = 12) = 136

X23456789101112
P(X = x)136118112195361653619112118136

The probabilities add to 1.

136 + 236 + 336 + 436 + 536 + 636 + 536 + 436 + 336 + 236 + 136 = 3636

3636 = 1

E(X) = Σ x P(X = x)

E(X) = 2 × 136 + 3 × 118 + 4 × 112 + 5 × 19 + 6 × 536 + 7 × 16 + 8 × 536 + 9 × 19 + 10 × 112 + 11 × 118 + 12 × 136

E(X) = 118 + 318 + 618 + 1018 + 1518 + 2118 + 2018 + 1818 + 1518 + 1118 + 618

E(X) = 12618

E(X) = 7

Answer: E(X) = 7

Want to go over a random variable together?

Book a Session with Amy