Math 141: Business Mathematics I Fall 2015 §7.6 Bayes’ Theorem Instructor: Yeong-Chyuan Chung Consider the following two scenarios: (1) Suppose that a drug test produces 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 person tests positive, we would like to know the probability that he/she is a user of the drug. (2) Suppose that three machines A, B, and C, in a factory produce similar engine components. Machine A produces 50% of the total components, Machine B produces 30%, and Machine C produces 20%. Suppose that 1% of the components produced by Machine A are defective, 4% of those produced by Machine B are defective, and 6% of those produced by Machine C are defective. If a randomly selected component is found to be defective, we would like to know the probability that it was produced by a particular machine, say Machine A. In both scenarios, we have information about some conditional probabilities. The probabilities that we want to compute are also conditional probabilities, but the events have been switched around. For example, in (1), we know that the probability that a person tests positive given that he/she is a drug user is .99, and we want to compute the probability that a person is a drug user given that he/she tests positive. In (2), we know that the probability that a component is defective given that it is produced by Machine A is .06, and we want to compute the probability that a component is produced by Machine A given that it is defective. Using the notation from §7.5, we can state the problem as follows: Given two events E and F , if we know P (F |E), how can we use it to compute P (E|F )? Bayes’ theorem tells us how to do this. P (E ∩ F ) . On the other hand, P (E ∩ F ) = P (F |E) · P (E), so we Recall that P (E|F ) = P (F ) get P (E ∩ F ) P (F |E) · P (E) P (E|F ) = = . P (F ) P (F ) We will see in some of the examples that drawing a tree diagram can help us to organize the information. Now let’s try to compute the probabilities in the two scenarios above. 1 2 §7.6 Bayes’ Theorem Example (Drug test). We see that despite the apparent accuracy of test, if an individual tests positive, it is more likely that he/she does not use the drug than that they do. This is because the number of non-users is very large compared to the number of users, so the number of false positives outweighs the number of true positives. More concretely, suppose that 1000 individuals are tested. Then we expect 995 non-users and 5 users. From the 995 non-users, we expect .01 × 995 ≈ 10 to test positive. From the 5 users we expect .99 × 5 ≈ 5 to test positive. Out of these 15 who test positive, only 5 were users. Example (Machine). In this example, we might have been tempted to say at the beginning that the probability is around 21 since Machine A produces half of the total output. However, the computation gave us a much lower probability. This is because Machine A produces a smaller fraction of the defective components, so knowing that the component selected is defective enables us to reduce the likelihood that it is produced by Machine A. §7.6 Bayes’ Theorem 3 Example (Exercise 12 in the text). In the tree diagram below, A, B, C, and D are events, and B = (A ∪ C)c . Complete the information on the diagram, and use it to compute: (a) P (D) (b) P (B|D) (c) P (A|Dc ) (d) P (A ∪ D) 4 §7.6 Bayes’ Theorem Example (Exercise 14 in the text). Two cards are drawn in succession without replacement from a standard deck of 52 cards. What is the probability that the first card is a heart given that the second card is a diamond? Example (Exercise 18 in the text). Urn A contains four white balls and six black balls. Urn B contains three white balls and five black balls. A ball is drawn from Urn A and then transferred to Urn B. A ball is then drawn from Urn B. What is the probability that the transferred ball was white given that the second ball drawn was white? Example (Exercise 41a in the text). A medical test has been designed to detect the presence of a certain disease. Among people who have the disease, the probability that the disease will be detected by the test is .95. However, the probability that the test will erroneously indicate the presence of the disease in those who do not actually have it is .04. It is estimated that 4% of the population who take this test have the disease. If the test administered to an individual is positive, what is the probability that the person actually has the disease?