STAT 4101/5101 Lab2: Bingxin Zhao
STAT 4101/5101 Lab2: Bingxin Zhao
Bingxin Zhao
Question 1
A study of Georgia residents suggests that those who worked in the shipyards in WWII have a
higher risk of lung cancer. 22% of those with lung cancer had worked in a shipyard. 14% of those
with no lung cancer had worked in a shipyard. Suppose the overall base rate of lung cancer is
0.04%. Find the probability of getting lung cancer, assuming that someone worked in a shipyard.
1
Stat 4101/5101 Bingxin Zhao
Question 1
A study of Georgia residents suggests that those who worked in the shipyards in WWII have a
higher risk of lung cancer. 22% of those with lung cancer had worked in a shipyard. 14% of those
with no lung cancer had worked in a shipyard. Suppose the overall base rate of lung cancer is
0.04%. Find the probability of getting lung cancer, assuming that someone worked in a shipyard.
Solution:
Event C: Getting lung cancer.
Event S: Worked in a shipyard.
Based on the problem, we have P(S|C ) = 0.22, P(S|C ) = 0.14, P(C ) = 0.0004.
By law of total probability, we have
P(S) = P(S|C ) P(C ) + P(S|C ) P(C ) = 0.22 × 0.0004 + 0.14 × 0.9996 ≈ 0.14
Page 2
Stat 4101/5101 Bingxin Zhao
Question 2
A particular sale involves four items randomly selected from a large lot that is known to contain
10% defectives. Let Y denote the number of defectives among the four sold. The purchaser of the
items will return the defectives for repair, and the repair cost is given by C = 3Y 2 + Y + 2 Find
the expected repair cost.
Hint: E( X 2 ) = Var ( X ) + ( EX )2
Page 3
Stat 4101/5101 Bingxin Zhao
Question 2
A particular sale involves four items randomly selected from a large lot that is known to contain
10% defectives. Let Y denote the number of defectives among the four sold. The purchaser of the
items will return the defectives for repair, and the repair cost is given by C = 3Y 2 + Y + 2 Find
the expected repair cost.
Hint: E( X 2 ) = Var ( X ) + ( EX )2
Solution:
Y ∼ Bin(4, 0.1), we have E(Y ) = np = 0.4 and Var (Y ) = np(1 − p) = 0.36.
EC = 3EY 2 + EY + 2
= 3[Var (Y ) + ( EY )2 ] + EY + 2
= 3.96
Hence, the expected repair cost is 3.96
Page 4
Stat 4101/5101 Bingxin Zhao
Question 3
Consider a binomial random variable Y with n trials and y0 successes. Show that P(Y = y0 ) is
maximized when p = y0 /n. We are maximizing the value of p that maximizes the probability of
the value of Y that we actually observed. This maximum likelihood method is a type of inductive
inference - going from any observed result to a “best guess” at an unobservable parameter p.
Page 5
Stat 4101/5101 Bingxin Zhao
Question 3
Consider a binomial random variable Y with n trials and y0 successes. Show that P(Y = y0 ) is
maximized when p = y0 /n. We are maximizing the value of p that maximizes the probability of
the value of Y that we actually observed. This maximum likelihood method is a type of inductive
inference - going from any observed result to a “best guess” at an unobservable parameter p.
Solution:
n
P (Y = y 0 ) = p y0 (1 − p ) n − y0 .
y0
This problem ask us to maximize P(Y = y0 ), which is equivalent to maximize
L ( p ) = p y0 (1 − p ) n − y0
Let
l ( p) = log L( p) = y0 log p + (n − y0 ) log(1 − p)
∂l ( p) y n − y0
= 0− =0
∂p p 1− p
y0
we have p = n.
∂2 l ( p ) y n − y0
2
= − 02 − <0
∂p p (1 − p )2
y0
we obtain that P(Y = y0 ) is maximized when p = n.
Page 6