$29
CS 70 Discrete Mathematics and Probability Theory
HW 10
Sundry
Before you start your homework, write down your team. Who else did you work with on this
homework? List names and email addresses. (In case of homework party, you can also just describe
the group.) How did you work on this homework? Working in groups of 3-5 will earn credit for
your "Sundry" grade.
Please copy the following statement and sign next to it:
I certify that all solutions are entirely in my words and that I have not looked at another student’s
solutions. I have credited all external sources in this write up.
1 How Many Queens?
You shuffle a standard 52-card deck, before drawing the first three cards from the top of the pile.
Let X denote the number of queens you draw.
(a) What is P(X = 0)?
(b) What is P(X = 1)?
(c) What is P(X = 2)?
(d) What is P(X = 3)?
(e) Do the answers you computed in parts (a) through (d) add up to 1, as expected?
(f) Compute E(X) from the definition of expectation.
(g) Suppose we define indicators Xi
, 1 ≤ i ≤ 3, where Xi
is the indicator variable that equals 1 if
the ith card is a queen and 0 otherwise. Compute E(X).
(h) Are the Xi
indicators independent? Does this affect your solution to part (g)?
CS 70, Fall 2017, HW 10 1
2 Who Has More Sisters?
Out of all families in the world with n 0 children, you sample one at random and observe X, the
total number of sisters that the male children in this family have, and Y, the total number of sisters
that the female children in this family have (for example, if n = 3 and there are two males and one
female, then X = 2 and Y = 0).
Assuming that each child born into the world has an equal chance of being male or female, find
expressions for E(X) and E(Y) in terms of n (these expressions should not involve summations).
Based on your expressions, do males have more sisters or females have more sisters, on average?
[Hint: Define a random variable B to denote the number of boys, find an expression for X as a
function of B, and apply linearity of expectation. Use a similar approach for girls.]
3 Student Life
In an attempt to avoid having to do laundry often, Marcus comes up with a system. Every night,
he designates one of his shirts as his dirtiest shirt. In the morning, he randomly picks one of his
shirts to wear. If he picked the dirtiest one, he puts it in a dirty pile at the end of the day (a shirt
in the dirty pile is not used again until it is cleaned). When Marcus puts his last shirt into the dirty
pile, he finally does his laundry, and again designates one of his shirts as his dirtiest shirt (laundry
isn’t perfect) before going to bed. This process then repeats.
(a) If Marcus has n shirts, what is the expected number of days that transpire between laundry
events? Your answer should be a function of n involving no summations.
(b) Say he gets even lazier, and instead of organizing his shirts in his dresser every night, he
throws his shirts randomly onto one of n different locations in his room (one shirt per location),
designates one of his shirts as his dirtiest shirt, and one location as the dirtiest location. In the
morning, if he happens to pick the dirtiest shirt, and the dirtiest shirt was in the dirtiest location,
then he puts the shirt into the dirty pile at the end of the day and does not use that location
anymore (it is too dirty now). What is the expected number of days that transpire between
laundry events now? Again, your answer should be a function of n involving no summations.
4 Soccer Practice
Messi and Ronaldo are practicing their penalty kicks. In each round of their training exercise,
each player takes a penalty kick and either scores or misses. Assume (somewhat unrealistically)
that each penalty is independent of every other penalty kick, with Messi missing each penalty with
probability p1 and Ronaldo missing each penalty with probability p2. Show that the number of
rounds until the first miss of either player is geometrically distributed with parameter p1 + p2 −
p1 p2.
CS 70, Fall 2017, HW 10 2
5 Boutique Store
(a) Consider a boutique store in a busy shopping mall. Every hour, a large number of people visit
the mall, and each independently enters the boutique store with some small probability. The
store owner decides to model X, the number of customers that enter her store during a particular
hour, as a Poisson random variable with mean λ. Suppose that whenever a customer enters
the boutique store, they leave the shop without buying anything with probability p. Assume
that customers act independently, i.e. you can assume that they each simply flip a biased coin
to decide whether to buy anything at all. Let us denote the number of customers that buy
something as Y and the number of them that do not buy anything as Z (so X = Y +Z). What is
the probability that Y = k for a given k? How about P[Z = k]? Prove that Y and Z are Poisson
random variables themselves.
Hint: You can use the identity
e
x =
∞
∑
k=0
x
k
k!
.
(b) Prove that Y and Z are independent.
6 Sum of Poisson Variables
Assume that you were given two independent Poisson random variables X1,X2. Assume that the
first has mean λ1 and the second has mean λ2. Prove that X1 + X2 is a Poisson random variable
with mean λ1 +λ2.
Hint: Recall the binomial theorem.
(x+y)
n =
n
∑
k=0
?
n
k
?
x
k
y
n−k
CS 70, Fall 2017, HW 10 3