Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Examples of Bayes Theorem Law of total probability: Let B i events be mutually exclusive and exhaustive. n P(A ) = ∑ P ( A B i )P ( Bi ) (1) i=1 Bayes Theorem (Devore) Let A 1, A 2, …, A k be a collection of k mutually exclusive and exhaustive events with prior probability P ( A i ) , where i = 1, 2, …, k . Then for any other event B for which P ( B ) > 0 , the posteriori probability of A j given that B has occurred is P ( Aj∩ B ) P ( B A j )P ( A j ) - j = 1, 2, … , k P ( A j B ) = ------------------------- = ------------------------------------------k P(B) ∑ P ( B Ai )P ( Ai ) i=1 Drug testing example: wikipedia Suppose a drug test is 99% sensitive and 99% specific. That is, the test will produce 99% true positive results for drug users and 99% true negative results for non-drug users. Suppose that 0.5% of people are users of the drug. If a randomly selected individual tests positive, what is the probability he or she is a user? A 1 : Event that person is a drug user, and A 2 event that the person is not a drug user B : Positive drug test result P ( A 1 B ) : Required output Prior probabilities P ( A 1 ) = 0.005 and P ( A 2 ) = 0.995 P ( B A 1 ) = 0.99 True positive for drug users P ( B A 2 ) = 0.01 True negative for non-drug user is 99% and hence there is only 1% chance that the drug test result will be positive if the person is a non-drug user. Posterior probability: P ( B A 1 )P ( A 1 ) 0.99 × 0.005 - = ------------------------------------------------------------------------------P ( A 1 B ) = ------------------------------------------k P ( B A 1 )P ( A 1 ) + P ( B A 2 )P ( A 2 ) ∑ P ( B Ai )P ( Ai ) i=1 0.99 × 0.005 P ( A 1 B ) = ------------------------------------------------------------------- = 33.2 % 0.99 × 0.005 + 0.01 × 0.995 From wikipedia entry for Bayes Theorem taken Sept. 2, 2013. Despite the apparent accuracy of the test (99%), if an individual tests positive, it is more likely that they do not use the drug than that they do. This surprising result arises because the number of non-users is very large compared to the number of users. To use concrete numbers, if 1000 individuals are tested, there are expected to be 995 non-users and 5 users. From the 995 non-users, 0.01 × 995 ≈ 10 false positives are expected. From the 5 users, 0.99 × 5 ≈ 5 true positives are expected. Out of 15 positive results, only 5, about 33%, are genuine. Nate Silver’s book had examples of Bayes theorem and emphasized its power; also Comscore wanted expertise with applying this theorem. Let’s internalize it.