7.6 Notes O’Brien Sp10 FM 9th ed Lial 7.6 Bayes’ Theorem I. Review A. Conditional Probability If you are asked to calculate the probability of an event (F) given that another event (E) is know to have occurred, you are finding a conditional probability. The conditional probability, P F E , read as “the probability of F given E”, is defined as follows. P F E B. PF E , where P(E) ≠ 0 PE The Product Rule of Probability For events E and F, P(F ∩ E) may be found using either of the following formulas. P(F ∩ E) = P(F) ∙ P(E | F) or P(F ∩ E) = P(E) ∙ P(F | E) Note: F ∩ E and E ∩ F are the same set. They both represent the intersection of sets E and F. C. A Probability Tree Diagram In a probability tree diagram, the first branching shows the possible outcomes of the first decision point along with their corresponding probabilities. The second branching shows the possible outcomes & corresponding probabilities of the second decision point GIVEN the outcome of the first decision point. These are conditional probabilities. To find the probability of the final outcome of each two-branch sequence, we multiply the probability of the first branch times the conditional probability of the second branch. For the tree diagram shown below, we can find P(E) by adding P(F ∩ E) & P(F' ∩ E) and we can find P(E') by adding P(F ∩ E') & P(F' ∩ E'); i.e., P(E) = P(F ∩ E) + P(F' ∩ E) II. and P(E') = P(F ∩ E') + P(F' ∩ E'). Bayes’ Theorem A. Introduction This winter 23% of Cheap Skate employees received a flu shot, and of those, 1% got the flu. Of the employees who did not receive a flu shot, 12% got the flu. If an employee is selected at random, what is the probability that s/he did not receive a flu shot given that s/he got the flu? This question is different from the types of questions we answered in section 7.5. Here we are being asked to find a probability after the outcomes of the experiment have been observed. We call this a reverse or a posteriori probability. To find a reverse probability, we must use a formula derived from the definition of conditional probability and the Product Rule. It is called Bayes’ Theorem after Reverend Thomas Bayes who first discovered the formula in the 1700s. 1 7.6 Notes O’Brien Sp10 FM 9th ed Lial Special Case of Bayes’ Theorem for Two Events B. P F E P(F) P(E F) P(F) P(E F) P(F ) P(E F) Notice the numerator is equivalent to P(F ∩ E) & the denominator is equivalent to P(F ∩ E) + P(F' ∩ E) which equals P(E). As a consequence, we can also write Bayes’ Theorem as P F E PF E PF E PF E or P F E PF E PE Let’s use the theorem to solve the problem from the introduction. Example 1 This winter 23% of Cheap Skate employees received a flu shot, and of those, 1% got the flu. Of the employees who did not receive a flu shot, 12% got the flu. If an employee is selected at random, what is the probability that s/he did not receive a flu shot given that s/he got the flu? S = received flu shot and F = got the flu P(S | F) P(S) P(F | S ) P(S) P(F | S ) P(S) P(F | S) = .77 .12 .77 .12 .23 .01 = 924 947 ≈ .9757 Note that the order of the variables in the requested conditional probability is the same as the order of the variables in the tree diagram. This will be true for all problems which require Bayes’ Theorem. C. General Form of Bayes’ Theorem The special case of Bayes’ Theorem can be generalized to more than two events by using a tree diagram which shows all the paths that lead to event E. PFi | E PFi PE | Fi PF1 PE | F1 PF2 PE | F2 ... PFn PE | Fn Hint: The easiest way to remember this formula is to think about the tree diagram that produces it. 2 7.6 Notes O’Brien Sp10 FM 9th ed Lial Using Bayes’ Theorem D. 1. Start a tree diagram with branches representing F1, F2, …, Fn. Label each branch with its corresponding probability. 2. From the end of each of these branches, draw a branch for every event E. Label each of these with its probability, P(E | Fi). 3. You now have n different paths that result in event E. Next to each path, put its probability – the product of the probability of the 1st branch P(Fi) & the probability of the 2nd branch P(E | Fi).; i.e., P(Fi) ∙ P(E | Fi) which equals P(Fi ∩ E). 4. P(Fi | E) is found by dividing the probability of the branch for F i by the sum of the probabilities of all the branches producing event E. Example 2 For mutually exclusive events R1, R2, and R3, we have P(R1) = .15, P(R2) = .55, and P(R3) = .30. Also, P(Q | R1) = .40, P(Q | R2) = .20, and P(Q | R3) = .70. Find P(R1 | Q). PR1 | Q [3] P(R 1 ) P(Q | R1 ) P(R 1 ) P(Q | R1 ) P(R 2 ) P(Q | R 2 ) P(R 3 ) P(Q | R 3 ) = .15 .40 .15 .40 .55 .20 .30 .70 = .06 6 3 = = .38 38 19 3 7.6 Notes O’Brien Sp10 FM 9th ed Lial Example 3 Companies A, B, and C produce 15%, 40%, and 45%, respectively, of the major appliances sold in a certain area. In that area, 1% of the company A appliances, 1.5% of the company B appliances, and 2% of the company C appliances need service within the first year. Suppose a defective appliance is chosen at random, find the probability that it was manufactured by Company B. [15] B = appliance is manufactured by Company B; D = the appliance is defective Example 4 The adjacent table gives information about cargo passing through three shipping terminals operated by Krag Corp. Krag’s internal auditor randomly selects one set of shipping documents. If the set chosen indicates an error has occurred, what is the probability that the error occurred at the Land Terminal? [21] Terminal % of Cargo Handled % of Error Land 50 2 Air 40 4 Sea 10 14 Example 5 [25] 4