Professional Documents
Culture Documents
Spring 2022
Homework 2
Due Friday, Jan 28th at 11:59pm
The following section and problem numbers refer to the book page images posted
on Canvas, which may differ from the book version you have. Be sure you are
working on the right problems. Answering the wrong homework problem will
lead to you receiving zero points for that problem.
You will upload your homework assignment to Gradescope. PDFs generated via
scan or via export from, e.g., LaTeX are preferred, although JPG files will also
be accepted. Late submissions are not allowed.
Solution 2.
(a) Yes. Because P(A ∩ B̄) = 0.5,P(Ā ∩ B) = 0.2 P(Ā ∩ B̄) = 0.2 (see Solution 2 of
problem 1), which are all between 0 and 1.
(b) 0. Because they can be disjoint.
(c) No. Because P(A ∩ B) cannot be larger than either P(A) or P(B).
(d) 0.3 , since P(A ∩ B) 6 P(B) = 0.3.
(a)
(b)
(a)
(b)
(c)
7. (10 points) At a gas station, 40% of the customers use regular gas (A1 ), 35% use mid-
grade gas (A2 ), and 25% use premium gas (A3 ). Of those using regular gas, only (30%)
fill their tanks (event B). Of those using mid-grade gas, 50% fill their tanks, whereas
of those using premium, 70% fill their tanks.
(a) What is the probability that the next customer requests mid-grade gas and fills
the tank?
(b) What is the probability that the next customer fills the tank?
(c) If the next customer fills the tank, what is the probability that she requests
premium gas?
B B̄
A1 0.4 × 0.3 = 0.12 0.4 × 0.7 = 0.28
A2 0.35 × 0.5 = 0.175 0.35 × 0.5 = 0.175
A3 0.25 × 0.7 = 0.175 0.25 × 0.3 = 0.075
The entries in the table can then be used to solve the problems.
P(A2 ∩ B) = 0.175
P(A3 ∩ B)
P(A3 | B) =
P(B)
0.175
=
0.47
≈ 0.372
8. (10 points) For customers purchasing a full set of tires at a particular tire store, consider
events
(a)
(b)
(c)
Above, we decomposed the calculation into four summands. The first was already
computed in part (a). The other three can be calculated as
Thus, the final answer amounts to P(C) = 0.54 + 0.14 + 0.045 + 0.015 = 0.74.
(d)
P(A ∩ B ∩ C)
P(A | B ∩ C) =
P(B ∩ C)
0.54
=
0.68
≈ 0.794
P(AA ∪ BB ∪ CC ∪ DD) = P(AA) + P(BB) + P(CC) + P(DD) because the events are disjoint
(1)
= 0.252 + 0.252 + 0.252 + 0.252 assuming each spin is independent
(2)
= 0.25 (3)
Thus, P(Y = 3) = 0.25. It follows that P(Y = 2) = 1 − 0.25 = 0.75 as the only other
option. That is, P(Y = 0) = P(Y = 1) = P(Y = 4) = 0 because they are impossible in
only two spins.
10. (10 points) A random variable has pdf
c(2 − y) if 0 ≤ y ≤ 2
f (y) =
0 otherwise.
Be sure:
• To make this work your own even if you work with others! Do not blindly copy the
solutions; this is plagarism, and furthermore it will only hurt you at exam time.
• To put your name on all sheets, and to staple the sheets together, if you are turning
in multiple sheets.
• To properly label all plots (axes, main title, units, etc.) for full credit, if applicable,
and to include a printout of any code used in solutions, if applicable.
Optional problems. Optional problems are food for thought, covering related contents
we do not focus on, and/or slightly out of scope. You are welcome to openly discuss these
problems on Piazza at any time, or discuss them with the instructor during office hours.
min P(A ∩ B ∩ C)
subject to P(A) = P(B) = P(C) = p and all probabilistic constraints are satisfied.
Let the minimum value of the above optimization problem be f (p). Solving for f (p) ≥
0.95 gives an inequality for p. And this will tell us what does the final answer look
like.
Since p = P(A) ≥ P(A ∩ B ∩ C) and we want P(A ∩ B ∩ C) ≥ 0.95, we can without loss
of generality assume p ≥ 0.95. For the same reason, we can assume P(A ∩ B) ≥ 0.95.
Note that we can decompose P(A ∩ B ∩ C) = P(C | A ∩ B) · P(A ∩ B). To minimize
P(A ∩ B ∩ C), it suffices to first minimize P(C | A ∩ B) for every fixed configuration of
A ∩ B, and then minimize P(A ∩ B).
To minimize P(C | A ∩ B), we need the event C to intersect with A ∩ B as little as
possible. The probability of the complement of A ∩ B is 1 − P(A ∩ B) ≤ 0.05, whereas
P(C) ≥ 0.95. Thus, for the event C to intersect with A ∩ B as little as possible, the
event C need to occupy all of the complement of A ∩ B. Moreover, the event C need
to occupy part of A ∩ B, whose probability mass is P(A ∩ B ∩ C) = p − (1 − P(A ∩ B)).
This means that the minimal value of P(C | A ∩ B) is
p − 1 + P(A ∩ B)
.
P(A ∩ B)
Thus, the minimal value of P(A ∩ B ∩ C) is
p − 1 + P(A ∩ B).
Now it suffices to minimize P(A ∩ B). This is something we have done in Question 1
and 2. We have shown that the minimal value of P(A ∩ B) is
2p − 1,
which happens when A ∪ B is the whole sample space. Hence, the minimal value of
P(A ∩ B ∩ C) is
3p − 2.
Solving for 3p − 2 ≥ 0.95 gives
2.95
p≥ .
3
Note that p = 2.95
3
is attainable (we already had the construction above). Thus, the
smallest value for P(A) such that P(A ∩ B ∩ C) already exceeds 0.95 is
2.95
.
3
O2. Exercise 2.162.
Solution. For this question, we do not distinguish among cars of the same type, i.e.,
we assume all three sport cars are indistinguishable, etc. There are 7 ways to park
three sports cars adjacent to one another, and there are
9 9!
= = 3 · 8 · 7 · 10
3, 3, 3 3!3!3!
ways to park those cars. Thus, the probability that the three sport cars are parked
adjacent to one another is
7 1
= .
3 · 8 · 7 · 10 240
O3. Exercises 2.119, 2.138.
• Solution for Exercise 2.119. We only give the solution for Part (a). The
solution for Part (b) is similar. We want
P(See 3 before 7)
= P(See 3 in the first toss) · 1 + P(See 7 in the first toss) · 0
+ P(See neither 3 or 7 in the first toss)
× P(See 3 before 7 | See neither 3 or 7 in the first toss)
= P(See 3 in the first toss) + P(See neither 3 or 7 in the first toss)
× P(See 3 before 7 | See neither 3 or 7 in the first toss).
We have
2 2 6 28
P(See 3 in the first toss) = , P(See neither 3 or 7 in the first toss) = 1− − = .
36 36 36 36
If we see neither 3 or 7 in the first toss, we essentially “restart the experiment
from the second toss”. That is,
P(See 3 before 7 | See neither 3 or 7 in the first toss) = P(See 3 before 7).
Hence, we have
2 28
P(See 3 before 7) = + · P(See 3 before 7),
36 36
which implies
1
P(See 3 before 7) = .
4
Another solution. Let Xi be the sum of the two dices for the i-th toss, and let
T be the number of tosses that we first see a sum of either 3 or 7. We have
∞
X X∞
P(See 3 before 7) = P(T = k)P(See 3 before 7 | T = k) = P(T = k)P(Xk = 3 | T = k).
k=1 k=1
We have
P(Xk = 3 ∩ T = k)
P(Xk = 3 | T = k) =
P(T = k)
P(Xk = 3)P(T = k | Xk = 3)
= .
P(Xk = 3)P(T = k | Xk = 3) + P(Xk = 7)P(T = k | Xk = 7)
Note that P(T = k | Xk = 7) = P(T = k | Xk = 3) by construction. Thus, we
have
P(Xk = 3) 1
P(Xk = 3 | T = k) = = .
P(Xk = 3) + P(Xk = 7) 4
This implies
∞
X 1 1
P(See 3 before 7) = P(T = k) · = .
k=1
4 4
• Solution for Exercise 2.138. The probability that the player wins after the
first toss is
6+2 8
= .
36 36
The probability that the player loses after the first toss is
2+2+2 6
= .
36 36
The probability that the player continues after the first toss is
8+6 22
1− = .
36 36
Conditional on that the player continues after the first toss, we can use the ar-
guments in Exercise 2.138 to compute the probability of wining for each value of
the first toss. Summarizing the above will give the answer of this exercise.