Assignment2 Solution
Assignment2 Solution
2023-24 Term 1
Assignment #2
Problem 1[34 points]: Roll a fair die twice and record the number. We consider three events:
A = {Second time is even number}, B = {First time is odd number}
and C = {Same value in 2 times (double appears)},
(a) [3 points] What’s the sample space?
Sample space : {(i, j), i, j = 1,...,6}.
(b) [3 points] Please calculate the probability: Pr(A); Pr(B) and Pr(C)
63 1
Since A = {(i, j), i = 1,...,6; j = 2,4,6} , Pr( A) = = .
66 2
3 6 1
Since B = {(i, j), i = 1,3,5; j = 1,...,6} , Pr( B) = = .
66 2
6 1
Since C = {(i, j), i = j = 1,...,6} , Pr(C ) = = .
66 6
(c) [3 points] What is the relationship between A and B (Mutually exclusive or not mutually
exclusive, independent, or dependent)?
Since A B = {(i, j), i = 1,3,5; j = 2,4,6} , A and B are not mutually exclusive. However, as
9 1
Pr( AB) = Pr( A B) = = = Pr( A) Pr( B) , A and B are independent.
36 4
(d) [3 points] What is the relationship between B and C (Mutually exclusive or not mutually
exclusive, independent, or dependent)?
Since B C = {(i, j), i = j = 1,3,5}, B and C are not mutually exclusive. However, as
3 1
Pr( BC ) = Pr( B C ) = = = Pr( B) Pr(C ) , B and C are independent.
36 12
(e) [4 points] A, B and C are mutually independent or pairwise independent? Why?
1
Similar as (d), Pr( AC ) == Pr( A) Pr(C ) = , A and C are independent. Yet, since
12
A B C = , Pr( ABC) = 0 Pr( A) Pr( B) Pr(C) , A, B and C are not mutually independent
Page 1/2
Pr(( A B)C C ) = Pr(( A B)C ) + Pr(C ) − Pr(( A B)C C )
= 1 − Pr( A B) + Pr(C ) − Pr( AC B C C ) .
1 1 1 1 5
= 1 −( + − )+ − 0 =
2 2 4 6 12
According to inclusion-exclusion principle,
Pr( A B C ) = Pr( A) + Pr( B ) + Pr(C ) − Pr( AB ) − Pr( AC ) − Pr( BC ) + Pr( ABC )
1 1 1 1 1 1 3 .
= + + − − − +0 =
2 2 6 4 12 12 4
Pr(( A B C ) C )
Pr(( A B C ) | C ) =
Pr(C )
Pr( AC B C C )
=
Pr(C )
Pr( AC ) + Pr( B C C ) − Pr( AB C C )
=
Pr(C )
1 1 3
+ −
1
= 12 12 36 =
1 2
6
Problem 2 [22 points] We have a study of COVID-19 vaccine in a group of 10,000 volunteers
of age 60 or below in Hong Kong. 50% of the volunteers inject the vaccine and the rest of
them inject placebo. After 2 weeks observation, we found that 15 volunteers test positive in
vaccine group and meanwhile 55 volunteers test positive in placebo group.
(a) [5 points] Please calculate the rate of testing positive in the whole volunteers group.
Let A be the set of the volunteers who inject the vaccine, and B be the set of the
Page 2/2
volunteers who test positive, then the rate of testing positive in the whole volunteers
#( AB AC B ) 15 + 55
group = = = 0.7% .
#( A AC ) 10000
(b) [6 points] Please calculate the Relative risk of testing positive given taking the COVID-19
vaccine.
Relative risk of testing positive given taking the COVID-19 vaccine is
Pr( B | A) 15 / 5000 3
RR( B | A) = = = .
Pr( B | AC ) 55 / 5000 11
(c) [5 points] Please draw the conclusion based on the result in part (b).
3
Since RR( B | A) = 0.3 = 1 , it can be seen that events A and B are highly dependent
11
and the vaccine may be effective, but more rigorous conclusions require further analysis.
(d) [6 points] What is the conditional probability that the volunteers have the vaccine given
that he has test positive?
According to Baye’s Rules, we have the conditional probability that the volunteers have
the vaccine given that he has test positive:
Pr( AB) Pr( B | A) Pr( A) 15
1
3
Pr( A | B) = = = 5000 2
=
Pr( B) Pr( B | A) Pr( A) + Pr( B | AC ) Pr( AC ) 15
+
5000 2
1 55
5000 1
2 14
Problem 3 [22 points]: Two students Amy and Betty are taking STAT1012 this term.
Suppose (i) Amy attends class 50% of the time, (ii) Betty attends class 70% of the time, and
(iii) given that Amy attends the class, the chance for Betty to attend the class is 90%.
Let A = {Amy attends the class tomorrow}, and B = {Betty attends the class tomorrow}.
(a) [5 points] Do you think events A and B are independent? Explain.
Pr( AB )
From the problem background, we have Pr( B | A) = = 90% , and Pr( A) = 50% , so
Pr( A)
we can get Pr( AB) = 45% , which is not equal to Pr( A) Pr( B) . Hence A and B are not
independent.
(b) [5 points] Do you think events A and B are exhaustive? Explain.
Since Pr( A B) = Pr( A) + Pr( B) − Pr( AB) = 75% 1 , so events A and B are not exhaustive.
(c) [6 points] Given that at least one of the two students attend the class tomorrow, what is
the probability that Amy will attend the class tomorrow?
Pr( A ( A B)) Pr( A) 2
Pr( A | ( A B)) = = =
Pr( A B) Pr( A B) 3
(d) [6 points] Given that at most one of the two students attend the class tomorrow, what is
the probability that Amy will attend the class tomorrow?
Page 3/2
Pr( A ( A B)C
)
Pr( A | ( A B)
C
)=
Pr(( A B) )
C
Pr( A B C )
=
1 − Pr( A B )
Pr( A) − Pr( A B )
= ( A and B are not independent)
1 − Pr( A B )
0.5 − 0.45 1
= =
1 − 0.45 11
Problem 4 [22 points] Urn No.1 contains 6 black balls and 6 white balls, and urn No.2
contains 8 black balls and 4 white balls. A ball is randomly drawn from urn No.1 and a ball is
drawn from urn No.2, respectively. We replace them after we record the color. Let event A =
{The ball from urn No.1 is Black}; event B = {The ball from urn No.2 is Black}; event C = {The
color of two balls is the same}
[ADVANCED] Two balls are transferred from urn No.2 to urn No.1, and then a ball is
drawn from urn No.1.
(c) [6 points] What is the probability that this ball is white? (Hints: Use Total Probability
Rule)
Let event D = {The balls transferred are both black}; event E = {The balls transferred
contain one black ball and one white ball}; event F = {The balls transferred are both
white}, and event G= {The ball drawn is white}, then we have
𝐶16 𝐶17 𝐶18
𝑃𝑟( 𝐺) = 𝑃𝑟( 𝐷) ⋅ + 𝑃𝑟( 𝐸) ⋅ + 𝑃𝑟( 𝐹) ⋅
𝐶114 𝐶114 𝐶114
𝐶28 𝐶16 𝐶18 𝐶14 𝐶17 𝐶24 𝐶18
= ⋅ + ⋅ + ⋅
𝐶212 𝐶114 𝐶212 𝐶114 𝐶212 𝐶114
8⋅7 6 2⋅8⋅4 7 4⋅3 8
= ⋅ + ⋅ + ⋅
12 ⋅ 11 14 12 ⋅ 11 14 12 ⋅ 11 14
10
=
21
Page 4/2
(d) [6 points] Given that the ball drawn is white, what is the conditional probability that at
least one white ball was transferred to No.1.
1 𝐶7 1 𝐶8
𝑃𝑟( 𝐷 𝐶
𝐺) 𝑃𝑟( 𝐸) ⋅ 𝐶 14 + 𝑃𝑟( 𝐹) ⋅ 𝐶 14
𝑃𝑟( 𝐷𝐶 |𝐺) = = 1 1
𝑃𝑟( 𝐺) 𝑃𝑟( 𝐺)
𝐶18 𝐶14 1𝐶7 2 𝐶4 1 𝐶8
⋅ 𝐶 14 + 𝐶 12 ⋅ 𝐶 14
𝐶212 1 2 1
= 𝐶28 𝐶16 𝐶18 𝐶14 𝐶17 𝐶4
2 1 𝐶8
⋅ + ⋅ 𝐶 14 + 𝐶 12 ⋅ 𝐶 14
𝐶212 𝐶114 𝐶212 1 2 1
2⋅8⋅4 7 4⋅3 8
⋅ + ⋅ 14 34
12⋅11 14 12⋅11
= 8⋅7 6 2⋅8⋅4 7 4⋅3 8 =
⋅ 14 + 12⋅11 ⋅ 14 + 12⋅11 ⋅ 14 55
12⋅11
Page 5/2