240 likes | 306 Views
Probability, cont. General Addition Rule General Multiplication Rule Conditional Probability. Learning Objectives. By the end of this lecture, you should be able to: Apply the general addition rule and the general multiplication rule.
E N D
Probability, cont.General Addition RuleGeneral Multiplication RuleConditional Probability
Learning Objectives By the end of this lecture, you should be able to: • Apply the general addition rule and the general multiplication rule. • Describe what is meant by the term ‘general’ in the general addition rule and general multiplication rule. • Describe and apply the conditional probability rule.
Example Example: What is the probability of randomly drawing either an ace or a heart from a deck of 52 playing cards? Note that you can not use our original version of the addition rule here since the events are not disjoint. (It is possible for the card to be both an Ace and a Heart).
Example: If rolling a single die, determine the probability of rolling an even number, or a number greater than 2. P(Even or >2) = ? P(Rolled an Even) = 3/6 P(Rolled a number >2) = 4/6 P(Rolled an Even OR >2) = P(Rolled an Even) + P(Rolled a number >2) = 3/6 + 4/6 = 7/6 ?!?! No, because in this case, there are some non-disjoint outcomes (in this case, two). Two of the outcomes: 4 and 6 are even and also greater than two. Therefore, these two outcomes were counted twice. However, we CAN apply the so-called general addition rule which works on both disjoint events, and ALSO on non-disjoint events…
General addition rule P(A or B) = P(A) + P(B) – P(A and B) Why is it called the “general” rule? “General” means can be used on BOTH disjoint and non-disjoint events!
P(A or B) = P(A) + P(B) – P(A and B) Example: If rolling a single die, determine the probability of rolling an even number, or a number greater than 2. P(Even or >2) = ? P(Outcome is an Even) = 3/6 P(Outcome is a number >2) = 4/6 P(Outcome is an Even AND >2) = 2/6 Applying General Addition Rule: P(A or B) = P(A) + P(B) – P(A and B) = P(Even) + P(>2) – P(Even and >2) = 3/6 + 4/6 – 2/6 = 5/6
Why do we call it the “general” addition rule? • Because it applies to any addition events. That is, you can use it for both disjoint events and non-disjoint events. • Why does it also work for disjoint events? • Recall that if 2 events are disjoint, this means that the two events are mutually exclusive. In other words, if one of the two events or occurs, the other event will not occur. • Therefore, P(A and B), i.e. the probability of both events being true will always equal 0. So: P(A or B) = P(A) + P(B) - P(A and B) However, if the events are disjoint, then P(A and B) is 0, Therefore: P(A or B) = P(A) + P(B) - 0 (i.e. This is our addition rule for disjoint events) Let’s look at an example of applying the general rule to a disjoint events:
Example: What is the probability of randomly drawing • either an Ace or a 7 from a deck of 52 playing cards? • P(Card is an Ace) 4/52 • P(Card is a 7) 4/52 • P(Card is an Ace AND a 7) 0 • P(Draw an Ace OR Draw a 7) ? • = P(Ace) + P(7) – P(Ace and 7) • = 4/52 + 4/52 – 0/52) = 8/52 P(A or B) = P(A) + P(B) – P(A and B)
Example: What is the probability of randomly drawing • either an ace or a heart from a deck of 52 playing cards? • P(Ace) 4/52 • P(Heart) 13/52 • If we simply added them, we would get 17/52. This is NOT the correct result! • P(Ace and Heart) 1/52 • There is one NON-disjoint event present. Notice how the Ace of Hearts has been counted twice. Therefore we must subtract this doubled item. So the correct answer is: (4/52 + 13/52 – 1/52) = 16/52. P(A or B) = P(A) + P(B) – P(A and B)
General addition rule General addition rule for any two events A and B: P(A or B) = P(A) + P(B) – P(A and B) What is the probability of randomly drawing either an ace or a heart from a deck of 52 playing cards? Answer: There are 4 aces in the pack and 13 hearts. However, 1 card is both an ace and a heart. If you simply added the two probabilities separately, you would end up counting that same card twice. The general addition rule tells us that if some of the outcomes are non-disjoint, then we will overcount those non-disjoint outcomes – an additional time for each outcome. Therefore, we need to subtract those overlaps. In this problem, there is exactly one disjoint event. Thus: P(ace or heart) = P(ace) + P(heart) – P(ace and heart) = 4/52 (the 4 aces) + 13/52 (the 13 hearts) - 1/52 (the Ace of Hearts) = 16/52 * Incidentally, you may be tempted to try to use the multiplication rule to calculate P(Ace and Heart). However, these events are not independent, so you can’t use your multiplication rule just yet. For this reason, simply accept my word (or determine intuitively) that the chance of P(Ace and Heart) is exactly 1/52.
Example: In a group of 100 athletes, 30% are basketball players. In that same group, 25% are over 6-feet tall. What is P(BB or >6 feet)? Answer: • P(Basketball Player) = 0.3, • P(>6 feet tall) = 0.25 If we count 0.3 + 0.25, we will get an artificially high number. This is because in the basketball group we will count several people who are also 6 feet. Similarly, among the 6-footers, we will count several basketball players. Therefore, we will have counted those people TWICE. To get an accurate result, we have to subtract the number of outcomes that we counted twice. Again, who got counted twice? Answer: Those people who are both basketball players and 6 feet: P(BB and >6 feet) = P(BB) + P(6’) – P(BB and 6’) Note that in this question, we do not have enough information to calculate the probability since we are not told how many people in the 100 are both basketball players and 6 feet tall. This would be one of those (horrible) “not enough information to answer the problem” questions. However, in the real world, people often make mistakes as a result of coming up with “answers” in spite of having incomplete data. You need to be able to recognize when you are in this situation.
More than one non-disjoint event Example: What is the probability that a card from a deck is either a King or a Queen or a Diamond? P(King) + P(Queen) + P(Diamond) is NOT correct since there are non-disjoint events that will be overcounted. Non disjoint events: King of Diamonds and Queen of Diamonds To solve this question, we count all the outcomes, and then subtract all outcomes that have overlapped. I.e. All non-disjoint outcomes. = P(King) + P(Queen) + P(Diamond) – P(King and Diamond) – P(Queen and Diamond) = 4/52 + 4/52 + 13/52 – 1/52 – 1/52 = 19 /52
Independence revisited Suppose you tend to spend all your free weekends in Seattle (if the boss gives you the weekend off) and you want to determine whether or not you need to dig out your raincoat. • Your boss gives you roughly 30% of your weekends off, so P(you will to go Seattle) = 0.3. • It rains roughly 10% of days: P(Rain) = 0.1 Using our original multiplication rule, we might be temped to say: P(in Seattle AND Rain) = 0.3 * 0.1 = 0.03. Thoughts? These events P(in Seattle) and P(Rain) are NOT independent: The probability that it is going to rain will indeed be affected by your being in Seattle as opposed to, say, being in Death Valley, California.
Multiplication Rule revisited Suppose you tend to spend all your free weekends in Seattle (if the boss gives you the weekend off) and you want to determine whether or not you need to dig out your raincoat. • P(in Seattle) = 0.3 • P(Rain given that we are in Seattle) = 0.4 Key Point: We needed to adjust our probability of rain to account for our being in Seattle. When we said P(Rain) = 0.1 a moment ago, we were taking some kind of national average. However, P(Rain given that we are in Seattle) is about 0.4. The moment you find yourself saying “given that” (or something similar), you are talking about a conditional probability. In other words, you are acknowledging that the probability you are interested in may be affected by something else. In this case, you are acknowledging that the probability of rain is affected by being in Seattle.
Key Point The moment events are NOT independent, you must recognize that somewhere in your probability calculation, you will need to apply a conditional probability. • Probability of drawing an Ace and then drawing another Ace. P(2nd card is an Ace) changes depending on whether or not the first card was an Ace. These events are NOT independent, and therefore, you must include a conditional probability in your calculations.
General multiplication rule (“And”) When dealing with events that are not independent, we need to look at our ‘conditional’ event and account for the possible change in probability. • Recall that if A and B are independent, then P(A and B) = P(A) * P(B) • However, if P(B) changes based on whether or not A has occurred, then we are saying that the events are not independent. • Therefore, rather than simply saying P(B), we must adjust it to say P(B given that A has occurred). • There is a special notation for this: P(B | A). P(A and B) = P(A) * P(B|A) This is called the general multiplication rule. That is, this is a version of the multiplication rule that is not limited to independent events.
Example: What is the probability of randomly drawing a card from the deck that is an Ace AND a Heart? P(ace and heart) = P(ace) * P(heart | ace) P(Ace) = (4/52) P(Heart | Ace) = (1/4) Take a moment and think about this! We are limiting the situation to Aces only!! Probability of a Heart GIVEN that we are looking at Aces = 1/4 Answer: P(ace) * P(heart | ace) = (4/52) * (1/4) = 1/52 P(A and B) = P(A) * P(B|A)
Why do we call it the “general” multiplication rule? • Same story as with the “general” addition rule. That is, this rule applies to ANY multiplication events – BOTH independent and non-independent. Why does it also work for independent events? • Recall that if two events are independent, this means that P(B) is NOT affected by P(A). • That is, P(B | A) = P(B). • Our general rule states: P(A and B) = P(A) * P(B | A) • If our events are independent, then P(B | A ) = P(B) • So: P(A and B) = P(A) * P(B)
P(A|B) is not the same as P(B|A) • P(Heart | Ace) is not the same thing as P(Ace | Heart). • P(Heart | Ace) = 1/4 • P(Ace | Heart) = 1/13 • P(Rain | Seattle) is not the same thing as P(Seattle | Rain) • Key Point: Don’t interchange them! Keep track of which is which!
Calculating the Conditional probability Conditional probabilities reflect how the probability of an event can change if we know that some other event has occurred. • Example: The probability that a cloudy day will result in rain is different if you live in Las Vegas than if you live in Seattle. • Every single day, our brains calculate conditional probabilities, updating our “degree of belief” with each new piece of evidence. Notation: The conditional probability of event B “given” event A is:Note: We assume that P(A) ≠ 0 Spoken as: “Probability of B given A”
Example • Suppose that exactly 30% of women with early breast cancer will experience metastases, i.e. the spread of cancer from its initial location. A new genetic test was developed to help identify those women with early breast cancer who will later develop metastases. A study of women with early breast cancer who took this new genetic test finds that the test was successful in identifying 27% (of the 30%) who had a positive test and later developed metastases. How effective is this new test’s ability to identify women who will develop metastases? • Answer: Restated: “What is the probability that the test will successfully identify women that develop metastases?” In other words: P(Test is Positive | Metastases)? P(Test + | Mets ) = P(Test + AND Metastases) / P(Metastases) = 0.27 / 0.3 = 0.9
Example • Slim is playing poker and holds 3 diamonds. He hopes to draw two diamonds in a row in order to get a flush (all cards of the same suit). Of all the cards showing (those in Slim’s hand and those upturned on the table), he sees 11 cards. 4 of those 11 cards are diamonds. So 9 of the 41 remaining unseen cards must be diamonds. What is the probability that Slim will draw his two diamonds? • P(first card is a diamond) = 9/41 • P(second card diamond | given first card diamond) = 8/40 • 9/41 * 8/40 = 0.044
Conditional probability can be applied to more than two events • What is the probability that a person chosen at random off the street is: Italian, Male and plays the lute? • I = probability of being Italian • M = male • L = plays lute • P(I and M and L) = P(I) * P(M | I) * P(L | I and M) • Key Point: It can get a bit unwieldy, but if you have the data, it is possible to do these calculations. • Don’t panic though: In this course, I will never ask you to do more than one conditional probability.