Conditional Probability and Bayes Chapter 2 Lecture 5 Yiren Ding Shanghai Qibao Dwight High School March 9, 2016 Yiren Ding Conditional Probability and Bayes 1 / 13
Outline 1 Independent Events Definition 2 Back to Kindergarten Yiren Ding Conditional Probability and Bayes 2 / 13
Independent Events Definition Independent Events Definition 1. Two events A and B are independent if P(AB) = P(A)P(B) Recall from previous lecture P(A B) = P(AB) P(B). Suppose P(A B) = P(A). This means that the occurrence of event A is not contingent on whether B occurs. Warning: Independent events and disjoint events are completely different things! If A and B are disjoint, then P(A B) = P(A) + P(B) by Rule 1. If A and B are independent, then P(AB) = P(A)P(B). Yiren Ding Conditional Probability and Bayes 3 / 13
Independent Events 1. Suppose two fair dice are thrown. Let A be the event that the number shown by the first die is even and B the event that the sum of the dice is odd. Do you think the events A and B are independent? The experiment has 36 possible outcomes (i, j), representing the numbers shown by each die. All possible outcomes are equally like. By counting, P(A) = 18/36, P(B) = 18/36, and P(AB) = 9/36. Since P(AB) = P(A)P(B), events A and B are independent. Remark: In the case that events A, B and C are pairwise independent, it is not necessarily true that P(ABC) = P(A)P(B)P(C). To see that, let C be the event that the number shown by the second die is even. Events A, B and C are pairwise independent (check), but P(ABC)(= 0) is not equal to P(A)P(B)P(C). In general, events A 1,..., A n are said to be independent if P(A i1...a ik ) = P(A i1 ) P(A ik ), for every A i1,.., A ik, 2 k n Yiren Ding Conditional Probability and Bayes 4 / 13
Back to Kindergarten Back to Kindergarten Again Recall in kindergarten, your teacher gave you a fair die to determine how many times you can flip a fair coin. If no heads appears, you will get a cookie. Since the probability of no heads appears in k flips is (1/2) k, kindergarten instincts tell you that P(cookie) is 1 2 1 6 + 1 4 1 6 + 1 8 1 6 + 1 16 1 6 + 1 32 1 6 + 1 64 1 6 = 0.1641. Indeed this is correct and can be formalized into the following theorem, known as the. Yiren Ding Conditional Probability and Bayes 5 / 13
Theorem 1 (). Let A be an event that can only occur if one of mutually exclusive events B 1,..., B n occurs. Then, P(A) = P(A B 1 )P(B 1 ) + P(A B 2 )P(B 2 ) + + P(A B n )P(B n ). Proof. The proof is really simple. The subset A is contained in the union of mutually exclusive sets B 1,..., B n. This implies A = AB 1 AB 2 AB n, The sets AB i are mutually exclusive, so by Rule 1, and Kindergarten Rule, P(A) = P(AB 1 ) + P(AB 2 ) + + P(AB n ) = P(A B 1 )P(B 1 ) + + P(A B n )P(B n ). Yiren Ding Conditional Probability and Bayes 6 / 13
2. The upcoming Tour de France bicycle tournament will take place from July 1 through July 23. One hundred eighty cyclists will participate in the event. What is the probability that two or more participating cyclists will have birthdays on the same day during the tournament? Yiren Ding Conditional Probability and Bayes 7 / 13
2 solution Denote by A the event that two or more participating cyclists will have birthdays on the same day during the tournament. Event A can occur if one of the mutually exclusive events B 2,..., B 180 occurs, where B i denotes the event that exactly i participating cyclists have their birthdays during the tournament. The conditional probability P(A B i ) is exactly like a birthday problem with i persons and only 23 days in a year: { 1 23 22 (23 i+1), 2 i 23 P(A B i ) = 23 i 1, i 24. The probability is 1 when i 24 by the Pigeonhole Principle! Yiren Ding Conditional Probability and Bayes 8 / 13
2 solution (2) Obviously, P(A B 0 ) = P(A B 1 ) = 0, so, ( 180 P(B i ) = i ) ( 23 365 Putting these together, we have 180 P(A) = P(A B i )P(B i ) i=2 23 = 1 P(B 0 ) P(B 1 ) 0.8841 ) i ( 1 23 ) 180 i, 0 i 180. 365 i=2 23 22 (23 i + 1) 23 i P(B i ) Yiren Ding Conditional Probability and Bayes 9 / 13
3. Two candidates A and B remain in the final of a television game show. At this point, each candidate must spin a wheel of fortune. The numbers 1, 2,..., 100 are listed ont he wheel and when the wheel has stopped spinning, a pointer randomly stops on one of the numbers. Each player has a choice of spinning the wheel one or two times, whereby a second spin must immediately follow the first. The goal is to reach a total closest to but not exceeding 100 points. A player whose total exceeds 100 gets a final score of zero. The winner is the player who gets the highest score. Should both players have the same final score, then the player to spin the wheel first is the winner. Player A has to spin first. What is the optimal strategy for player A? Yiren Ding Conditional Probability and Bayes 10 / 13
3 solution The optimal strategy for player B is obvious. (Why?) To find the optimal strategy for player A, we define S a : The event of player A winning if A stops after the first spin giving a score of a points C a : event of player A winning if A continues after the first spin giving a score of a points Notice that S a can only occur if one of the mutually exclusive events B 1, B 2,..., B a occurs, where B b is the event in which player B scores b points in the first spin. (Why not consider b > a?) Suppose that player B scores b (b a) points on the first spin. Player A is the final winner if player B scores in the second spin either at most a b points or more than 100 b points. Yiren Ding Conditional Probability and Bayes 11 / 13
3 solution (2) Since P(B b ) = 1 100, by the law of conditional probability, we find P(S a ) = a P(S a B b )P(B b ) b=1 = 1 100 a b=1 ( a b 100 + b ) = a2 100 100 2 for 1 a 100. Likewise, we condition the event C a on mutually exclusive events A 1, A 2,..., A 100 a, where A k represents the event in which player A scores k points in the second spin. (Why not consider k > 100 a?) Suppose player A scores a points in the first round, and k points in the second round. Then obviously P(C a A k ) = P(S a+k ). Yiren Ding Conditional Probability and Bayes 12 / 13
3 solution (3) Since P(A k ) = 1 100, we have, P(C a ) = 100 a k=1 P(C a A k )P(A k ) = 1 100 a (a + k) 2 100 100 2 for 1 a 100. k=1 Using CAS, we find that P(C a ) > P(S a ) for 1 a 53 and P(S a ) > P(C a ) for 53 < 1 100. Hence player A should stop after the first spin if score is larger than 53, and continue if otherwise. Under this strategy, the probability of A winning is 1 100 53 a=1 P(C a ) + 1 100 100 a=54 P(S a ) = 0.4596. Yiren Ding Conditional Probability and Bayes 13 / 13