cs70 jean walrand lecture 24
play

CS70: Jean Walrand: Lecture 24. Changing your mind? CS70: Jean - PowerPoint PPT Presentation

CS70: Jean Walrand: Lecture 24. Changing your mind? CS70: Jean Walrand: Lecture 24. Changing your mind? 1. Bayes Rule. 2. Examples. Recall definition: Conditional Probability. Consider = { 1 , 2 ,..., N } with Pr [ n ] = p n . Recall


  1. Monty Hall Game. Monty Hall is the host of a game show. His assistant is Carol. ◮ Three doors; one prize

  2. Monty Hall Game. Monty Hall is the host of a game show. His assistant is Carol. ◮ Three doors; one prize two goats. ◮ Choose one door, say door 1.

  3. Monty Hall Game. Monty Hall is the host of a game show. His assistant is Carol. ◮ Three doors; one prize two goats. ◮ Choose one door, say door 1. ◮ Carol opens another door with a goat, say door 3.

  4. Monty Hall Game. Monty Hall is the host of a game show. His assistant is Carol. ◮ Three doors; one prize two goats. ◮ Choose one door, say door 1. ◮ Carol opens another door with a goat, say door 3. ◮ Monty offers you a chance to switch doors, i.e., choose door 2.

  5. Monty Hall Game. Monty Hall is the host of a game show. His assistant is Carol. ◮ Three doors; one prize two goats. ◮ Choose one door, say door 1. ◮ Carol opens another door with a goat, say door 3. ◮ Monty offers you a chance to switch doors, i.e., choose door 2. ◮ What do you do?

  6. Monty Hall Game

  7. Monty Hall Game Recall: You picked door 1 and Carol opened door 3. Should you switch to door 2?

  8. Monty Hall Game Recall: You picked door 1 and Carol opened door 3. Should you switch to door 2? First intuition: Doors 1 and 2 are equally likely to hide the prize: no need to switch.

  9. Monty Hall Game Recall: You picked door 1 and Carol opened door 3. Should you switch to door 2? First intuition: Doors 1 and 2 are equally likely to hide the prize: no need to switch. Opening door 3 did not tell us anything about doors 1 and 2.

  10. Monty Hall Game Recall: You picked door 1 and Carol opened door 3. Should you switch to door 2? First intuition: Doors 1 and 2 are equally likely to hide the prize: no need to switch. Opening door 3 did not tell us anything about doors 1 and 2. Wrong!

  11. Monty Hall Game Recall: You picked door 1 and Carol opened door 3. Should you switch to door 2? First intuition: Doors 1 and 2 are equally likely to hide the prize: no need to switch. Opening door 3 did not tell us anything about doors 1 and 2. Wrong! Better observation: If you switch, you get the prize, except it it is behind door 1.

  12. Monty Hall Game Recall: You picked door 1 and Carol opened door 3. Should you switch to door 2? First intuition: Doors 1 and 2 are equally likely to hide the prize: no need to switch. Opening door 3 did not tell us anything about doors 1 and 2. Wrong! Better observation: If you switch, you get the prize, except it it is behind door 1. Thus, by switching, you get the prize with probability 2 / 3.

  13. Monty Hall Game Recall: You picked door 1 and Carol opened door 3. Should you switch to door 2? First intuition: Doors 1 and 2 are equally likely to hide the prize: no need to switch. Opening door 3 did not tell us anything about doors 1 and 2. Wrong! Better observation: If you switch, you get the prize, except it it is behind door 1. Thus, by switching, you get the prize with probability 2 / 3. If you do not switch, you get it with probability 1 / 3.

  14. Monty Hall Game Analysis Ω = { 1 , 2 , 3 } 2 ; ω = ( a , b ) = ( prize , your initial choice ); uniform.

  15. Monty Hall Game Analysis Ω = { 1 , 2 , 3 } 2 ; ω = ( a , b ) = ( prize , your initial choice ); uniform. If you do not switch, you win if a = b .

  16. Monty Hall Game Analysis Ω = { 1 , 2 , 3 } 2 ; ω = ( a , b ) = ( prize , your initial choice ); uniform. If you do not switch, you win if a = b . If you switch, you win if a � = b .

  17. Monty Hall Game Analysis Ω = { 1 , 2 , 3 } 2 ; ω = ( a , b ) = ( prize , your initial choice ); uniform. If you do not switch, you win if a = b . If you switch, you win if a � = b . E.g., ( a , b ) = ( 1 , 2 ) → shows 3

  18. Monty Hall Game Analysis Ω = { 1 , 2 , 3 } 2 ; ω = ( a , b ) = ( prize , your initial choice ); uniform. If you do not switch, you win if a = b . If you switch, you win if a � = b . E.g., ( a , b ) = ( 1 , 2 ) → shows 3 → switch to 1 .

  19. Monty Hall Game Analysis Ω = { 1 , 2 , 3 } 2 ; ω = ( a , b ) = ( prize , your initial choice ); uniform. If you do not switch, you win if a = b . If you switch, you win if a � = b . E.g., ( a , b ) = ( 1 , 2 ) → shows 3 → switch to 1 . Pr [ { ( a , b ) | a = b } ] =

  20. Monty Hall Game Analysis Ω = { 1 , 2 , 3 } 2 ; ω = ( a , b ) = ( prize , your initial choice ); uniform. If you do not switch, you win if a = b . If you switch, you win if a � = b . E.g., ( a , b ) = ( 1 , 2 ) → shows 3 → switch to 1 . Pr [ { ( a , b ) | a = b } ] = 3 9 = 1 3

  21. Monty Hall Game Analysis Ω = { 1 , 2 , 3 } 2 ; ω = ( a , b ) = ( prize , your initial choice ); uniform. If you do not switch, you win if a = b . If you switch, you win if a � = b . E.g., ( a , b ) = ( 1 , 2 ) → shows 3 → switch to 1 . Pr [ { ( a , b ) | a = b } ] = 3 9 = 1 3 Pr [ { ( a , b ) | a � = b } ] =

  22. Monty Hall Game Analysis Ω = { 1 , 2 , 3 } 2 ; ω = ( a , b ) = ( prize , your initial choice ); uniform. If you do not switch, you win if a = b . If you switch, you win if a � = b . E.g., ( a , b ) = ( 1 , 2 ) → shows 3 → switch to 1 . Pr [ { ( a , b ) | a = b } ] = 3 9 = 1 3 Pr [ { ( a , b ) | a � = b } ] = 1 − Pr [ { ( a , b ) | a = b } ] = 2 3 .

  23. Independence Definition: Two events A and B are independent if

  24. Independence Definition: Two events A and B are independent if Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] .

  25. Independence Definition: Two events A and B are independent if Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] . Examples:

  26. Independence Definition: Two events A and B are independent if Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] . Examples: ◮ When rolling two dice, A = sum is 7 and B = red die is 1 are

  27. Independence Definition: Two events A and B are independent if Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] . Examples: ◮ When rolling two dice, A = sum is 7 and B = red die is 1 are independent;

  28. Independence Definition: Two events A and B are independent if Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] . Examples: ◮ When rolling two dice, A = sum is 7 and B = red die is 1 are independent; ◮ When rolling two dice, A = sum is 3 and B = red die is 1 are

  29. Independence Definition: Two events A and B are independent if Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] . Examples: ◮ When rolling two dice, A = sum is 7 and B = red die is 1 are independent; ◮ When rolling two dice, A = sum is 3 and B = red die is 1 are not independent;

  30. Independence Definition: Two events A and B are independent if Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] . Examples: ◮ When rolling two dice, A = sum is 7 and B = red die is 1 are independent; ◮ When rolling two dice, A = sum is 3 and B = red die is 1 are not independent; ◮ When flipping coins, A = coin 1 yields heads and B = coin 2 yields tails are

  31. Independence Definition: Two events A and B are independent if Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] . Examples: ◮ When rolling two dice, A = sum is 7 and B = red die is 1 are independent; ◮ When rolling two dice, A = sum is 3 and B = red die is 1 are not independent; ◮ When flipping coins, A = coin 1 yields heads and B = coin 2 yields tails are independent;

  32. Independence Definition: Two events A and B are independent if Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] . Examples: ◮ When rolling two dice, A = sum is 7 and B = red die is 1 are independent; ◮ When rolling two dice, A = sum is 3 and B = red die is 1 are not independent; ◮ When flipping coins, A = coin 1 yields heads and B = coin 2 yields tails are independent; ◮ When throwing 3 balls into 3 bins, A = bin 1 is empty and B = bin 2 is empty are

  33. Independence Definition: Two events A and B are independent if Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] . Examples: ◮ When rolling two dice, A = sum is 7 and B = red die is 1 are independent; ◮ When rolling two dice, A = sum is 3 and B = red die is 1 are not independent; ◮ When flipping coins, A = coin 1 yields heads and B = coin 2 yields tails are independent; ◮ When throwing 3 balls into 3 bins, A = bin 1 is empty and B = bin 2 is empty are not independent;

  34. Independence and conditional probability Fact: Two events A and B are independent if and only if

  35. Independence and conditional probability Fact: Two events A and B are independent if and only if Pr [ A | B ] = Pr [ A ] .

  36. Independence and conditional probability Fact: Two events A and B are independent if and only if Pr [ A | B ] = Pr [ A ] . Indeed:

  37. Independence and conditional probability Fact: Two events A and B are independent if and only if Pr [ A | B ] = Pr [ A ] . Indeed: Pr [ A | B ] = Pr [ A ∩ B ] Pr [ B ] , so that

  38. Independence and conditional probability Fact: Two events A and B are independent if and only if Pr [ A | B ] = Pr [ A ] . Indeed: Pr [ A | B ] = Pr [ A ∩ B ] Pr [ B ] , so that Pr [ A | B ] = Pr [ A ] ⇔ Pr [ A ∩ B ] = Pr [ A ] Pr [ B ]

  39. Independence and conditional probability Fact: Two events A and B are independent if and only if Pr [ A | B ] = Pr [ A ] . Indeed: Pr [ A | B ] = Pr [ A ∩ B ] Pr [ B ] , so that Pr [ A | B ] = Pr [ A ] ⇔ Pr [ A ∩ B ] = Pr [ A ] ⇔ Pr [ A ∩ B ] = Pr [ A ] Pr [ B ] . Pr [ B ]

  40. Total probability Here is a simple useful fact:

  41. Total probability Here is a simple useful fact: Pr [ B ] = Pr [ A ∩ B ]+ Pr [¯ A ∩ B ] .

  42. Total probability Here is a simple useful fact: Pr [ B ] = Pr [ A ∩ B ]+ Pr [¯ A ∩ B ] .

  43. Total probability Here is a simple useful fact: Pr [ B ] = Pr [ A ∩ B ]+ Pr [¯ A ∩ B ] . Indeed, B is the union of two disjoint sets A ∩ B and ¯ A ∩ B .

  44. Total probability Here is a simple useful fact: Pr [ B ] = Pr [ A ∩ B ]+ Pr [¯ A ∩ B ] . Indeed, B is the union of two disjoint sets A ∩ B and ¯ A ∩ B . Thus, Pr [ B ] = Pr [ A ] Pr [ B | A ]+ Pr [¯ A ] Pr [ B | ¯ A ] .

  45. Total probability Assume that Ω is the union of the disjoint sets A 1 ,..., A N .

  46. Total probability Assume that Ω is the union of the disjoint sets A 1 ,..., A N . Then, Pr [ B ] = Pr [ A 1 ∩ B ]+ ··· + Pr [ A N ∩ B ] .

  47. Total probability Assume that Ω is the union of the disjoint sets A 1 ,..., A N . Then, Pr [ B ] = Pr [ A 1 ∩ B ]+ ··· + Pr [ A N ∩ B ] . Indeed, B is the union of the disjoint sets A n ∩ B for n = 1 ,..., N .

Recommend


More recommend