Question? Leave a message!

Conditional Probability

Conditional Probability 17
ZoeTabbot Profile Pic
Published Date:13-07-2017
Website URL
Stat S110 Unit 2: Conditional Probability Chapter 2 in the text 1 Unit 2 Outline • Conditional Probability Definition • Bayes’ Rule • Independence • The Gambler’s Ruin • Conditionally Paradoxical 2 Why is conditional probability important? • Conditional probability always us to update a probability statement given other information that is related. • Suppose you have plans to attend the Red Sox game (or a picnic, an outdoor concert, etc…) tonight, and you are trying to determine whether it will rain later in the day. • Before any information is gathered, you may put a probability on the event that is will rain: P(R). • However, you may look at the window and see that it is very cloudy. You certainly would want to update the probability of rain given this information: P(R C). • You may gather more information throughout the day, so your conditional probability may change: P(R A ∩ B ∩ C). • By conditioning on known information, we can improve our probability predictions 3 Definition: Conditional Probability • conditional probability: the probability of one event occurring under the condition that we know the outcome of another event • Let A and B be two events in a sample space, with P(B) 0. The conditional probability of event A, given that B has occurred, written P(AB), is: P(A and B) P(A B) P(B) • P(AB) is read as “probability of A, given B” has happened, or probability of A if B is true. • P(A) ignoring B is often called the prior probability, and P(AB) is often called the posterior probability incorporating knowledge/information of event B. • We’ve essentially been using conditional probability already (sampling without replacement). 4 Conditional probability in Pebble World • We are trying to determine P(AB). • On the left is the entire sample space. But we do not need C to incorporate anything in B to determine P(AB). • So in the end, we just restrict ourselves to only considering the outcomes in B and asking: how much of B does A take up? 5 Key Concept • Conditional probability is probability • So all of the rules/axioms, results, and properties hold. • For example: P(S E)1, P( E) 0 C P(A E)1 P(A E) P(A B E) P(A E) P(B E) P(A B E) P(A and B E) P(A B E) P(B E) • And many more… 6 Simplest Example • There is a bag with 3 balls in it: 1 is red, and 2 are black • You draw two balls out of the bag, one at a time (without replacement). What is the probability the second ball is black given the first ball is black? • Define the events: A: the first ball drawn is black B: the second ball drawn is black First Ball Second Ball P(A B) P(Both Balls are Black) 2 / 6 1 P(B A) P(A) P(First Ball is Black) 4 / 6 2 st • What is the probability the 1 ball was black given the nd 2 is black? Very tricky… • The Monty Hall Problem  There are prizes behind 3 doors: two are ‘worthless’ (an ant farm) and one is expensive (like a new car)  You are asked to choose one of the 3 doors  Then, Monty Hall (from Let’s Make a Deal) opens one of the other 2 doors and shows you a worthless prize • Should you switch doors? • NYTimes take: 8 A general multiplication rule (from conditional probability) • Suppose A and B are two events in a sample space (not necessarily independent). Then • P(A ∩ B) = P(B A)P(A) = P(A)P(B A) • P(A ∩ B ∩ C) = P(A) P(B A)P(C A ∩ B) • In fact, for general A ,…,A : 1 n P(A ∩…∩A )=P(A ) P(A A )P(A A ∩A )…P(A A ∩…∩A ) 1 n 1 2 1 3 1 2 n n-1 1 • The first relationship is a simple algebraic rearrangement of the definition of conditional probability: P(B and A) P(B A) P(A) 9 A Personable Example It is known that approximately 20% of men and 3% of women are taller than 6 feet in the US. Let F = the event that someone is female and T = taller than 6 feet. C a) What is P(T F)? What is P(T F )? b) What is the probability that the next person walking through the door is a woman and 6 feet tall? c) What is the probability that the next person walking through the door is 6 feet tall? 10 Example (cont.) c) What is the probability that the next person walking through the door is 6 feet tall? c Two ways for this to happen: (T and F) or (T and F ) Think Venn Diagrams C P(T ) P(T  F) P(T  F ) C C  P(T F)P(F) P(T F )P(F )  0.030.50 0.200.50 0.115 11 2-way tables can help organize your thinking… P(F ∩ T) Tall (6' or more) Yes No P(F)P(T F) P(F)P(not T F) = (0.5)(0.03) Yes = (0.5)(0.97) = 0.015 = 0.485 Female P(not F)P(not T not F) P(not F)P(T not F) = (0.5)(0.80) No = (0.5)(0.20) = 0.400 = 0.100 Law of Total Probability • Let A ,…, A be a partition of the sample space S (that is, 1 n the A are disjoint and their union makes up the entire S) i with P(A ) 0 for all A . Then: i i n n P(B) P(B  A ) P(B A )P(A )  i i i i1 i1 • Illustration of law of total probability: 13 Unit 2 Outline • Conditional Probability • Bayes’ Rule • Independence • The Gambler’s Ruin • Conditionally Paradoxical 14 Bayes’ Rule • Bayes’ rule (formula) provides a way to go from P(B A) to P(A B) (they are in general not equal…)‏ • If A and B are two events whose probabilities are not 0 or 1, then: P(B A)P(A) P(A B) P(B) • It is often written using the law of total probability: P(B A)P(A) P(A B) C C P(B A)P(A) P(B A )P(A ) • Or: P(B A )P(A ) 1 1 P(A B) 1 n P(B A )P(A )  i i i1 15 d) What is the probability that a person known to be 6 feet tall is a woman? Bayes Rule Directly: P(T F)P(F) P(F T ) C C P(T F)P(F) P(T F )P(F ) 0.03(0.5)  0.130 0.03(0.5) 0.2(0.5) Pretty Simple from the 2x2 table… P(F and T ) 0.015 P(F T ) 0.130 P(T ) 0.015 0.100Bayes’ Rule Example: Random Coin • You have one fair coin, and one biased coin which lands Heads with probability 3/4. You pick one of the coins at random and flip it three times. It lands Heads all three times. Given this information, what is the probability that the coin you picked is the fair one? P(A F)P(F) P(F A) C C P(A F)P(F) P(A F )P(F ) 3 (1/ 2) (1/ 2)  0.23 3 3 (1/ 2) (1/ 2) (3/ 4) (1/ 2) • So what? 17 Random Coin Continued • Suppose that we have now seen our chosen coin land Heads three times. If we toss the coin a fourth time, what is the probability that it will land Heads once more? C C P(H A) P(H F, A)P(F A) P(H F , A)P(F A)  (1/ 2)0.23 (3/ 4)(0.77) 0.69 18 Unit 2 Outline • Conditional Probability Definition • Bayes’ Rule • Independence • The Gambler’s Ruin • Conditionally Paradoxical 19 Independent events • Two events A and B are independent if and only if knowing that one event occurs does not change the probability that the other event occurs. What does that mean for the conditional probabilities? P(A B) P(A) • The following are equivalent definitions of independence: P(A B) P(A)P(B) C P(A B) P(A B ) P(B A) P(B) Note: it takes care to draw independence in a Venn Diagram… 20