Bayes heore & Diagnostic ests Screening ests Box contains 2 red balls and blue ball Box 2 contains red ball and 3 blue balls A coin is tossed. If Head turns up a ball is drawn fro Box, and if ail turns up then a ball is drawn fro Box 2. If a red ball is drawn, what is probability that it is fro Box? H Red =? 2 Box contains 2 red balls and blue ball Box 2 contains red ball and 3 blue balls /2 H /2 2/3 /4 3/4 Red H H Red H Red = HxRed H Blue H /6 H Blue Red Blue /8 Red 3/8 Blue 3 /2 H /2 2/3 Red H H Red H Red = HxRed H Blue H /6 H Blue /4 3/4 Red /8 Red Blue 3/8 Blue HR HR H R = = R HR + R = [] / ([] + [/8] = 8/ 4 Prior and Posterior Probabilities H Red is called the Posterior Probability of H. H is called the Prior probability of H. 5 A D = AD D Plant A(80% has 2% of Defective products. Plant B(20% has % of Defective products. If a defective product is found what is the probability that it was fro Plant A? 80% 2% D A.06 A D A 20% B 98% ND A % D B 99% ND B.784 A ND.002 B D.98 B ND 6
80% A 20% B AD A D = D 2% D A 98% ND A % D B 99% ND B.06 A D.784 A ND.002 B D.98 B ND AD = AD + BD Let B, B 2,, B be utually exclusive and exhaustive events that constitute a partition of saple space S. he prior probabilities of events B i are positive. If A is the union of utually exclusive events that, A ( B i i and that ( B i i B i i A B i then B A B Bk, k,2,... k k =.06 / (.06 +.002 =.889 B P A B i i ( i 7 8 Soe Questions If you test positive for HIV, what is the probability that you have HIV? If you used an inspection syste and detected a defective coputer chip what is the probability that this chip is really defective? Exaple: Coronary artery disease Present D + Absent D otal Negative 208 327 535 9 [Fro the book, Medical Statistics page 30, and the 2x2 table fro data of Weiner et al (979] 0 he disease Prevalence in these patients D + = 023/465 =.70 Predictive Value of a Positive est: he probability of having the disease given that a person has a positive test is given by: Present D + Absent D otal Negative 208 327 535 D 85/465 85 D.88 930/465 930 Predictive Value of a Negative est: D Present D + Absent D otal Negative 208 327 535 D 2 2
hings to notice: (Prevalence D D D 85/465 208/465 023/465.7 Present D + Absent D otal Negative 208 327 535 Likewise, (Overall percentage that tested positive D D 85/465 5/465 930/465.63 3 Present D + Absent D otal Negative 208 327 535 Calculate the following: D = = D D = 4 Present D + Absent D otal Sensitivity and Specificity Negative 208 327 535 Sensitivity: he probability of a person testing positive, given that (she has the disease. D 85/465 D 85/023.80 D 023/465 5 6 Specificity: he probability of a person testing negative given that (she does not have the disease. Present D + Absent D otal Negative 208 327 535 D 327 /465 D 327 / 442.74 D 442/465 Present D + Absent D otal Negative 208 327 535 False Negative rate = sensitivity D 208/465 D 208/023.2 D 023/465 False Positive rate = specificity D 5/465 D 5/ 442.26 D 442/465 7 8 3
Sensitivity & False Negatives For our proble, since the sensitivity is.8, the false negative rate is.8 =.2. Interpretation: 20% of the tie a person will actually have the disease when the test says that he/she does not. Likewise, since specificity is.74, the false positive rate is 0.26. Sensitivity vs Specificity In a perfect world, we want both to be high. he two coponents have a seesaw relationship. Coparisons of tests accuracy are done with Receiver Operator Characteristic (ROC curves. 9 20 ROC Sensitivity.0 0.0 est Positive Sensitivity Specificity Criteria.0 0 2.93.55 3.8.59 4.64.80 5 0.0 A second test Specificity 2 About ROC Curve Area under the ROC represents the probability of correctly distinguishing a noral fro an abnoral subject on the relative ordering of the test ratings. wo screening tests for the sae disease, the test with the higher area under its ROC curve is considered the better test, unless there is particular level of sensitivity or specificity is especially iportant in coparing the two tests. 22 How can we get the predictive value of a positive test fro sensitivity? After all, at least as a patient, we want to know that probability that we have a disease given that we have just tested positive! Bayes heore Bayes' heore A B B B Applying this to our forula, we have sensitivity prevalence D D (.8(.7 D. 89.63 ested positive In words, the predictive value of a positive test is equal to the sensitivity (=.8 ties prevalence (=.7 divided by percentage who test positive (=.63. 23 24 4
Exaple Suppose that 84% of hypertensives and 23% of norotensives are classified as hypertensive by an autoated bloodpressure achine. If it is estiated that the prevalence of hypertensives is 20%, what is the predictive value of a positive test? What is the predictive value of a negative test? Sensitivity =.84 Specificity =.23 =.77 Pretty Good est!?? (.84(.2 (.84(.2 (.84(.2 PV.48 D D (.2(.84 (.8(.23 PV.95 What if only 2% prevalence? 25 5