Mathematics for Computer Science 99% accurate TB testing MIT 6.042J/18.062J A great-sounding diagnostic test for TB: Probabilistic Diagnosis Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.1 bayes.1 bayes.2 bayes.2 99% accurate TB testing 99% accurate TB testing A great-sounding diagnostic A great-sounding diagnostic test for TB: if you have TB test for TB: if you have TB the test is guaranteed to detect the test is guaranteed to detect it. it. If you don’t have TB, the test says so 99% of the time. Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.3 bayes.3 bayes.4 bayes.4 1
99% accurate TB testing 99% accurate TB testing A great-sounding diagnostic test says TB! test for TB: if you have TB TB is a serious disease and the the test is guaranteed to detect test is at least 99% accurate. it. If you don’t have TB, the How worried should you be? test says so 99% of the time. What is the probability that you Your doctor gives you the test, actually have TB? and it says you have TB! Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.5 bayes.5 bayes.6 bayes.6 Do you have TB? Do you have TB? What is the probability that Pr[ + | TB] = 1 you have TB given that a = 1 Pr[ + |not TB] 99% accurate says you do ? 100 Pr[TB|test p sitive] = ? + o “ + ” for [test positive] false positive rate only 1% Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.7 bayes.7 bayes.8 bayes.8 2
Do you have TB? Do you have TB? Pr[TB|+] = Pr[TB AND +] Pr[TB AND +] Pr[TB|+] = Pr[+] Pr[+] = 1 = Pr[+|TB] ⋅ Pr[TB] = Pr[TB] Pr[+] Pr[+] Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.9 bayes.9 bayes.10 bayes.10 You do or you don’t You do or you don’t Pr[ + ] = Pr[ + ] = Pr[ + ] = Pr[ + |TB] ⋅ Pr[TB] + Pr[ + |not TB] ⋅ Pr[not TB] Total Probability Rule Total Probability Rule Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.11 bayes.11 bayes.12 bayes.12 3
You do or you don’t You do or you don’t Pr[ + ] = Pr[ + |TB] ⋅ Pr[TB] Pr[ + ] = Pr[ + |TB] ⋅ Pr[TB] + Pr[ + |not TB] ⋅ Pr[not TB] + Pr[ + |not TB] ⋅ Pr[not TB] 1 ⋅ Pr[TB] 1 ⋅ Pr[TB] = = 1 1 ⋅ Pr[not TB] ⋅ (1 − Pr[TB]) + + 100 100 Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.13 bayes.13 bayes.14 bayes.14 Do you have TB? Probability of Testing Positive Pr[ + ] = Pr[ + |TB] ⋅ Pr[TB] Pr[TB| + ] = Pr[TB] + Pr[ + |not TB] ⋅ Pr[not TB] Pr[ + ] = 99 Pr[TB] + 1 Pr[TB] = 99 Pr[TB] + 1 100 100 100 100 Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.15 bayes.15 bayes.16 bayes.16 4
Do you have TB? 11,000 TB cases reported CDC got reports of 11,000 Pr[TB| + ] = Pr[TB] cases of TB in US in 2011. Pr[ + ] Will be lots of unreported. = 100Pr[TB] So estimate: 1 99Pr[TB] + 1 Pr[TB] ≈ 10, 000 What is Pr[TB]? Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.17 bayes.17 bayes.18 bayes.18 Do you have TB? Unlikely you have TB Pr[TB| + ] = 100Pr[TB] Because of relatively 99Pr[TB] + 1 high false positive rate (1%) compared to TB rate (0.01%), 100 chance of having TB remains ≈ 1 10000 ≈ small (1%)! 99 100 + 1 10000 Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.19 bayes.19 bayes.21 5
Unlikely you have TB A “more accurate” test 99% accurate test is not so 99% accurate test is not so good here. good here. In fact, there’s a trivial test that is 99.99% accurate: always say “No TB” Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.23 bayes.24 Bayes Rule 99% accuracy still useful Pr[TB| + ] = Pr[ + | TB] ⋅ Pr[TB] 99% accurate test did Pr[ + ] increase your probability of TB 100 times. Pr[B|A] = Pr[A| B] ⋅ Pr[B] Pr[A] Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.25 bayes.26 6
99% accuracy still useful 99% accuracy still useful 99% accurate test did increase your probability Medicate the 3.5M who test of TB 100 times. If you positive, and you’re likely to only had 5M medicine doses cure nearly all the cases. for a population of 350M, whom should you medicate? Albert R Meyer, May 3, 2013 Albert R Meyer, May 3, 2013 bayes.27 bayes.28 7
MIT OpenCourseWare http://ocw.mit.edu 6.042J / 18.062J Mathematics for Computer Science Spring 20 15 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Recommend
More recommend