NAME: NUR HIDAYAH BINTI ADNAN MATRIC NO: B031410281 (2-BITM S1G2) BITI 1113: ARTIFICIAL INTELLIGENCE ASSIGNMENT 2 QUESTION 1: BAYES' THEOREM AND TEST RESULTS FROM THE DOCTOR A VERY REAL LIFE EXAMPLE! CANCER SCREENING STATEMENT: Approximately 1% of woman aged 40-50 have breast cancer. A woman with breast cancer has a 90% chance of a positive test from a mammogram, while a woman without a cancer has a 10% chance of a false positive result. P (A|B) = P (B|A).P (A) P (B) By using Bayes’ Theorem above, what is the probability a woman has breast cancer given that she just had a positive test? SOLUTIONS: A: Woman has a breast cancer B: Positive test P (A|B) = P (B|A).P (A) P (B) P (cancer| positive) = P (positive| cancer).P cancer) P (positive) 0.1 0.9 cancer + (0.9) - (0.1) No Cancer = = = + (0.1) - (0.9) (0 .90) . (0.01) (0.01)(0.9) + 99(0.10) 0.009 0.009 + 0.099 0.009 0.009 + 0.099 = 0.009 = 9 = = 0.108 108 0.083 8 .3 % QUESTION 2: MEDICAL TESTS RARE DISEASE WITH BAYES’S THEOREM STATEMENT: Suppose that you are worried that you might have a rare disease. You decide to get tested, and suppose that the testing methods for this disease are correct 99 percent of the time (in other words, if you have the disease, it shows that you do with 99 percent probability, and if you don't have the disease, it shows that you do not with 99 percent probability). Suppose this disease is actually quite rare, occurring randomly in the general population in only one of every 10,000 people. Suppose that you are worried that you might have a rare disease. If your test results come back positive, what are your chances that you actually have the disease? Do you think it is approximately: (a) .99, (b) .90, (c) .10, or (d) .01? SOLUTIONS: P (A|B) = P (A). P (B|A) P (B) A = you have this disease B = you test positive. P (B| not A) is the probability of a "false positive": that you test positive even though you don't have the disease. P (B|A) = 0.99, P (A) = 0.0001 P (B) may be derived by conditioning on whether event A does or does not occur: P (B) =P (B|A) P (A) +P (B| not A) P (not A) = 0 .99*0.0001+0.01*0.9999 = 0.010098 Thus the ratio from Bayes' Theorem is less than 1 percent. So the answer is d) 0.01 The reason get this result is because the disease is so rare that the number of false positives greatly outnumbers the people who truly have the disease. This can be seen by thinking about what we can expect in 1 million cases. In those million, about 100 will have the disease, and about 99 of those cases will be correctly diagnosed as having it. Otherwise about 999,900 of the million will not have the disease, but of those cases about 9999 of those will be false positives (test results that are positive because of errors). So, if you test positive, then the likelihood that you actually have the disease is about 99/ (99+9999), which gives the same fraction as above, approximately .0098 or less than 1 percent