HW 5_solutions HW problems Problem 1 Let’s modify Problem 7 (page 23) to a more general test. Assume a test has a probability p of indicating the disease among patients actually having a disease. Assume also that the test indicates the presence of the diseases with probability 1-p among the patients not having the disease (false positive). Finally, suppose the incident rate of the disease is r. (a) Find the probability that the person tested positive actually has the disease. Hint: Consider the events: T+ = “tested positive” and A = “Has a disease”. You have to find P(A|T+). (b) If p = 0.95 and r =0.005, what is the probability of having a disease being tested positive? (c) Leaving p = 0.95, find how the result depends on r (use Mathematica to make a plot). At what r the test reliably indicates the disease? A= “tested positive”. P(T+) = p*r +(1-r) (1-p). P(A|T+) = p*r/ [p*r + (1-r)(1-p)] = 0.087. Problem 2 Formula P(AUB) = P(A) + P(B) – P(AB) can be generalized for any number of events. Thus for the union of three events the result is P(AUBUCU) = P(A) + P(B) +P( C) – P(AB) – P(AC) – P(BC) +P (ABC) Suppose that A and B are independent. B and C are mutually exclusive , and A and C are independent. If P(AUBUCU) = 0.9, P(B) = 0.5 and P© = 0.3, find P(A). Solution: 0.9 = 0.8 + x – 0.3 x – 0.5 x; x = 0.5. Problem 3 A loaded coin with p(H) = ¾ is tossed twice. Let the events A, B and C be respectively “first toss is heads”, “second toss is heads” and “tosses show the same face”. (a) Are A and B independent? (b) Are A and BUC independent? ( c) are A,B and C independent? Solution Tosses Probability HH 9/16 TH 3/16 HT TT A = HH + HT; B = HH + TH; C = HH + TT. P(A) = ¾; P(B) = ¾; P(C) = 5/8. (a) P(AB) = P(HH) = 9/16 = ¾ ¾ = P(A) P(B) => A and B are independent 3/16 (b) P(BUC) = 13/16. P(A(BUC)) = P(HH) = 9/16 3 / 4 * 13/16 1/16 => A and BUC are not independent Both are heads (c) P(ABC)= P(HH) =9/16 P(A) P(B) P(C) => the events are not independent Problem 4 : Your friend flips three coins and tells you that there is at least two heads. What is the probability that the first coins is heads? Solution: A = “At least two heads”; B = “The first is heads”. P(A) = 1 – P(at least two tails ) = 1/2. (due to symmetry). P(AB) = P(HHT or HTH or HHH) = 3/8. P(B|A) = ¾. Problem 5: Suppose that the probability that married man votes is 0.45, the probability a married woman votes is 0.4 and the probability a woman votes given her husband votes is 0.6. What is the probability (a) that both vote (b) a man votes given that his wife does? A = man votes; B = woman votes; P(A) = 0.45; P(B) = 0,4; P(B|A) = 0.6 P(AB) = P(B|A)P(A) = 0.6*0.45 = 0.27 P(A|B) = P(AB)/P(B)= 0.27/0.4=0.675 A B AB