7.5 Conditional Probability; Independent Events Conditional Probability Example 1. Suppose there are two boxes, A and B containing some red and blue stones. The following table gives the number of stones of each kind in the two boxes. Red Stones (R) Blue Stones (R ) Totals Box A (A) 30 15 45 Box B (A ) 30 25 55 Totals 60 40 100 Let R represent the event a red stone is chosen, and A represent the event a stone is chosen from Box A. Then R represents the event a blue stone is chosen, and A represents the event a stone is chosen from Box B. We can find the following probabilities based on the given data. P (R) = 60 100 = 0.6 P (R ) = 40 100 = 0.4 P (A) = 45 100 = 0.45 P (A ) = 55 100 = 0.55 Now, suppose we are given with the additional information that a stone is chosen from Box A. Then the probability of choosing a red stone is P (choosing a red stone, given that the stone is chosen from Box A) = 30 45 0.67, because we are now choosing from among the 45 stones in Box A. This is a different number than the probability of choosing a red stone from the entire collection of 100 stones contained in the two boxes. So, the additional information that a stone is chosen from Box A reduces the sample space. In other words, we found the probability of finding a red stone, R, given the additional information that the stone is being chosen from Box A, A. This is called the conditional probability of event R, given that event A has occurred. This is written as P (R A). P (R A) is read as the probability of R, given A. In this example, P (R A) = 30 45, which can be written as P (R A) = 30/100 45/100 P (R A) =, P (A) where P (R A) represents, as usual, the probability that both R and A will occur. Now, we need to generalize the result from the above example. Let E and F be two events for a particular experiment, and that all events in the sample space S are equally likely. Using the basic principle of probability, P (F ) = n(f ) n(s) and P (E F ) = n(e F ). n(s) Fall 2010 Page 1 Penn State University
We need to find P (E F ), the probability that E occurs given that F has occurred. Since we assume F has occurred, we reduce the sample space to F : we look only at the elements inside F. Within the outcomes in F, E F contains the outcomes of F that are also in E. In other words, of the n(f ) elements in F, there are n(e F ) elements where E also occurs. This makes P (E F ) = n(e F ). n(f ) Dividing the numerator and denominator by n(s), we get P (E F ) = n(e F )/n(s) n(f )/n(s) = P (E F ). P (F ) Thus we have the following definition of conditional probability. Conditional Probability The conditional probability of event E given event F, written P (E F ), is P (E F ) = P (E F ), where P (F ) 0. P (F ) Remark. This definition tells us that, for equally likely outcomes, conditional probability is found by restricting the sample space to event F, and then finding the number of outcomes in F that are also in event E. Thus P (E F ) = n(e F ). n(f ) Remark. In case, we have a sample space with outcomes that are not equally likely, we can not use the above simplification but the formula, P (E F ) = P (E F ) P (F ) is still true. For an intuitive explanation, think of the above formula as giving the probability that both E and F occur compared with the entire probability of F. Example 2. Use the information in the table given in Example 1 to find the following probabilities. (a) P (A R) Solution. This represents the probability that the stone was chosen from Box A, given that the chosen stone was red. We reduce the sample space to R. Then we find n(a R) and n(r). P (A R) = P (A R) P (R) = n(a R) n(r) = 30 60 = 1 2. Thus, if a red stone is chosen, then the probability is 1/2 that the stone was chosen from Box A. Fall 2010 Page 2 Penn State University
(b) P (R A) Solution. P (R A) = n(r A) n(a) = 15 45 = 1 3. This gives the probability that a blue stone was chosen, given that the stone was chosen from Box A. (c) P (A R ) Solution. P (A R ) = n(a R ) n(r ) = 25 40 = 5 8. This gives the probability that the stone was chosen from Box B, given that the chosen stone was blue. A Venn diagram is often useful for solving problems in Conditional Probability. A Venn diagram for Examples 1 and 2 is shown below. Example 3. Given P (E) = 0.4, P (F ) = 0.5, and P (E F ) = 0.7, find P (E F ). Solution. We need to find P (E F ) first. By the union rule, P (E F ) = P (E) + P (F ) P (E F ) 0.7 = 0.4 + 0.5 P (E F ) So, P (E F ) = 0.2. Fall 2010 Page 3 Penn State University
Then, P (E F ) = P (E F ) P (F ) = 0.2 0.5 = 2 5. Example 4. Two fair coins are tossed, and it is known that at least one was a head. Find the probability that both were heads. Solution. The sample space for this experiment, S = {hh, ht, th, tt}. has four equally likely outcomes. Let E 1 be the event at least one head and E 2 be the event 2 heads. Then E 1 = {hh, ht, th} and E 2 = {hh}. Thus, P (E 1 ) = 3/4. Now, E 2 E 1 = {hh} and so P (E 2 E 1 ) = 1/4. We need to find P (E 2 E 1 ). Using the definition of conditional probability, P (E 2 E 1 ) = P (E 2 E 1 ) P (E 1 ) = 1/4 3/4 = 1 3. Example 5. Two cards are drawn from a standard deck, one after another without replacement. Find the probability that the second card is red given that the first card is red. Solution. According to the conditional probability formula, P (second card is red first card is red) = P (second card is red and the first card is red). P (first card is red) We will learn how to compute the probabilities such as the one in the numerator later. But this conditional probability can be found in a much easier way. We only need to observe that with one red card gone (we know that first card is red and it is not replaced), there are 51 cards left in the deck, 25 of which are red, so P (second card is red first card is red) = 25 51. Remark. For any two events A and B, P (A B) P (B A) in general. We will see how to compute P (A B) when we know P (B A) in the next section. Suppose E and F are two events in an experiment. By definition of conditional probability, P (E F ) = P (E F ), if P (F ) 0, P (F ) and P (F E) = P (F E), if P (E) 0. P (E) Then using the fact that P (E F ) = P (F E), and solving each of the above equations for P (E F ), we obtain the following rule. Fall 2010 Page 4 Penn State University
Product Rule of Probability If E and F are events, then P (E F ) may be found by either of these formulas. P (E F ) = P (F ) P (E F ) or P (E F ) = P (E) P (F E). Remark. The product rule gives a method for finding the probability that events E and F both occur, that is the event E F occurs. Example 6. In a class with 2/5 women and 3/5 men, 25% of the women are business majors. Find the probability that a student chosen at random is a female business major. Solution. Let B and W represent the events business major and woman, respectively. We want to find P (B W ). By the product rule, P (B W ) = P (W ) P (B W ). Using the given information, P (W ) = 2/5 = 0.4 and P (B W ) = 25% = 25/100 = 0.25. Thus, P (B W ) = 0.4 0.25 = 0.1. Example 7. A company needs to hire a new director of advertising. It has decided to try to hire person A or B, who are assistant advertising directors for its major competitor. To decide between A and B, the company does research on the campaigns managed by either A or B (no campaign is managed by both), and finds that A is in charge of twice as many campaigns as B. Also, A s campaigns have satisfactory results 3 out of 4 times, while B s campaigns have satisfactory results 2 out of 5 times. Suppose one of the campaigns (managed by A or B) is selected randomly. (a) Find the probability that A is in charge of the selected campaign and that it produces satisfactory results. (b) Find the probability that B is in charge of the selected campaign and that it produces satisfactory results. (c) What is the probability that the selected campaign is satisfactory? (d) What is the probability that the selected campaign is unsatisfactory? Solution. We can represent the situation schematically. Let A denote the event person A does the job and B represent the event person B does the job. Note that in this situation, A and B are complementary events that is, A = B, and A B is the sample space. Let S be the event satisfactory results and U represent the event unsatisfactory results. Then the given information can be summarized in the following tree diagram. Fall 2010 Page 5 Penn State University
Since A has twice as many jobs as B, we have P (A) = 2/3 and P (B) = 1/3, as shown in the above tree. When A does a job, the probability of satisfactory results is 3/4, and hence the probability of unsatisfactory results is 1 3/4 = 1/4. So, P (S A) = 3/4, and P (U A) = 1/4. Similarly, we have P (S B) = 2/5, and hence P (U B) = 1 2/5 = 3/5. The four branches of the above tree represent four mutually exclusive possibilities for the running and the outcome of the selected campaign, and these are all the possible outcomes of the experiment. We compute the product of the probabilities in each of the four branches. These are summarized below. Branch 1 : Branch 2 : Branch 3 : Branch 4 : 2 3 3 4 = 1 2 2 3 1 4 = 1 6 1 3 2 5 = 2 15 1 3 3 5 = 1 5 = P (A S) = P (A U) = P (B S) = P (B U) Note that the sum of all the branch products as computed above is 1, as expected. Now we can answer the questions. (a) We need to find P (A S). The event A S is represented by the branch 1 of the tree, and as noted above, its probability is the product of the probabilities of the pieces that Fall 2010 Page 6 Penn State University
make up that branch. Thus, P (A S) = P (A) P (S A) = 2 3 3 4 = 1 2. (b) We need to find P (B S). The event is represented by branch 3 of the tree, and as before, its probability is the product of the probabilities of the pieces of that branch: P (B S) = P (B) P (B S) = 1 3 2 5 = 2 15. (c) We need to find P (S). The event S is the union of the mutually exclusive events A S and B S, which are represented by branches 1 and 3 of the above tree. By the union rule, P (S) = P (A S) + P (B S) = 1 2 + 2 15 = 19 30. Thus, the probability of an event that appears on several branches is the sum of the probabilities of each of these branches. (d) We need to find P (U). This can be found by adding the probabilities of branches 2 and 4, as these are the branches on which U appears. So, P (U) = 1 6 + 1 5 = 11 30. Alternatively, since U is the complement of S, P (U) = 1 P (S) = 1 19 30 = 11 30. Example 8. The Environmental Protection Agency is considering inspecting 6 plants for environmental compliance: 3 in Chicago, 2 in Los Angeles, and 1 in New York. Due to a lack of inspectors, they decide to inspect two plants selected at random, one this month and one next month, with each plant equally likely to be selected, but no plant selected twice. What is the probability that 1 Chicago plant and 1 Los Angeles plant are selected? Solution. We will again use a tree diagram, as shown in the following figure, to represent the situation. In this diagram, the events of inspecting a plant in Chicago, Los Angeles, and New York are represented by C, LA, and NY, respectively. For the first inspection, P (C first) = 3/6 = 1/2 because 3 out of the 6 plants are in Chicago, and all plants are equally likely. For the second inspection, P (LA second C first) (written as P (LA C first) in the figure) = 2/5. For the second inspection, one plant is removed, since no plant is inspected twice, of which 2 are in Los Angeles. We want to find the probability of selecting exactly 1 Chicago plant and 1 Los Angeles plant. This event can occur in two ways: inspecting a Chicago plant this month and a Los Angeles plant next month (branch 2 of the tree diagram, that is, P (C, LA)), or inspecting Los Angeles this month and Chicago next month (branch 4, that is, P (LA, C)). Fall 2010 Page 7 Penn State University
For the branch 2, P (C, LA) = P (C first) P (LA second C first) = 1 2 2 5 = 1 5. For branch 4, where Los Angeles is inspected first, P (LA, C) = P (LA first) P (C second LA first) = 1 3 3 5 = 1 5. Since the two events are mutually exclusive, the final probability is the sum of these two probabilities. P (1C, 1LA) = P (C, LA) + P (LA, C) = 1 5 + 1 5 = 2 5. Example 9. Two cards are drawn from a standard deck, one after another without replacement. (a) Find the probability that the first card is a heart and the second card is red. Solution. We will again start with a tree diagram as shown in the following figure. On the first draw, since there are 13 hearts among the 52 cards, the probability of Fall 2010 Page 8 Penn State University
drawing a heart is 13/52 = 1/4. On the second draw, since a (red) heart has been drawn already, there are 25 red cards in the remaining 51 cards. Thus the probability of red card in the second draw, given that the first is a heart, is 25/51. By the product rule of probability, P (heart first and red second) = P (heart first) P (red second heart first) = 1 4 25 51 = 25 204. (b) Find the probability that the second card is red. Solution. To solve this, we need to fill out the bottom branch of the tree shown in part (a). Unfortunately, if the first card is not a heart, it is not clear how to find Fall 2010 Page 9 Penn State University
the probability of that the second card is red, because it depends on whether the first card is red or black. One way to solve this problem would be to divide the bottom branch into two separate branches: diamond and black card (club or spade). There is a simpler way, however, since we don t care whether or not the first card is a heart, as we did in part (a). Instead, we will consider whether the first card is red or black, and then do the same for the second card. The result, with the corresponding probabilities is shown in the tree diagram below. The probability that the second card is red is found by multiplying the probabilities along the two branches that lead to a second red card and adding them. P (red second) = 1 2 25 51 + 1 2 26 51 = 1 2 Fall 2010 Page 10 Penn State University
Remark. Note that the probability of finding a second red card in Example 9(b) is 1/2, exactly the same as the probability that any card is red. If we know nothing about the first card, there is no reason for the probability of the second card to be anything other than 1/2. Independent Events Suppose in Example 9(a), we draw the two cards with replacement (rather than without replacement). So, we put the first card back in the deck before drawing the second one. In this case, if the first card is a heart, then the probability of a red card on the second draw is 26/52 = 1/2, rather than 25/51, because there are still 52 cards in the deck, 26 of which are red. In this case, P (red second heart first) is the same as P (red second) (we found in Example 9(b), that P (red second) = 1/2). Thus we see that the value of the second card is not affected by the value of the first card. We say that the event that the second card is red is independent of the event that the first card is a heart since the knowledge of the first card does not influence what happens to the second card. On the other hand, when we draw without replacement, the events that the first card is a heart and the second card is red are dependent events. The fact that the first card is a heart means there is one less red card in the deck, influencing the probability that the second card is red. As another example, consider tossing a fair coin twice. If the first toss shows heads, the probability that the next toss is heads is still 1/2. Coin tosses are independent events, since the outcome of one toss does not influence the outcome of the next toss. Similarly, rolls of a fair die are independent events. On the other hand, the events the milk is old and the milk is sour are dependent events; if the milk is old, there is an increased chance that the milk is sour. To summarize, if events E and F are independent, then the knowledge that E has occurred gives no (probability) information about the occurrence or non-occurrence of event F. That is, P (F ) is exactly the same as P (F E), or P (F E) = P (F ). This, in fact, is the formal definition of independent events. Independent Events Events E and F are independent events if P (F E) = P (F ) or P (E F ) = P (E). If the events are not independent, they are dependent events. When E and F are independent events, then P (F E) = P (F ) and the product rule becomes P (E F ) = P (E) P (F E) = P (E) P (F ). Conversely, if this equation holds, then it follows that P (F ) = P (F E). Consequently, we have the following useful fact: Fall 2010 Page 11 Penn State University
Product Rule for Independent Events Events E and F are independent events if and only if P (E F ) = P (E) P (F ). Example 10. A calculator requires a keystroke assembly and a logic circuit. Assume that 99% of the keystroke assemblies are satisfactory and 97% of the logic circuits are satisfactory. Find the probability that a finished calculator will be satisfactory. [Assume that the failure of a keystroke assembly and the failure of a logic circuit are independent events.] Solution. Since the failure of a keystroke assembly and the failure of a logic circuit are independent events, P (satisfactory calculator) = P (satisfactory keystroke assembly and satisfactory logic circuit) = P (satisfactory keystroke assembly) P (satisfactory logic circuit) = (0.99)(0.97) 0.96. (Hence the probability of a defective calculator is 1 0.96 = 0.04.) Remark. It is common to confuse between mutually exclusive events and independent events. Events E and F are mutually exclusive if E F =, in which case, P (E F ) = 0. On the other hand, events E and F are independent if P (E F ) = P (E) P (F ). Mutually exclusive events can easily be shown in Venn diagrams (see page 5 of the notes on section 7.3). But, there is no easy way to show independent events in a Venn diagram. We will now show that the concepts of mutually exclusive events and independent events are quite different via the following two examples. Example 11. Suppose a fair die is rolled. Let S represent the sample space, E be the event an even number shows up, and F be the event an odd number shows up. Then, Clearly, S = {1, 2, 3, 4, 5, 6}, E = {2, 4, 6}, and F = {1, 3, 5}. E F =, which implies that P (E F ) = 0, which means that E and F are mutually exclusive events. But, P (E) = P (F ) = 3 6 = 1 2. So, P (E) P (F ) = (1/2) (1/2) = 1/4. Thus we have, P (E F ) P (E) P (F ), which means that E and F are not independent events that is, dependent events. Thus, events E and F are mutually exclusive but not independent. Note that intuitive reasoning also suggests that E and F are dependent, because the occurrence of E implies the non-occurrence of F, and vice versa. Fall 2010 Page 12 Penn State University
Example 12. Suppose two fair dice are rolled. Let S represent the sample space, E represent the event the first die shows a 5, and F represent the event the second die shows a 5. Then, n(s) = 36, and E = {5 1, 5 2, 5 3, 5 4, 5 5, 5 6}, F = {1 5, 2 5, 3 5, 4 5, 5 5, 6 5}, E F = {5 5}, where i j represents the outcome the first die shows i, the second die shows j. So, n(e) = 6 = P (E) = 6 36 = 1 6, n(f ) = 6 = P (F ) = 6 36 = 1 6, Thus, n(e F ) = 1 = P (E F ) = 1 36. P (E F ) = 1 36 = 1 6 1 = P (E) P (F ). 6 Hence, E and F are independent events. Note however that E and F are not mutually exclusive, as E F = {5 5}. Thus, events E and F are independent but not mutually exclusive. Note that in this case, intuitive reasoning also suggests that E and F are independent, because the number that shows up on the second die does not depend on the result of the first die. Remark. Intuitive reasoning is not enough to prove the dependence or independence of events. Use any of the following equations to check for the dependence or independence of events. Two events E and F are independent if any one of the following equations is satisfied. P (E F ) = P (E), P (F E) = P (F ), P (E F ) = P (E) P (F ). Example 13. On a typical January day in Manhattan the probability of snow is 0.1, the probability of a traffic jam is 0.8, and the probability of snow or a traffic jam (or both) is 0.82. Are the two events it snows and a traffic jam occurs independent? Solution. Let S represent the event, it snows, and T represent the event, a traffic jam occurs. We are given with the following information: P (S) = 0.1, P (T ) = 0.8, and P (S T ) = 0.82. Fall 2010 Page 13 Penn State University
By the union rule for probability, we have Now, P (S T ) = P (S) + P (T ) P (S T ) 0.82 = 0.1 + 0.8 P (S T ) 0.82 = 0.9 P (S T ) P (S T ) = 0.9 0.82 = 0.08. P (S) P (T ) = (0.1)(0.8) = 0.08 = P (S T ). So, S and T are independent events. Alternatively, we could calculate P (S T ) using or P (T S) using P (S T ) = P (S T ), P (T ) P (T S) = P (S T ), P (S) and check to see if P (S T ) = P (S), or P (T S) = P (T ). Fall 2010 Page 14 Penn State University