p
play

P( ) 1 conditional probability where P(F) > 0 Conditional - PowerPoint PPT Presentation

Conditional Probability P( ) 1 conditional probability where P(F) > 0 Conditional probability of E given F: probability that E occurs given that F has occurred. Ehf F FE Conditioning on F Written as P(E|F) Ser Means P(E,


  1. Conditional Probability P( ) 1

  2. conditional probability where P(F) > 0 Conditional probability of E given F: probability that E occurs given that F has occurred. Ehf F FE “ Conditioning on F ” Written as P(E|F) Ser Means “ P(E, given F observed) ” Sample space S reduced to those elements consistent with F (i.e. S ∩ F ) Event space E reduced to those elements consistent with F (i.e. E ∩ F ) With equally likely outcomes, 2

  3. Examples 2 random cards are selected from a deck of cards: E Irk • What is the probability that both cards are aces given that one of the cards is the ace of spades? • What is the probability that both cards are aces given that at least one of the cards is an ace? both Aces doneisAE Pr Prf bothAces cregeads Afd AQ P both Aces Gone Aspacdest tEFb lbohAasRatceastaeisAa Pr atleast one.is f both Aces lateestoneisal 42 Y aE 3

  4. I Gambler’s fallacy 51 Flip a fair coin 51 times Irl 2 A = “first 50 flips are heads” B = “the 51 st flip is heads” Pr (B | A) = ? 51 lEH H31 11,31 t HHg If K 4

  5. conditional probability: the chain rule General defn: where P(F) > 0 Implies: P(E and F) = P(E|F) P(F) ( “ the chain rule ” ) General definition of Chain Rule: Pr PrfezfENEDPRLE.AE MEGREZ 5 PrfEalE PRIED FE PrLEzlE hFz

  6. Chain rule example Alice and Bob play a game as follows: A die is thrown, and each time it is thrown, regardless of the history, it is equally likely to show any of the six numbers. If it shows 5, Alice wins. 3,4 nobody wins If it shows 1, 2 or 6, Bob wins. Otherwise, they play a second round and so on. An What is P(Alice wins on n th round)? on 9thround Ai Alice wins nobody wins on in round Ni AI Pr N PrfAn PrWa w prfwzlnpwjn prfwn.IN n nah Prfw a Nut PrfAnf N I If 6

  7. law of total probability E and F are events in the sample space S E = EF ∪ EF c S E F EF ∩ EF c = ∅ ⇒ P(E) = P(EF) + P(EF c ) 7

  8. law of total probability P(E) = P(E and F) + P(E and F c ) weighted average, = P(E|F) P(F) + P(E|F c ) P(F c ) conditioned on event F happening or not. = P(E|F) P(F) + P(E|F c ) (1-P(F)) iH More generally, if F 1 , F 2 , ..., F n partition S (mutually exclusive, ∪ i F i = S, P(F i )>0), then weighted average, P(E) = ∑ i P(E and F i ) = ∑ i P(E|F i ) P(F i ) conditioned on events F i happening or not. (Analogous to reasoning by cases; both are very handy.) 8

  9. total probability Sally has 1 elective left to take: either Phys or Chem. She will get A with probability 3/4 in Phys, with prob 3/5 in Chem. She flips a coin to decide which to take. What is the probability that she gets an A? P(A) = P(A|Phys)P(Phys) + P(A|Chem)P(Chem) = (3/4)(1/2)+(3/5)(1/2) = 27/40 Note that conditional probability was a means to an end in this example, not the goal itself. One reason conditional probability is important is that this is a common scenario. 9

  10. The Monty Hall Problem Suppose you’re on a game show, and you’re given the choice of three doors. Behind one door is a car, behind the other, goats. You pick a door, say number 1, and the host, who knows what’s behind the doors, opens another door, say number 3, which has a goat. He says to you, “Do you want to switch to door number 2?” Is it to your advantage to switch your choice of doors? ftp.umr Assumptions: The car is equally likely to be behind each of the doors. The player is equally likely to pick each of the three doors, regardless of the car’s location After the player picks a door, the host must open a different door with a goat behind it and offer the player the choice of staying with the original door or switching If the host has a choice of which door to open, then he is equally likely to select each of them. Y Ich

  11. 43 Switch dqbe grl Mwm Alwin bhar t Prewitt yprc a is DPrcs wY 11

  12. Independence [ | ]

  13. Independence of events Intuition: E is independent of F if the chance of E occurring is not affected by whether F occurs. Formally: or Pr ( E ∩ F ) = Pr ( E ) Pr ( F ) Pr ( E | F ) = Pr ( E ) Preen FyprCF These two definitions are equivalent. 13

  14. Independence 111 52 Draw a card from a shuffled deck of 52 cards. E: card is a spade k BTz PRE F: card is an Ace Pree 73 E Are E and F independent? PrCE Prof gl z PMA Prf Ehf 14

  15. Independence Toss a coin 3 times. Each of 8 outcomes equally likely. Define ta Prc A A = {at most one T} = {HHH, HHT, HTH, THH} Ig B = {at most 2 Heads}= {HHH} c Pr B Are A and B independent? Z f Pri A Prc B Prf Hht tht Prf AAB HHT 15

  16. Independence as an assumption It is often convenient to assume independence. People often assume it without noticing. Example: A sky diver has two chutes. Let E = {main chute doesn’t open} Pr (E) = 0.02 F = {backup doesn’t open} Pr (F) = 0.1 What is the chance that at least one opens assuming independence? I Prfnoneopen Pr at least one opus Ehf I 0.02 O 16 998

  17. Independence as an assumption It is often convenient to assume independence. People often assume it without noticing. Example: A sky diver has two chutes. Let E = {main chute doesn’t open} Pr (E) = 0.02 F = {backup doesn’t open} Pr (F) = 0.1 What is the chance that at least one opens assuming independence? Note: Assuming independence doesn’t justify the assumption! Both chutes could fail because of the same rare event, e.g. freezing rain. 17

  18. Using independence to define a probabilistic model We can define our probability model via independence. Example: suppose a biased coin comes up heads with probability 2/3, independent of other flips. Sample space: sequences of 3 coin tosses. It 1 33 I Pr Hi Prats Prats Pr (3 heads)=? Pr H HH Pr (3 tails) = ? P Pr (2 heads) = ? 3 Fs Prf HAT 18 HA THA at

  19. EEE Bayes Theorem P( ) 19

  20. Is your coin loaded? Your coin is fair (Pr(H) = 0.5) with probability ½ or “unfair” (Pr(H) = 0.6) otherwise. You flip the coin and it comes up Heads. What is the probability that it is fair given that it came up Heads? L Pr unfair L Pr fair Affair PrlHunfairka6prTtg_PrHErhCfa.rgfPrcH Pretty unfair Prcunfair PrfHffaurJPrCfa.r 20

  21. Bayes Theorem Prhp E J prca E Most common form: Rev. Thomas Bayes c. 1701-1761 Expanded form (using law of total probability): Prt Tring Why it ’ s important: Reverse conditioning P( model | data ) ~ P( data | model ) Combine new evidence (E) with prior belief (P(F)) Posterior vs prior 21

  22. HIV testing Suppose an HIV test is 98% effective in detecting HIV, i.e., its “ false negative ” rate = 2%. Suppose furthermore, the test ’ s “ false positive ” rate = 1 %. PNF 0.005 0.5% of population has HIV Let E = you test positive for HIV be posing Let F = you actually have HIV HIV+ HIV- What is P(F|E) ? Test + 0.98 = P(E|F) 0.01 = P(E|F c ) 00 0.02 = P(E c |F) 0.99 = P(E c |F c ) Test - false negative PM Hut lest'J prfltwtn.es y PMtesttlttwtjprq.eu p y PrfTt Hrvt PrCHwt tPrCTtfHN PrfHN 09800.005098 22 0.005 t O 995 0.01

  23. HIV testing Suppose an HIV test is 98% effective in detecting HIV, i.e., its “ false negative ” rate = 2%. Suppose furthermore, the test ’ s “ false positive ” rate = 1 %. 0 0.5% of population has HIV Let E = you test positive for HIV Let F = you actually have HIV What is P(F|E) ? Solution: 23

  24. Why do you have a fever? Pr (flu | high fever)? w euen fIu PrCfw prffwfhighfveyz.PH T KChigh fan Prffever Ebola PrfEbda Prffeouffla Pr flu Prawn loin Pr other 24

  25. 25

  26. are innocent Everyone says they A lie detector is known to be 80% reliable when the person is guilty and 95% reliable when the person is innocent. If a suspect is chosen from a group of suspects of which only 2% have ever committed a crime, and the test indicates that the person is guilty, what is the probability that he is innocent? 26

  27. A lie detector is known to be 80% reliable when the person is guilty and 95% reliable when the person is innocent. If a suspect is chosen from a group of suspects of which only 2% have ever committed a crime, and the test indicates that the person is guilty, what is the probability that he is innocent? I : event that he is innocent G : event that the test indicates guilty Pr ( I | G ) = Pr ( G | I ) Pr ( I ) Pr ( G | I ) Pr ( I ) = Pr ( G ) Pr ( G | I ) Pr ( I ) + Pr ( G | I c ) Pr ( I c ) 0 . 05 · 0 . 98 = 0 . 05 · 0 . 98 + 0 . 8 · 0 . 02 27

  28. Problem There is a population of N people. The number of good guys among these people is i with probability p i Ei p Take a sample of n people from the population. Each subset of n is equally likely. What is the probability that there are j good guys in the population conditioned on the fact that there are k good guys in the sample. o 1,2 N Good is good guys inpep F E pi Po l 28

  29. good people out of ways to sample N n people guys L good I ig Mawle ways g choosing k subset gsiun ME.gl E g TNn Nsiugpop ing E Pray.rs eEnsem EtIYPrfkgoodgysmsample g.NfoPr k good in sample N j good in pep PrcjgqfL qP pi E fight Pi K q

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend