bayesrulekey.doc

advertisement
Answer to Assignment 2:
1. Here’s what we are given:
P(disease) = 1/400 = 0.0025
P(no disease) = 399/400 = 0.9975
P( + | no disease) = 0.02 (these are false positives)
P( – | disease) = 0.03 (these are false negatives)
P( + | disease) = 0.97 (these are true positives)
So we can apply Bayes’ Rule as follows:
P(  | disease )  P(disease )
P(  | disease )  P(disease )  P(  | nodisease )  P(nodisease )
(0.97)( 0.0025)
P(disease |  ) 
 0.108
(0.97)( 0.0025)  (0.02)( 0.9975)
P(disease |  ) 
Or in words, the probability that a randomly selected person who got a positive test result
actually has the disease is only about 10.8%.
2. Here’s what we are given:
P(#1 has gold) = 1/3
P(#1 has goat) = 2/3
P(host shows #2 has goat | #1 has gold) = 1/2 (true regardless of Monty’s rule)
P(host shows 2 has goat | #1 goat) = 1/4 (true if Monty always chooses which
other door to open by flipping a coin; this is true because door #2 has a 1/2 chance
of having the second goat and a 1/2 chance of being opened, so multiply these to
get 1/4)
So we can apply Bayes’ Rule as follows:
Numerator = P(host shows #2 has goat | #1 has gold)∙P(#1 has gold) = (1/2)(1/3) = 1/6
Denominator = P(host shows #2 has goat | #1 has gold)∙P(#1 has gold)
+ P(host shows #2 has goat | #1 has goat)∙P(#1 has goat)
= (1/2)(1/3) + (1/4)(2/3) = 1/3
P(#1 has gold | host shows #2 has goat) = (1/6) / (1/3) = 1/2
Thus, the chance the gold is behind door #1 is 1/2, and the chance it’s behind the other
remaining door (#3) is also 1/2. Your odds of winning remain the same whether you
switch or not. Importantly, this is true only if Monty follows the random choice rule,
meaning there’s a chance he could have opened a door with gold. In the original
description of the problem, he would only open a door with a goat.
Download