Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

STAT 1012: Statistics for Life Sciences

2023-24 Term 1
Assignment #3

Problem 1 [32 points] Suppose the genotype of Amy is unknown, but the genotypes of her
four grandparents are given by the chart below:

Grandparents: BO BO AA BB

Parents: Father ?? Mother ??

Child: Amy ??

People with genotype AA, AO will have phenotype A, genotype BB, BO will have phenotype
B, genotype AB will have phenotype AB, genotype OO will have phenotype O.

(a) [6 points] What is the probability that Amy’s phenotype is A? What is the probability
that Amy’s phenotype is B?
(b) [6 points] Given that Amy’s phenotype is A, what’s the conditional probability that
Father’s phenotype is B?
(c) [10 points] Given that Father’s phenotype is B, what’s the conditional probability
that Amy’s phenotype is B? Compared with the probability that Amy’s phenotype is
B, what conclusion can we get?
(d) [10 points] If we let the random variable 𝑋 be the total number of phenotypes B
among Father, Mother and Amy, please generate the Probability Mass Function
(PMF) and Cumulative Distribution Function (CDF) of 𝑋 and draw out the graph of
PMF and CDF.

Solution:
!
(a) 𝑃(𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐴) = 𝑃(𝐺𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐴𝑂 ) = " ∗ 𝑃 (𝐹𝑎𝑡ℎ𝑒𝑟 = 𝐵𝑂)𝑃(𝑀𝑜𝑡ℎ𝑒𝑟 =
! ! # ! ! !
𝐴𝐵 ) + # ∗ 𝑃(𝐹𝑎𝑡ℎ𝑒𝑟 = 𝑂𝑂)𝑃(𝑀𝑜𝑡ℎ𝑒𝑟 = 𝐴𝐵) = " ∗ " ∗ 1 + # ∗ " ∗ 1 = "
𝑃 (𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐵 ) = 𝑃 (𝐺𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐵𝑂 ) + 𝑃(𝐺𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐵𝐵)
2 2
= ∗ 𝑃 (𝐹𝑎𝑡ℎ𝑒𝑟 = 𝐵𝐵 )𝑃(𝑀𝑜𝑡ℎ𝑒𝑟 = 𝐴𝐵) +
4 4
2
∗ 𝑃 (𝐹𝑎𝑡ℎ𝑒𝑟 = 𝐵𝑂 )𝑃(𝑀𝑜𝑡ℎ𝑒𝑟 = 𝐴𝐵) + ∗ (𝐹𝑎𝑡ℎ𝑒𝑟 = 𝑂𝑂)𝑃(𝑀𝑜𝑡ℎ𝑒𝑟 = 𝐴𝐵)
4
2 1 2 2 2 1 1
= × + × + × =
4 4 4 4 4 4 2

Page 1/2
! ! !
(b) 𝑃 (𝐹𝑎𝑡ℎ𝑒𝑟 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐵|𝐴𝑚𝑦 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐴) = $ ÷ " = #

! # ! !
%"×"'"×"( !
(c) 𝑃 (𝐴𝑚𝑦 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐵|𝐹𝑎𝑡ℎ𝑒𝑟 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐵 ) = $ =
#
"

(d) 𝑃 (𝑁𝑜 𝐵 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒𝑠) = 𝑃 (𝐹𝑎𝑡ℎ𝑒𝑟 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝑂, 𝑀𝑜𝑡ℎ𝑒𝑟 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 =


! !
𝐴𝐵, 𝐴𝑚𝑦 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐴 𝑜𝑟 𝑂) = " ∗ 1 ∗ #
𝑃 (𝐹𝑎𝑡ℎ𝑒𝑟 𝑎𝑛𝑑 𝐴𝑚𝑦 ℎ𝑎𝑣𝑒 𝐵 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒𝑠 )
= 𝑃(𝐹𝑎𝑡ℎ𝑒𝑟 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐵, 𝑀𝑜𝑡ℎ𝑒𝑟 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒 = 𝐴𝐵, 𝐴𝑚𝑦 𝑃ℎ𝑒𝑛𝑜𝑡𝑦𝑝𝑒
3 1
= 𝐵) = ∗ 1 ∗
4 2

PMF:
𝑋 0 1 2
𝑃(𝑋 = 𝑥) 1/8 1/2 3/8
CDF:

Problem 2 [10 points] [Advanced] Three prisoners Problem extension: Four prisoners, 𝐴,
𝐵, 𝐶 and 𝐷, are on death row. The governor decides to pardon one of the four and chooses
at random the prisoner to pardon. He informs the warden of his choice but requests that
the name be kept secret for a few days. The next day, 𝐴 tries to get the warden to tell him
who had been pardoned. The warden refuses. 𝐴 then asks which of 𝐵 or 𝐶 will be
executed. The warden thinks for a while, then tells 𝐴 that 𝐵 is to be executed. Please
calculate the conditional probability that 𝐴 is pardoned given 𝐵 will die, and the
conditional probability that 𝐷 is pardoned given 𝐵 will die.

Solution:
We know that:
𝑃(𝐴 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐵 𝑑𝑖𝑒) = 1/4 ∗ 1/2 = 1/8
𝑃(𝐴 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐶 𝑑𝑖𝑒) = 1/4 ∗ 1/2 = 1/8
𝑃(𝐵 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐶 𝑑𝑖𝑒) = 1/4 ∗ 1 = 1/4
𝑃(𝐶 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐵 𝑑𝑖𝑒) = 1/4 ∗ 1 = 1/4
𝑃(𝐷 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐵 𝑑𝑖𝑒) = 1/4 ∗ 1/2 = 1/8
𝑃(𝐷 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐶 𝑑𝑖𝑒) = 1/4 ∗ 1/2 = 1/8

Page 2/2
Then, we have:
1/8 1
𝑃(𝐴 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 | 𝐵 𝑤𝑖𝑙𝑙 𝑑𝑖𝑒) = =
1/2 4
1/8 1
𝑃(𝐷 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 | 𝐵 𝑤𝑖𝑙𝑙 𝑑𝑖𝑒) = =
1/2 4

Alternate Solution:
Four prisoners, 𝐴, 𝐵, 𝐶 and 𝐷, are on death row. The governor decides to pardon one of
the four and chooses at random the prisoner to pardon. He informs the warden of his
choice but requests that the name be kept secret for a few days. The next day, 𝐴 tries to
get the warden to tell him who had been pardoned. The warden refuses. 𝐴 then asks
which of 𝐵 or 𝐶 or 𝐷 will be executed. The warden thinks for a while, then tells 𝐴 that
𝐵 is to be executed. Please calculate the conditional probability that 𝐴 is pardoned given
𝐵 will die, and the conditional probability that 𝐷 is pardoned given 𝐵 will die.

We know that:
𝑃(𝐴 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐵 𝑑𝑖𝑒) = 1/12
𝑃(𝐴 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐶 𝑑𝑖𝑒) = 1/12
𝑃(𝐴 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐷 𝑑𝑖𝑒) = 1/12
𝑃(𝐵 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐶 𝑑𝑖𝑒) = 1/8
𝑃(𝐵 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐷 𝑑𝑖𝑒) = 1/8
𝑃(𝐶 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐵 𝑑𝑖𝑒) = 1/8
𝑃 (𝐶 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐷 𝑑𝑖𝑒) = 1/8
𝑃(𝐷 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐵 𝑑𝑖𝑒) = 1/8
𝑃(𝐷 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 𝑎𝑛𝑑 𝑔𝑢𝑎𝑟𝑑 𝑠𝑎𝑦𝑠 𝐶 𝑑𝑖𝑒) = 1/8

Then, we have:
1/12 1
𝑃(𝐴 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 | 𝐵 𝑤𝑖𝑙𝑙 𝑑𝑖𝑒) = ! ! !=
+$+$ 4
!#

1/8 3
𝑃(𝐷 𝑖𝑠 𝑝𝑎𝑟𝑑𝑜𝑛𝑒𝑑 | 𝐵 𝑤𝑖𝑙𝑙 𝑑𝑖𝑒) = ! ! !=
+$+$ 8
!#

Problem 3 [48 points] Consider a discrete random variable X with CDF (Cumulative
Distribution Function) 𝐹(𝑥) specified below:

Page 3/2
(a) [4 Points] Please calculate the value of Pr(2 < 𝑋 ≤ 3) and Pr(𝑋 = 3)
(b) [3 Points] Please calculate the value of Pr(𝑋 = 4) and Pr(3 ≤ 𝑋 ≤ 5)
(c) [3 Points] Please calculate the value of Pr(𝑋 = 6) and Pr(3 < 𝑋 ≤ 6)
(d) [4 Points] Please compute the population mean 𝜇 = E(𝑋 ).
(e) [4 Points] Please compute the population variance 𝜎 # = 𝑉𝑎𝑟(𝑋).
(f) [4 Points] Please compute Pr(𝜇 − 𝜎 < 𝑋 ≤ 𝜇 + 𝜎).
(g) [6 Points] Please compute E[(𝑋 + 2)# ]
(h) [8 Points] If we transform the random variable 𝑋 to 𝑌 as 𝑌 = 3𝑋 − 2, please find
the Expect value of 𝑌 and the Variance of 𝑌.
(i) [12 Points] If we transform the random variable 𝑋 to 𝑍 as 𝑍 = 𝑋 # , please find the
Probability Mass Function (PMF) of 𝑍, the CDF (Cumulative Distribution Function) of
𝑍, and graph the CDF plot.
Solution:
(a) Pr(2 < 𝑋 ≤ 3) = 0.2, Pr(𝑋 = 3) = 0.2
(b) Pr(𝑋 = 4) = 0, Pr(3 ≤ 𝑋 ≤ 5) = 0.4
(c) Pr(𝑋 = 6) = 0, Pr(3 < 𝑋 ≤ 6) = 0.2
(d) 𝜇 = E(𝑋 ) = 1 ∗ 0.3 + 2 ∗ 0.3 + 3 ∗ 0.2 + 5 ∗ 0.2 = 2.5
(e) 𝜎 # = 𝑉𝑎𝑟 (𝑋 ) = (1# ∗ 0.3 + 2# ∗ 0.3 + 3# ∗ 0.2 + 5# ∗ 0.2) − 2.5# = 2.05
(f) Pr(𝜇 − 𝜎 < 𝑋 ≤ 𝜇 + 𝜎) = Pr(2.5 − 1.432 < 𝑋 ≤ 2.5 + 1.432) = 0.5
(g) E[(𝑋 + 2)# ] = 𝐸 (𝑋 # + 4𝑋 + 4) = 𝐸 (𝑋 # ) + 4𝐸 (𝑋) + 4 = 8.3 + 4(2.5) + 4 = 22.3
(h) 𝐸 (𝑌 ) = 𝐸 (3𝑋 − 2) = 3𝐸 (𝑋) − 2 = 5.5, 𝑉𝑎𝑟(𝑌) = 𝑉𝑎𝑟(3𝑋 − 2) = 3# 𝑉𝑎𝑟(𝑋) =
18.45
(i) The possible values of X are: 1,2,3,5. Thus, the possible values of Z are: 1,4,9,25. Then the
PMF would be:
𝑃(𝑍 = 1) = 0.3, 𝑃(𝑍 = 4) = 0.3, 𝑃(𝑍 = 9) = 0.2, 𝑃(𝑍 = 25) = 0.2
CDF:
𝑃(𝑍 < 1) = 0, 𝑃 (1 ≤ 𝑍 < 4) = 0.3, 𝑃 (4 ≤ 𝑍 < 9) = 0.6
𝑃 (9 ≤ 𝑍 < 25) = 0.8, 𝑃(𝑍 ≥ 25) = 1

Problem 4 [10 points] [ADVANCED] Place 5 similar balls (either red or blue) in a bowl at
random as follows: A FAIR coin is flipped 5 independent times and a RED ball is placed in the
bowl for each head and a BLUE ball for each tail. After we placed the 5 balls in the bowl, two
balls are selected at random without replacement from the bowl.
(a) [4 points] What’s the probability that we have selected two red balls? (Hints: Use
Total Probability Rule)
(b) [6 points] If we let random variable 𝑋 be number of RED balls in the two balls we
select, please find the Probability Mass Function (PMF) of 𝑋 (Hints: we calculated
Pr (𝑋 = 2) in part(a))

Solution:
Page 4/2
(a) 𝑃(2 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠) = 𝑃 (2 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠 | 5 𝐻𝑒𝑎𝑑𝑠)𝑃(5 𝐻𝑒𝑎𝑑𝑠 ) +
𝑃 (2 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠 | 4 𝐻𝑒𝑎𝑑𝑠, 1 𝑇𝑎𝑖𝑙𝑠)𝑃(4 𝐻𝑒𝑎𝑑𝑠, 1 𝑇𝑎𝑖𝑙𝑠) + 𝑃(2 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠 | 3 𝐻𝑒𝑎𝑑𝑠,
2 𝑇𝑎𝑖𝑙𝑠)𝑃(3 𝐻𝑒𝑎𝑑𝑠, 2 𝑇𝑎𝑖𝑙𝑠) + 𝑃(2 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠 | 2 𝐻𝑒𝑎𝑑𝑠, 3 𝑇𝑎𝑖𝑙𝑠)𝑃(2 𝐻𝑒𝑎𝑑𝑠,
)×" ! "×* ) *×# !+ #×! !+ ! * * ! $ !
3 𝑇𝑎𝑖𝑙𝑠) = )×" × *# + )×" × *# + )×" × *# + )×" × *# = *# + *# + *# + *# = *# = "
(b) 𝑃 (1 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠 ) = 𝑃(1 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠 | 5 𝐻𝑒𝑎𝑑𝑠)𝑃(5 𝐻𝑒𝑎𝑑𝑠) +
𝑃(1 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠 | 4 𝐻𝑒𝑎𝑑𝑠, 1 𝑇𝑎𝑖𝑙𝑠)𝑃(4 𝐻𝑒𝑎𝑑𝑠, 1 𝑇𝑎𝑖𝑙𝑠 ) +
𝑃 (1 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠 | 3 𝐻𝑒𝑎𝑑𝑠, 2 𝑇𝑎𝑖𝑙𝑠)𝑃(3 𝐻𝑒𝑎𝑑𝑠, 2 𝑇𝑎𝑖𝑙𝑠) +
𝑃(1 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠 | 2 𝐻𝑒𝑎𝑑𝑠, 3 𝑇𝑎𝑖𝑙𝑠)𝑃(2 𝐻𝑒𝑎𝑑𝑠, 3 𝑇𝑎𝑖𝑙𝑠 ) +
) ! " ) * !+
𝑃 (1 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠 | 1 𝐻𝑒𝑎𝑑𝑠, 4 𝑇𝑎𝑖𝑙𝑠)𝑃(1 𝐻𝑒𝑎𝑑𝑠, 4 𝑇𝑎𝑖𝑙𝑠) = × *# + ) × *# + ) × *# +
)

# !+ ! ) ! " , " ! !, !
× + × = + + + + = =
) *# ) *# *# *# *# *# *# *# #

𝑃 (0 𝑅𝑒𝑑 𝐵𝑎𝑙𝑙𝑠) = 𝑃(2 𝐵𝑙𝑢𝑒 𝐵𝑎𝑙𝑙𝑠 ) = 1/4

𝑋 can take the values 0,1,2. Hence:


𝑋 0 1 2
𝑃(𝑋 = 𝑥) 1/4 1/2 1/4

Page 5/2

You might also like