You are on page 1of 5

(c)2017 UM Math Dept

licensed under a Creative Commons


By-NC-SA 4.0 International License.

Homework 3
Math 425: Summer 2017
due Friday, July 21

All solutions to written homework problems must be clearly written, with explanations.
A number or sequence of equations without explanation will not get credit. You are
encouraged to work with other students on the homework, but solutions must be written
independently. Homework is due at the start of class (1 pm) on the due date.

1. Youre on a game show! There are three doors labeled A, B, and C. A new car is
behind one of the three doors, but you dont know which one. You select one of the
doors, say, door A. The host then opens one of doors B or C, as follows: if the car is
behind door B, then he opens door C; if the car is behind door C, then he opens door
B; and if the car is behind door A, then he opens either door B or C with probability
1/2 each. (In any case, the door opened by the host will not have the car behind it.)
The host then gives you the choice of either sticking with door A, or switching to the
remaining unopened door. You win the car if and only if it is behind your final door
selection. Without loss of generality, we assume that the host opens door B.
(a) If you stick with your original choice (i.e., door A), conditional on the host having
opened door B, then what is your probability of winning?
(b) If you switch to the remaining door (i.e., door C), conditional on the host having
opened door B, then what is your probability of winning?
(c) Suppose we change the rules so that, if you originally chose door A and the car
was indeed behind door A, then the host always opens door B. Do the answers
to questions 1 and 2 change?
Note: This is known as the Monty Hall problem. There is a fascinating history of
incorrect solutions to this problem, so beware if you seek help online!
Solution: Throughout, let CA , CB , CC be the events that the car is behind door A,
B, C respectively. Also let HB be the event that the host opens door B.
(a) If we stick with door A, we win if the car is really behind A. So we want the prob-
ability that car is behind A given that the host opened door B. Use Bayes Theorem:
P (HB |CA )P (CA )
P (CA |HB ) =
P (HB |CA )P (CA ) + P (HB |CB )P (CB ) + P (HB |Cv )P (CC )
1 1

2 3 1
= 1 1 1 1 1 =
+0 3 + 2 3
2 3
3
Note that this makes sense if you think about it this way: you are completely ignoring
the host, so the probability you win in this case is the same that you choose the correct
door with no help from the host.
(b) Now we want P (CC |HB ), since if we switch to door C we only win if the car is
really behind C. Computing as above, we get 23 . Two notes: First, the answers to (a)
and (b) should indeed sum to 1, since the door is either behind A or C we conditioned
on the host opening B, so we know the car isnt behind B. Second, this also makes
sense: if you chose the wrong door originally, the host essentially tells you where the
car is, so if you switch, you win. So whats the probability you chose the wrong door
originally?

(c) Now, P (HB |CA ) = 1 instead of 12 . Using Bayess Theorem again gives 12 whether
we stay or switch. Go figure! This is one of the reasons why people argue about the
answer to this problem you have to be very clear about how the host acts.

P.S. If you dont believe the result to (a) and (b), find some cups, a penny and a host
friend and play 50 times!

2. Suppose that we toss a coin n times. Let the random variable X be the difference
between the number of heads seen and the number of tails.

(a) What are the possible values that X can take on?
(b) If n = 5 and the coin has a 32 chance of landing heads on any given toss, what are
the associated probabilities for the values X may assume?
(c) If n is unspecified and the coin lands on heads with a probability p, what are the
probabilities for each of the possible values of X?

Solution: (a) Our outcomes range from the case in which only tails are seen, to the
case in which only heads are seen. If only tails are seen, X = n; if one of the
coins shows heads, we have X = 1 (n 1) = n + 2, etc. Thus we may have
X = n, n + 2, . . . , n 2, n.
Note that if you chose to use the absolute value of the difference, the outcomes are
either 0, 2, . . . , n for n even, or 1, 3, . . . n if n is odd.

(b) The possible values of X are X = 5, 3, 1, 1, 3, 5.


We have P {X = 5} = 315 = 243 1
,
2 1 4 10
P {X = 3} = 5(3 )( 3 ) = 243 ,
P {X = 1} = 52 ( 32 )2 ( 13 )3 = 243 40
,
P {X = 1} = 53 ( 32 )3 ( 13 )2 = 24380
,
P {X = 3} = 5( 32 )4 ( 13 ) = 243
80
, and
2 5 32
P {X = 5} = ( 3 ) = 243 .
(If you used the absolute value, just combine these probabilities accordingly.)

(c) We have P {X = n + 2k} = nk (1 p)nk pk , for k = 0, . . . , n. (Note that there




are several other valid ways to express these probabilities, and again probabilities will
need to be combined if you consider only the absolute value of the difference.)
3. Suppose that 12 people enter an elevator on the 1st floor of a 24 floor building. Assume
that all 12 independently pick a floor randomly to get off on (other than the first floor).
Let Fj be a random variable that is 0 if no people get off on floor j, and 1 if at least
one person gets off on that floor.
(a) Find the probabilities P {Fj = 0} and P {Fj = 1} for each value of j.
(b) What is the expected number of floors at which the elevator stops?
Solution: (a) We observe that Fj = 0 only if all of the 12 people get off on floors other
22 12
than j. There are 22 floors other than the 1st and the jth, so P {Fj = 0} = ( 23 )
0.5866, because the events of each person getting off on the floor are independent.
Thus P {Fj = 1} = 1 ( 22
23
)12 0.4134.
(b) The number, X, of floors at which the elevator stops is the sum of the Fj , so
24
P
X= Fj , and
j=2
" 24
# 24 24 
X X X 
E[X] = E Fj = E[Fj ] = (0)(0.5866) + (1)(0.4134) = 9.51.
j=2 j=2 j=2

So we should expect that the elevator will stop at (9 or) 10 floors.

Be careful here: the actions of each person are independent of each other, but the Fj are
not independent, since if people get off on floor 2, say, it decreases the probability that
someone will get off on floor 3. So X is not a binomial random variable. But thats
ok; expectation is linear in all cases, even for sums of dependent random variables.
4. Suppose that X is a random variable with E[X] = 4 and Var(X) = 5, and Z is a
random variable with E[Z] = 1 and E[Z 2 ] = 1.8. If a, b, and c are constants, find each
of the following.
(a) E[(aX + b)2 ]
(b) Var(cZ) + E[X 2 ]
(c) E[bVar(aX)]
(d) Var(E[aX + b + cZ])
Solution: Note that E[X 2 ] = Var(X) + E[X]2 = 5 + 16 = 21.
(a) Then, using the definition of expectation, we have
X
E[(aX + b)2 ] = E[a2 X 2 + 2abX + b2 ] = (a2 x2j + 2abxj + b2 )p(xj )
= a2 E[X 2 ] + 2abE[X] + b2
= 21a2 + 8ab + b2
(b) Var(cZ) + E[X 2 ] = (1.8 1)c2 + 21 = 21 + 0.8c2
(c) Sorry for the original typo! We cant compute Var(X 2 ) with the given information.
Note that bVar(aX) is a constant, so E[bVar(aX)] = bVar(aX) = a2 bVar(X) = 5a2 b.
(d) 0, since E[aX + b + cZ] is a constant, and the variance of any constant is 0.
5. Suppose that a satellite transmits data to Earth as a string of zeros and ones. Each bit
(that is, each zero or one) has a probability p of being correctly transmitted from the
satellite to the receiver on Earth. Further suppose that each bit is transmitted in tripli-
cate (that is, instead of sending a message 1001, the satellite would send 111000000111),
and the correct value for each bit taken to be the result shown by the majority of the
triple representing the bit (that is, if 110 is received, we assume that a 1 was sent).
What is the probability that a bit will be incorrectly interpreted?
Solution: The number of mis-transmitted bits is binomial, and an incorrect interpre-
tation occurs if there are two or three mis-transmitted bits, so we have
   
3 2 3
P {incorrect} = p(1 p) + (1 p)3 = (1 p)2 (1 + 2p).
2 3

6. A roulette wheel is divided into 38 pockets. 18 are numbered red pockets, 18 are
numbered black pockets and 2 are green pockets. You can place bets on specific red or
black pockets with odds of 35:1. That is, if you are correct you win $35 (plus the dollar
you bet), and if you are incorrect, you lose the dollar you bet. A ball is spun into the
wheel, and we will assume it lands in all pockets with equal probability. Your friend
has developed what he describes as a foolproof system for winning. It involves him
betting on $1 on 7 red again and again. You try to discourage him, but he is insistent.

(a) What are your friends expected winnings after 1 spin of the wheel? What are his
expected winnings after 36 spins of the wheel?
(b) Despite showing him the outcome of the above calculation, he is unwavering in
his opinion, so you decide to at least try to make some money for yourself. You
bet your friend $20 that at the end of 36 spins he will have lost money, i.e., have
less money than he began with. What are your expected winnings in this bet?
What are your friends expected winnings after 36 spins taking this side-bet into
account as well?
(c) Now suppose that your friend plays for 26 spins. Should you make the bet with
him now? What if he spins 20 times? 40 times? 70 times?

Solution: (a) Let X1 be a random variable giving his amount won after one spin.
Then X1 = 35 (with probability 1/38) or X1 = 1 (with probability 37/38). Thus
35 37 1
E[X1 ] = = .
38 38 19
n
P
With Yn = the amount won after n spins, we have Yn = Xj ; the n spins are
j=1
36
independent events, so E[Y36 ] = 19 .

(b) Since he wins $35 if he ever chooses the right number, he will be exactly even if
he wins once in his 36 spins. Thus the only way he can lose money, and the only
way you can win the bet, is if he loses all 36 spins. Since each spin is independent,
this happens with probability (37/38)36 .3828. Thus your probability of winning
your bet with your friend is (37/38)36 , and your expected winnings for this bet are
20 (37/38)36 20 (1 (37/38)36 ) 4.68. Your friends expected winnings from his
bet with you are $4.68. By the linearity of expectation, your friends expected winnings,
taking into account both the roulette and the side bet, are 4.68 36/19 2.79.

Playing roulette with your friends strategy has a negative expected winnings (he loses
money on average). But having a negative expected value does not mean the probability
you lose money is more than one half the probability that your friend loses money at
roulette is only about .38, which may be why he likes this strategy. This kind of game
is essentially the opposite of a lottery. Here the payout is small, but the probability of
winning is decent, while in the lottery the payout is big, but the probability of winning
is very small.

(c) For 26 spins, your friend still loses money unless he gets at least one win. The odds
that he gets no wins is now (37/38)26 0.50, so in this case the odds that you make
money on your side bet with him are even. So if he spins fewer than 26 times, you will
likely make money; indeed, we see that if he only spins 20 times, the odds of no wins
is (37/38)20 0.59, so you should make the bet in this case.
For 40 spins, your friend needs to win at least twice to avoid losing money, since one
win brings in $35, but he has lost $39.
 40    39  
37 40 37 1
P {you win} = + 0.716.
38 1 38 38

So your chance of winning is now quite a bit higher.

The situation is similar for 70 spins: your friend needs to win at least twice to avoid
losing money (if he wins once, he makes $35, but has spent $69; winning twice, he
makes $70 and has spent only $68). So you win the bet if he wins no times or only
once, which now has a probability of only
 70    69  
37 70 37 1
P {you win} = + 0.447.
38 1 38 38

Note we can guess a pattern: we should take the bet for 126 spins, again for 3661
spins, etc.

You might also like