tag:blogger.com,1999:blog-6894866515532737257.post2911185391714383809..comments2017-09-14T08:46:59.534-07:00Comments on Probably Overthinking It: Probability is hard, part twoAllen Downeyhttps://plus.google.com/111942648516576371054noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-6894866515532737257.post-36353210782310211282016-06-02T06:15:32.847-07:002016-06-02T06:15:32.847-07:00Yes, that's right. I did the computation part...Yes, that's right. I did the computation partly to get the other three probabilities (two well, and one well one sick), and partly to demonstrate the computation I need for some of the other scenarios.Allen Downeyhttps://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-82424844016103549812016-06-02T00:50:25.533-07:002016-06-02T00:50:25.533-07:00Hi, I have a doubt about Scenario A question 2. I ...Hi, I have a doubt about Scenario A question 2. I computed the solution just considering people statistically independent with respect to the test so I get (1/4)^2 = 1/16. <br />Looking at the solution I saw a lot of computation to get the same answer. Am I missing something or my answer is correct? <br />By the way, thank you for these series of post Allen, they are very useful.<br />Giovannijimi75https://www.blogger.com/profile/00036358528199180534noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-17561859733299112132016-05-10T07:18:47.260-07:002016-05-10T07:18:47.260-07:00Your correction on Scenario C is correct, and your...Your correction on Scenario C is correct, and your answer on Scenario D was correct all along.<br /><br />Interestingly, I made the same mistake on Scenario C (but it took me longer to catch it).<br /><br />Nice job!Allen Downeyhttps://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-68274079664777367192016-05-09T14:00:20.197-07:002016-05-09T14:00:20.197-07:00Let me see if I can get it right this time. Feel f...Let me see if I can get it right this time. Feel free to leave my earlier wrong answer up. I deserve to be at least mildly shamed.<br /><br />Scenario C: <br /><br />Let t1=0.2 and t2=0.4. Here are the ways to get a positive test result, with their associated probabilities:<br /><br />Sick: p s<br />Not sick, t=t1: (1-p) t1 / 2<br />Not sick, t=t2: (1-p) t2 / 2<br /><br />The probability that one person is sick, given a positive test result, is <br /><br />ps / (sum of all three terms above),<br /><br />which is 1/4. <br /><br />That's the probability that the first positive-tester is sick, in scenario C (as it was in A and B).<br /><br />In scenario C, each trial is independent, so the answer to question 2 is the square of the answer to question 1, i.e., 1/16.<br /><br />Scenario D: <br /><br />If we hypothesize any given value of t, then we can calculate the probability that any given positive-tester is in fact sick. That turns out to be<br /><br />psick = 1/3 if t= 0.2<br />psick = 1/5 if t = 0.4.<br /><br />In scenario D, we never find out any information that tells us which value of t is correct, so they remain equiprobable. There's a 50% chance that psick=1/3 and a 50% chance that psick = 1/5, so when you meet that first positive-tester, the probability that he's sick is the average of the two.<br /><br />psick =0.5 (1/3+1/5) = 4/15. [Scenario D, question 1]<br /><br />Under each hypothesis for t, the probability that any given positive-tester is sick is independent of the others, so the probability that the first two testers are both sick is the square of the probability that one is sick. We still have no information about which value of t is correct, so the probability that both folks are sick is the average of the probabilities for each of the two t's:<br /><br />0.5 ( 1/9 + 1/25 ) = 17/225 [Scenario D, question 2].Ted Bunnhttps://www.blogger.com/profile/12230509214302717664noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-63146745203133838772016-05-09T13:20:48.420-07:002016-05-09T13:20:48.420-07:00Dammit, I got C wrong, didn't I? More of the p...Dammit, I got C wrong, didn't I? More of the positive results come from hypothesis t = 0.4 than from t=0.2. I'll revise, but I wanted to get this comment into the record right away.Ted Bunnhttps://www.blogger.com/profile/12230509214302717664noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-33895584212847705952016-05-09T12:28:12.361-07:002016-05-09T12:28:12.361-07:00For any given t, the probability that a person who...For any given t, the probability that a person who tests positive is actually sick is <br /><br />psick(t) = p s / (p s + (1-p) t).<br /><br />For the given parameters, the two relevant values are <br /><br />psick(0.2) = 1/3<br />psick(0.4) = 1/5<br /><br />In both scenarios C and D, the probability that the first person is sick is simply the average of the two:<br /><br />P1 = (1/3 + 1/5)/2 = 4/15.<br /><br />That's because the two possible values of t remain equiprobable throughout these scenarios.<br /><br />In scenario C, each new positive-testing person is an independent event with this same probability, so the probability that the first two people are both sick is<br /><br />P2C = P1^2 = 16/225.<br /><br />In scenario D, the two events are not independent, because they have the same underlying value of t. But for any given t, they would be independent. So we can compute the probability that both people are sick under hypothesis t=0.2, and the probability that both people are sick under hypothesis t=0.4, and average the two:<br /><br />P2D = (p(0.2)^2 + p(0.4)^2) / 2 = 17/225.<br />Ted Bunnhttps://www.blogger.com/profile/12230509214302717664noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-79810019169197517432016-05-09T08:07:39.631-07:002016-05-09T08:07:39.631-07:00So far you are 4 for 4 (two scenarios, two questio...So far you are 4 for 4 (two scenarios, two questions each). Want to lock in your answers for C and D before I publish solutions?Allen Downeyhttps://www.blogger.com/profile/01633071333405221858noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-2357609086349128032016-05-06T15:16:56.099-07:002016-05-06T15:16:56.099-07:00I got the same answers as you for scenario A. The ...I got the same answers as you for scenario A. The probability that the first patient is sick is<br /><br />p s / ( p s + (1-p) t1 / 2 + (1-p) t2 / 2).<br /><br />The three terms in the denominator are the probabilities associated with the three ways of getting a positive test: true positive, false positive with test t1, false positive with test t2.<br /><br />This works out to 1/4.<br /><br />In scenario A, the second patient's outcome is independent of the first, so the probability that both are sick is just the square of the above probability.<br /><br />In scenario B, the answer to question 1 is the same. If I'm not mistaken, the answer to question 2 is <br /><br />p^2 s^2 / ((p s + (1-p) t1)^2 / 2 + (p s + (1-p) t2)^2)/2)<br /><br />Sorry that's a bit hard to read. The numerator is the probability of getting two true positive. The denominator is of the form A^2/2 + B^2/2, where A is the probability of getting a single positive result (true or false) under hypothesis t1, and B is the probability under hypothesis t2. Under either hypothesis, the outcomes for patients 1 and 2 are independent, so the probability of getting two false positives under hypothesis t1 is A^2, and similarly for hypothesis t2.<br /><br />Anyway, the numerical value of the above expression is 1/17, so I claim that that's the answer to scenario B, question 2.<br />Ted Bunnhttps://www.blogger.com/profile/12230509214302717664noreply@blogger.comtag:blogger.com,1999:blog-6894866515532737257.post-48864716457072065042016-05-06T12:02:56.410-07:002016-05-06T12:02:56.410-07:00It gives me some hope that even you guys are havin...It gives me some hope that even you guys are having some difficulty moving the complexity up a level, I can understand the base case fine For Bayes, but keep getting lost as I try to move on.. So, glad to hear it is not just me! I really thought I was not bright enough to "get it"dartdoghttps://www.blogger.com/profile/15756184463450075364noreply@blogger.com