Bayes Rule Example i Medical Diagnosis 4 suppose
Bayes’ Rule - Example i Medical Diagnosis 4 suppose we know from statistical data that flu causes fever in 80% of cases, approximately 1 in 10, 000 people have flu at a given time, and approximately 1 out of every 50 people is suffering from fever: Pr(fever | flu) = 0. 8 Pr(flu) = 0. 0001 Pr(fever) = 0. 02 4 Given a patient with fever, does she have flu? Answer by applying Bayes’ rule: Pr(flu | fever) = [ Pr(fever | flu). Pr(flu) ] / Pr(fever) = 0. 8 x 0. 0001 / 0. 02 = 0. 004 Foundations of Artificial Intelligence
Bayes’ Rule & Normalization i Direct assessments of prior probabilities for evidence (or symptoms in diagnosis problems) may not be possible 4 we can avoid direct assessment using normalization: 4 now since Pr(H | E) + Pr(ØH | E) = 1, we obtain 4 substituting in the equation for Pr(H | E) we get: 4 this allows for conditional terms to sum to 1 4 so at the cost of assessing Pr(E | ØH) , we can avoid assessing Pr(E), and still obtain exact probabilities using the Bayes’ rule. Foundations of Artificial Intelligence
Example: Normalization i Suppose A blood test is 90% effective in detecting a disease. It also falsely diagnoses that a healthy person has the disease 3% of the time. If 10% of those tested have the disease, what is the probability that a person who tests positive will actually have the disease? ( i. e. find P(disease | positive) ) 4 P(disease) = 0. 10 P( disease) = 0. 90 4 P(positive | disease) = 0. 03 P(positive | disease) * P(disease) 4 P (disease | positive) = –––––––––––––––––––––––––– P(positive|disease)*P(disease) + P(positive| disease)*P( disease) 4 = (0. 90)(0. 10) / ( (0. 90)(0. 10) + (0. 03)(0. 90) ) 4 = 0. 77 Foundations of Artificial Intelligence
Bayesian Updating i As each new evidence is observed, the belief in the unknown variable is multiplied by a factor that depends on the new evidence 4 suppose we have obtained, using Bayes’ rule and evidence E 1 a probability for our diagnosis: 4 now a new evidence E 2 is observed; we can apply Bayes’ rule with E 1 as the constant conditioning context: Bayesian updating formula 4 If we assume the pieces of evidence are conditionally independent given H, we have: 4 then: Foundations of Artificial Intelligence 4
Bayesian Updating- Example i In the previous example, we had: Pr(fever | flu) = 0. 8, Pr(flu) = 0. 0001, Pr(fever) = 0. 02 allowing us to conclude that Pr(flu | fever) = 0. 004 using Bayes’ rule. i Observe the new symptom, soar-throat. We know that flu causes soar-throat 50% of the time (i. e. , Pr(soar | flu) = 0. 5) and 1/200 = 0. 005 people have soar throats. We can now update our diagnosis that she has flu. i Assuming that symptoms are conditionally independent given flu, the Bayesian updating gives: i But, we don’t have Pr(soar | fever). What can we do? i Note that i So: i i. e. , Foundations of Artificial Intelligence 5
Bayesian Updating- Example i So, we have: i From before, we know: 4 Pr(flu | fever) = 0. 004 and so Pr(Øflu | fever) = 0. 996 4 Pr(soar | flu) = 0. 5 i We don’t know Pr(soar | Øflu), but let’s assume that this is about the same as Pr(soar): 4 Pr(soar | Øflu) = Pr(soar) = 1/200 = 0. 005 4 Note: this seems reasonable, since few people have flu anyway, and so the probability of having soar throat at random would not be very different from the probability of a person who does not have the flu, having soar throat. In other words, it is reasonable to assume that having soar throat and not having flu are independent. i Putting things together: 4 Pr(flu | fever / soar) = [0. 004 * 0. 5] / [ (0. 004 * 0. 5) + (0. 996 * 0. 005) = 0. 002 / (0. 002 + 0. 00498) = 0. 2865 Foundations of Artificial Intelligence 6
- Slides: 6