0% found this document useful (0 votes)
72 views6 pages

STAT 4101/5101 Lab2: Bingxin Zhao

The document contains a lab assignment with 3 questions: 1) Calculates the probability of getting lung cancer given someone worked in a shipyard using Bayes' theorem. 2) Finds the expected repair cost for defective items using the expected value of a binomial random variable. 3) Shows that the probability of observing a particular value y0 in a binomial distribution is maximized when the probability of success p is equal to y0/n, which is the maximum likelihood estimate.

Uploaded by

Flyingsoul92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views6 pages

STAT 4101/5101 Lab2: Bingxin Zhao

The document contains a lab assignment with 3 questions: 1) Calculates the probability of getting lung cancer given someone worked in a shipyard using Bayes' theorem. 2) Finds the expected repair cost for defective items using the expected value of a binomial random variable. 3) Shows that the probability of observing a particular value y0 in a binomial distribution is maximized when the probability of success p is equal to y0/n, which is the maximum likelihood estimate.

Uploaded by

Flyingsoul92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

STAT 4101/5101 Lab2

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

Based on Bayes formula, we have

P(S|C ) P(C ) 0.22 × 0.0004


P(C |S) = = ≈ 0.0006
P(S) 0.14

(Or, we can directly use Bayes formula)

P(S|C ) P(C ) 0.22 × 0.0004


P(C |S) = = ≈ 0.0006
P(S|C ) P(C ) + P(S|C ) P(C ) 0.22 × 0.0004 + 0.14 × 0.9996

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(0.36 + 0.16) + 0.4 + 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)

Take the derivative with respect to p and set it to 0, we have

∂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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy