ELEN90054 Tutorial Workshop #1 SOLUTIONS
1. (a) (A ∩ B C ∩ C C ) ∪ (AC ∩ B ∩ C C ) ∪ (AC ∩ B C ∩ C)
(b) (A ∩ B ∩ C C ) ∪ (A ∩ B C ∩ C) ∪ (AC ∩ B ∩ C)
(c) (A ∪ B ∪ C)
(d) (A ∩ B) ∪ (B ∩ C) ∪ (A ∩ C)
(A ∩ B ∩ C)
(f) (A ∪ B ∪ C)C
2. (a) S = {(HH), (T T ), (HT T ), (T HH), (HT HH), (T HT T ), (T HT HH), (HT HT T ), . . .}
= {HH, T T, y1 y2 · · · yn−2 HH, w1 w2 · · · wn−2 T T, where n ≥ 3 and
y1 y2 · · · yn−2 is alternating ending with “T ” and w1 w2 · · · wn−2 is alternating ending with “H”}.
(b) The probability of each outcome is equal to (0.5)n where n is the number of
tosses in the outcome. The probabilities for the outcomes listed above are
then 14 , 14 , 18 , 81 , 16
1 1
, 16 , . . .. Consequently the sum of these probabilities equals
∞
1 1 1 1 1 1 X 1 ( 1 )2
+ + + + + + ··· = 2 ( )n = 2 2 1 = 1
4 4 8 8 16 16 n=2
2 1− 2
In particular this implies that P(∞ number of tosses) = 0 and that the
above sum equals P [S] = P(outcome in sample space).
(c) These are the first six outcomes listed in the part (a) answer.
1
(d) P [A] = 4
+ 41 + 18 + 18 + 1
16
+ 1
16
= 7
8
3. (a) Reading the text in the problem, the three statements tell us P [E1C ] = 0.9,
P [E2C ] = 0.8, and P [E1 ∪ E2 ] = 0.25, respectively.
P [event E1 and event E2 occur simultaneously] = P [E1 ∩ E2 ]
= P [E1 ] + P [E2 ] − P [E1 ∪ E2 ]
= 1 − P [E1C ] + 1 − P [E2C ] − P [E1 ∪ E2 ]
= 1 − 0.9 + 1 − 0.8 − 0.25 = 0.05
(b) We are now given
P [E1C ∪ E2C ] = 0.7]. Using De Morgan’s Laws, this gives
P (E1 ∩ E2 )C = 0.7]. The question is now asking for
P [E1 ∩ E2 ] = 1 − P (E1 ∩ E2 )C = 1 − 0.7 = 0.3
4. Let’s call E the event that a call is blocked from node A to C. Then we can write
E = EAB ∪ EBC
where
EAB = both routes blocked between A and B
EBC = both routes blocked between B and C
A C
B
Since each route between a node is blocked with probability p and all routes are
independent, we write
P [EAB ] = P [(route AB1 blocked) ∩ (route AB2 blocked)] = p · p = p2 .
Similarly, we can write P [EBC ] = p2 .
So now this problem becomes the equivalent of tossing a coin twice with Head
probability p2 . We are essentially asked to compute the probability that there
are 1 or 2 Heads.
2
P [E] = 1 − (1 − p2 ) = 2p2 − p4 .
5. (a) S = {(1, 1), (2, 1), (2, 2), (3, 1), (3, 2), (3, 3), (4, 1), (4, 2), (4, 3), (4, 4), (5, 1), (5, 2),
(5, 3), (5, 4), (5, 5), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6) }
(b) Event (set of outcomes) that die shows 4 outcomes = { (4, 1), (4, 2), (4, 3), (4, 4) }.
(c) Event (set of outcomes) that {N2 = 3}= { (3, 3), (4, 3), (5, 3), (6, 3) }.
(d) Event (set of outcomes) that {N2 = 6}= { (6, 6) }.
(e) It is true that there are 4 possible events giving N2 = 3, however, the probabil-
ity of each of those events is not the same. The answer is NOT 4/21 as intuition
might tell you.
Since this question involves sequential experiments, it is best to draw a tree di-
agram, the rough idea is in the following figure (which is not complete):
Algebraically the tree diagram translates into the following. We partition the
sample space first into the events N1 = {1, 2, 3, 4, 5, 6} The event N2 = 3 can be
written in terms of these partitions and use the Theorem of Total Probability.
6
X
P [N2 = 3] = P [N2 = 3|N1 = i] · P [N1 = i]
i=1
So we will be using conditioning to our advantage here. Obviously, N2 = 3 only
occurs when N1 = 3, 4, 5, or 6.
P [N2 = 3] = P [N2 = 3|N1 = 3] · P [N1 = 3] + P [N2 = 3|N1 = 4] · P [N1 = 4]
+ P [N2 = 3|N1 = 5] · P [N1 = 5] + P [N2 = 3|N1 = 6] · P [N1 = 6]
1 1 1 1 1 1 1 1 57 19
= · + · + · + · = =
6 3 6 4 6 5 6 6 360 120
(f)
P [N1 = 4 ∩ N2 = 3]
P [N1 = 4|N2 = 3] =
P [N2 = 3]
We can read off the tree diagram that P [N1 = 4 ∩ N2 = 3] = 61 · 14 . Now using
part (e) we get
5
P [N1 = 4|N2 = 3] = .
19
Note that we can also formulate the above calculation algebraically via Bayes’
Rule:
P [N2 = 3|N1 = 4] · P [N1 = 4]
P [N1 = 4|N2 = 3] =
P [N2 = 3]
1 1
6
· 4
= 19
120
5
=
19
(g) P [N1 = 4|N2 = 5] = 0. This should be readily seen from the given statement
of the problem. Nevertheless, you could apply the analysis from part (f), and
after using Baye’s Rule, you could see that P [N2 = 5|N1 = 4] = 0, then making
the whole probability 0.
6.
a. P [A ∩ B] = 0 (since A and B are disjoint)
3 3 3
b. P [B] = P [A ∪ B] + P [A ∩ B] − P [A] = 4
+0− 8
= 8
3
c. P [A ∩ B C ] = P [A] = 8
(since A and B are disjoint)
5
d. P [A ∪ B C ] = P [B C ] = 1 − P [B] = 8
( since A ⊂ B C )
e. No: P [A ∩ B] = 0 6= P [A] · P [B]
P [C∩D] 1/4 1
f. P [D] = P [C]
= 1/2
= 2
(using the given problem information)
1
g. P [C ∪ D] = P [C] + P [D] − P [C ∩ D] = 2
+ 12 − 1
4
= 3
4
3 1 1
h. P [C ∩ DC ] = P [C ∪ D] − P [D] = 4
− 2
= 4
= P [C]P [DC ]
i. P [C ∪ DC ] = P [C] + P [DC ] − P [C ∩ DC ] = 21 + 12 − 14 = 34
j. P [C C ∩ DC ] = P (C ∪ D)C = 1 − P [C ∪ D] = 14 = P [C C ]P [DC ]
7. a (i). P [A|B C ] = 1 − P [AC |B C ] = 0.6
a (ii). P [A] = P [A|B]·P [B]+P [A|B C ]·P [B C ] = (0.3)(0.7)+(0.6)(0.3) = 0.39
P [A∩B] P [A|B]·P [B] (0.3)(0.7) 7
a (iii). P [B|A] = P [A]
= P [A]
= 0.39
= 13
= 0.539
P [E∩F ] P [F |E]·P [E] (0.5)(0.25)
b. P [F ] = P [E|F ]
= P [E|F ]
= 1/3
= 3/8 = 0.375
c. 1 ≥ P [G ∪ H]] = P [G] + P [H] − P [G ∩ H]
2
So, P [G ∩ H] ≥ 3
+ 23 − 1 = 1
3
P [G∩H] P [G∩H] 1/3 1
Then, P [G|H] = P [H]
= 2/3
≥ 2/3
= 2
8. Since this question involves sequential experiments, it is best to draw a tree
diagram, do this for yourself. Algebraically we have:
5
a. P [R2 |R1 ] = 9
because if the first ball is red, then 9 balls are left and 5 of them
are red.
b. P [R2 |R1C ] = 69 because if the first ball is not red (i.e. it’s green), then 9 balls
are left with still 6 red.
c. Use the Theorem of Total Probability here.
5 6 6 4
P [R2 ] = P [R2 |R1 ] · P [R1 ] + P [R2 |R1C ] · P [R1C ] = 9
· 10
+ 9
· 10
= 0.6
(check for yourself from your tree diagram)
d. Let’s use Bayes Rule here:
P [R2C |R1C ] · P [R1C ] 1 − P [R2 |R1C ] · P [R1C ] (1 − 6/9) · (4/10)
P [R1C |R2C ] = C
= C
= = 1/3.
P [R2 ] P [R2 ] 1 − 0.6
(check for yourself from your tree diagram)
9. This situation is equivalent to tossing a coin 40 times, where Head is translated
as ”Vote for candidate B”. Thus we are looking at a Binomial(40, 1 − p) random
variable. Notice that I used 1 − p as the parameter, as this is the probability that
a voter chooses Candidate B, and is thus a ”success” in the present context.
a.
40
P [30 votes for Candidate B] = (1 − p)30 p10
30
Equivalently,
40
P [30 votes for Candidate B] == P [10 votes for Candidate A] = p10 (1−p)30 ,
10
noting that
n n
=
k n−k
b. This is a simple extension of part (a). Now we are looking for the probability
of 30, 31, 32, . . ., or 40 votes for candidate B. We can use a summation to
give us the expression that we need to get all 11 possible voting outcomes.
40
X 40
P [30 or more votes for Candidate B] = p40−i (1 − p)i
i
i=30
c. Finding P [X ≤ 4] can be done in a few ways. The short way is:
P [X ≤ 4] = 1 − P [X > 4] = 1 − p4
The long way is as follows:
P [X ≤ 4] = P [X = 1] + P [X = 2] + · · · + P [X = 4]
= (1 − p) + p(1 − p) + · · · + p3 (1 − p)
Expand this out. The middle terms cancel out and you are left with 1 − p4 ,
the same answer as above. (By the way, have you noticed that X is a so-
called Geometric RV with parameter (1 − p).)
d. Again there is more than one way to do this problem and come up with the
right answer. You do need your critical thinking! The short way is:
P [E ∩ (X ≤ 4)]
P [E|X ≤ 4] =
P [X ≤ 4]
We already have P [X ≤ 4] from part (c), so it is the probability in the
numerator that we seek.
P [E ∩ (X ≤ 4)] = P [E ∩ (X = 1)] + · · · + P [E ∩ (X = 4)]
The four terms on the right-hand side can be computed individually. For
example
P [E ∩ (X = 4)] = P (AAAB....),
22 14 B’s14in the last 36 positions. So then P [E ∩ (X =
where there are exactly
4)] = p3 (1 − p) 36
14
p (1 − p) . The other terms are computed similarly.
Adding these up and dividing by P [X ≤ 4] = 1 − p4 leads to the final
answer
p25 (1 − p)15 36
37 38 39
P [E ∩ (X ≤ 4)] = 4
( + + + ).
1−p 14 14 14 14
10. It is easiest to answer this question via a tree diagram because then the con-
ditional probabilities can be visualized as labels on the branches. Do this for
yourself.
Alternatively, you can just write out, using Bayes’ Rule as follows.
(a) We’ll call C1 to be Coin #1 and C2 to be Coin #2. Keep in mind that we
can partition the sample space with these two outcomes. We can then write the
probability of Heads using the Theorem of Total Probability.
P [H] = P [C1 ]P [H|C1 ] + P [C2 ]P [H|C2 ]
1 1
= · p 1 + · p2
2 2
p1 + p2
=
2
(b) This is asking for the probability the 2nd coin was used given the final obser-
vation of the experiment. This is an a posteriori probability, and hence, we use
Baye’s Rule.
P [C2 ∩ H]
P [C2 |H] =
P [H]
P [C2 ] · P [H|C2 ]
=
P [H]
1
2
· p2 p2
= p1 +p2
=
2
p1 + p2
11. a. 30 people, each with 365 possible birthdays. This gives (365)30 outcomes in
the sample space.
b. The probability two or more people have the same birthday is a bit hard to
do directly. It is easier to find the probability that no one has the same
birthday, then subtract that result from 1.
The number of outcomes in the sample space where all 30 people have a
different birthday is
365!
365 · 364 · 363 · · · 336 =
335!
This is obtained by considering person #1 and saying they can have any of 365
birthdays. Person #2 can then have any of 364 birthdays (all but the one person
#1 has). Then Person #3 can have any of 363 birthdays (all but the birthdays
Person #1 or #2 have). And this goes on and on until we’ve accounted for all
30 people. It then follows that
365!
335!
Probability that no people have the same birthday in a group of 30 = .
(365)30
Finally, subtracting this result from 1 gives
365!
335!
Probability that 2 or more people out of 30 have same birthday = 1 −
(365)30
Note that the expression above is useless for calculation, since the factorial func-
tion in MATLAB and most calculators will be inaccurate for 21! or higher, and
will in fact yield NaN for 180! and above.
The equivalent expression
365 364 336
1− ···
365 365 365
is more easily evaluated (by writing a suitable MATLAB script - try), yielding
0.706, ie pretty good odds.
12. Without restrictions, we may assume that the contestant’s first choice is Door 1.
1
a. P [win] = P [car is put behind Door 1] = 3
b. Suppose that she chooses to switch. Let A be the event of her winning the car
under this strategy. We will calculate P [A]. If P [A] turns out to be higher
than the answer of part (a) then she should switch. Let Bi be the event that
the car is behind Door i (i = 1, 2, 3). Since {B1 , B2 , B3 } is a partition of
the corresponding sample space, according to the Law of Total probability
we have
P [A] = P [A|B1 ] · P [B1 ] + P [A|B2 ] · P [B2 ] + P [A|B3 ] · P [B3 ]
1 1 1 2
= 0· +1· +1· = .
3 3 3 3
This is higher than the answer in part (a) so she should switch.
c. If she sticks to her original choice then P [win] = P [car is put behind Door 1] =
1
n
. If she switches we calculate P [A] as in part (b) and obtain
1 1 1 1 1 1 1 n−1 1
P [A] = 0 · + · + · + ··· + · = · .
n n−2 n n−2 n n−2 n n−2 n
This is higher than n1 so she should switch, no matter what the value of n is.
Note though that the statistical advantage of the switch strategy diminishes
as n increases.