1 / 6

Bayes’ Rule - Example

Bayes’ Rule - Example. Medical Diagnosis 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:

holly-wynn
Download Presentation

Bayes’ Rule - Example

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bayes’ Rule - Example • Medical Diagnosis • 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 • 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

  2. Bayes’ Rule & Normalization • Direct assessments of prior probabilities for evidence (or symptoms in diagnosis problems) may not be possible • we can avoid direct assessment using normalization: • now since Pr(H | E) + Pr(ØH | E) = 1, we obtain • substituting in the equation for Pr(H | E) we get: • this allows for conditional terms to sum to 1 • 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

  3. Example: Normalization • 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) ) • P(disease) = 0.10  P(disease) = 0.90 • P(positive | disease) = 0.90 • P(positive | disease) = 0.03 •  P (disease | positive) = –––––––––––––––––––––––––––––––––––––––––––––––––––– • = (0.90)(0.10) / ( (0.90)(0.10) + (0.03)(0.90) ) • = 0.77 P(positive | disease) * P(disease) P(positive|disease)*P(disease) + P(positive|disease)*P(disease) Foundations of Artificial Intelligence

  4. Bayesian Updating • As each new evidence is observed, the belief in the unknown variable is multiplied by a factor that depends on the new evidence • suppose we have obtained, using Bayes’ rule and evidence E1 a probability for our diagnosis: • now a new evidence E2 is observed; we can apply Bayes’ rule with E1 as the constant conditioning context: • If we assume the pieces of evidence are conditionally independent given H, we have: • then: Bayesian updating formula Foundations of Artificial Intelligence

  5. Bayesian Updating- Example • 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. • 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. • Assuming that symptoms are conditionally independent given flu, the Bayesian updating gives: • But, we don’t have Pr(soar | fever). What can we do? • Note that • So: • i.e., Foundations of Artificial Intelligence

  6. Bayesian Updating- Example • So, we have: • From before, we know: • Pr(flu | fever) = 0.004 and so Pr(Øflu | fever) = 0.996 • Pr(soar | flu) = 0.5 • We don’t know Pr(soar | Øflu), but let’s assume that this is about the same as Pr(soar): • Pr(soar | Øflu) = Pr(soar) = 1/200 = 0.005 • 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. • Putting things together: • 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

More Related