Solutions To In-Class Problems Week 13, Wed
Solutions To In-Class Problems Week 13, Wed
Solutions To In-Class Problems Week 13, Wed
Problem 1.
Let’s see what it takes to make Carnival Dice fair. Here’s the game with payoff parameter k: make
three independent rolls of a fair die. If you roll a six
Solution. Let the random variable P be your payoff. Then we can compute E [P ] as follows:
Problem 2.
A classroom has sixteen desks arranged as shown below.
If there is a girl in front, behind, to the left, or to the right of a boy, then the two of them flirt.
One student may be in multiple flirting couples; for example, a student in a corner of the class
room can flirt with up to two others, while a student in the center can flirt with as many as four
others. Suppose that desks are occupied by boys and girls with equal probability and mutually
independently. What is the expected number of flirting couples? Hint: Linearity.
Solution. First, let’s count the number of pairs of adjacent desks. There are three in each row and
three in each column. Since there are four rows and four columns, there are 3 · 4 + 3 · 4 = 24 pairs
of adjacent desks.
Number these pairs of adjacent desks from 1 to 24. Let Fi be an indicator for the event that
occupants of the desks in the i-th pair are flirting. The probability we want is then:
� 24 � 24
� �
E Fi = E [Fi ] (linearity of E [·])
i=1 i=1
�24
The occupants of adjacent desks are flirting iff they are of opposite sexes, which happens with
probability 1/2, that is, Pr {Fi = 1} = 1/2. Plugging this into the previous expression gives:
� 24 � 24
� � 1
E Fi = Pr {Fi = 1} = 24 · = 12
2
i=1 i=1
Problem 3. (a) Suppose we flip a fair coin until two Tails in a row come up. What is the expected
number, NTT , of flips we perform? Hint: Let D be the tree diagram for this process. Explain why
D = H · D + T · (H · D + T ). Use the Law of Total Expectation 20.3.5
Solutions to In-Class Problems Week 13, Wed. 3
Solution. NTT = 6.
From D and Total Expectation:
� �
1 1 1 1
NTT = · [1 + NTT ] + · 1 + · [1 + NTT ] + · 1
2 2 2 2
(b) Suppose we flip a fair coin until a Tail immediately followed by a Head come up. What is the
expected number, NTH , of flips we perform?
Solution. NTH = 4.
So
1 1
NTH =· [1 + NTH ] + · [1 + NB ]
2 2
where NB is the expected number of flips in the B subtree. But
1 1
NB = · 1 + · [1 + NB ].
2 2
That is, NB = 2. Hence,
1 1
NTH = · [1 + 2] + · [1 + NTH ]
2 2
which implies NTH = 4. �
(c) Suppose we now play a game: flip a fair coin until either TT or TH first occurs. You win if TT
comes up first, lose if TH comes up first. Since TT takes 50% longer on average to turn up, your
opponent agrees that he has the advantage. So you tell him you’re willing to play if you pay him
$5 when he wins, but he merely pays you a 20% premium, that is, $6, when you win.
If you do this, you’re sneakily taking advantage of your opponent’s untrained intuition, since
you’ve gotten him to agree to unfair odds. What is your expected profit per game?
Solution. It’s easy to see that both TT and TH are equally likely to show up first. (Every game
play consists of a sequence of H’s followed by a T, after which the game ends with a T or an H,
with equal probability.) So your expected profit is
1 1
· 6 + · (−5)
2 2
dollars, that is 50 cents per game. So leap to play. �
Problem 4.
Justify each line of the following proof that if R1 and R2 are independent, then
Proof.
E [R1 · R2 ]
�
= r · Pr {R1 · R2 = r}
r∈range(R1 ·R2 )
�
= r1 r2 · Pr {R1 = r1
and R2 = r2 }
ri ∈range(Ri )
� �
= r1 r2 · Pr {R1 = r1 and R2 = r2 }
r1 ∈range(R1 ) r2 ∈range(R2 )
� �
= r1 r2 ·
Pr {R1 = r1 } · Pr {R2 = r2 }
r1 ∈range(R1 ) r2 ∈range(R2 )
⎛ ⎞
� �
= ⎝r1 Pr {R1 = r1 } · r2 Pr {R2 = r2 }⎠
r1 ∈range(R1 ) r2 ∈range(R2 )
�
= r1 Pr {R1 = r1 } · E [R2 ]
r1 ∈range(R1 )
�
= E [R2 ] · r1 Pr {R1 = r1 }
r1 ∈range(R1 )
= E [R2 ] · E [R1 ] .
Solution. Proof.
E [R1 · R2 ]
�
::= r · Pr {R1 · R2 = r} (by definition)
r∈range(R1 ·R2 )
�
= r1 r2 · Pr {R1 = r1 AND R2 = r2 } (event [R1 · R2 = r] splits into events
ri ∈range(Ri )
� �
�
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.