intro to discrete probability
play

Intro to Discrete Probability CS 70, Summer 2019 Lecture 15, - PowerPoint PPT Presentation

Intro to Discrete Probability CS 70, Summer 2019 Lecture 15, 7/18/19 1 / 24 Why Learn Probability? I Uncertainty 6 = nothing is known I Many decisions are made under uncertainty I Understanding probability gives a precise , unambiguous ,


  1. Intro to Discrete Probability CS 70, Summer 2019 Lecture 15, 7/18/19 1 / 24

  2. Why Learn Probability? I Uncertainty 6 = “nothing is known” I Many decisions are made under uncertainty I Understanding probability gives a precise , unambiguous , logical way to reason about uncertainty I Also learn about good yet simple models for many real world situations I Uncertainty can also be your friend! I We use artificial uncertainty to design good algorithms 2 / 24

  3. Flipping Coins I flip three coins. What is the set of outcomes? outcomes HHHt8 . Now, I flip n di ff erent coins. What is the set of outcomes? How many outcomes are there? HM Iengthn 2N ④ springs w/ Outcomes , . €t . 3 / 24

  4. Probability Spaces We formalize “experimental outcomes” or “samples” : A probability space is a sample space Ω , with a probability function P [ · ] such that: Pr I For each sample ω 2 Ω , we have 0  P ( ω )  1 I The sum of probabilities over all ω 2 Ω is 1. 4 / 24

  5. Example: Flipping Coins I flip three fair coins. What is the sample space? - What are the probabilities? . 8 outcomes µy . lpfittrifg ← ¥ Now, I flip n di ff erent fair coins. What is the sample space? What are the probabilities? is ' un 5 / 24

  6. Example: Flipping Coins I flip three biased coins, with heads probability p 6 = 1 2 . - What is the sample space? What are the probabilities? - ft - p ) PCTHT ) Pll - y - plz =p ( I iii¥ka ⇒ a ⇒ - p > 3 ( I = Why were we able to multiply? We’ll see next week... 6 / 24

  7. Events An event A is a subset of outcomes ω 2 Ω . me er * The probability of an event A is probabilities of sum → X P [ A ] = P [ ω ] of all outcomes ω ∈ A A in . 7 / 24

  8. Example: Flipping Coins Let A be the event where I flip at least 2 heads. I flip three fair coins. What is P [ A ] ? HHH A : gttsttgtttg IPCAJ THH - HTH =L HHT 2 I flip three biased coins, with heads probability p . What is P [ A ] ? P[HHHI=p3 HHH A : THH - p > p2 - Ci } ' PCTHHJ HTH p3t3G-p7p2 PLAT HHT - - 8 / 24

  9. Uniform Probability Spaces We use “uniform” to describe probability spaces where all outcomes have the same probability . For all ω 2 Ω , we have: of size P [ ω ] = 1 outcome ← | Ω | space . - Earth - Eea " - CAT Yet - As a result, for an event A : I , P [ A ] = | A | | Ω | This is helpful for larger probability spaces! 9 / 24

  10. ⇐ i' ⇐ 2--36=154 Rolling Dice ?s ⇒ unique . I roll 2 fair dice. What is the probability that both of my rolls are even? A # 2,4 , 6 24.6 -3×-3=9 /¥Y IAH 956=4 EE 8¥ PIAF . What is the probability that both rolls are greater than 2? IAI -4×-4 - - - 1656--4 PEAT - 10 / 24

  11. Rolling Dice A ¢ What is the probability that at least one roll is less than 3? # Y.YFZDiceg-f.gg - f = 1) tf IAI # whey - .se 2×6+6×2 2×2 - Ig - = PFA ) - 23dg - - -112-4=20 12 = . . What is the probability that the first roll is strictly greater than £6 the second? IAH IAI -16=154 second > same first > Ai 1) size IAI 15 second first > - -_ 2) WAYS 6 second PCA ]=}Iy=5Tz first 3) - . 11 / 24

  12. Drawing Marbles I I have an urn with 100 marbles. Exactly 50 of them are blue and 50 of them are red. If I draw 8 marbles from the urn without replacement , what is the probability I get 6 red and 2 blue? all at once Drawing info 1587158 ) =ioo÷ IAI - - RRR.EE?aYgInmenis:ofz,=C8 ) Ed Yue . =l58K IAH II ) ¥49 play 1189 I =i8tI%÷*s÷ 12 / 24

  13. ⇒ ⇒ Drawing Marbles I If I draw 8 marbles from the urn with replacement , what is the probability I get 6 red and 2 blue? sequentially Go i - 1008 l0¥0× Irl - 8mA Hers :e¥EBntrrbrthRR and order sequentially RRRRRRBB ( Sf ) -50×-50×-50×50=-50×-50--508 Fixt : TE IA 1=1861508 REAL 1¥ = 1815081008 , 13 / 24

  14. Exercise Drawing Marbles II . I have an urn with 100 marbles. 50 of them are blue, 50 of them are red, and 50 of them are yellow. If I draw 8 marbles from the urn without replacement , what is the probability I get 3 red, 3 blue, and 2 yellow? 14 / 24

  15. Drawing Marbles II If I draw 8 marbles from the urn with replacement , what is the probability I get 3 red, 3 blue, and 2 yellow? Why didn’t we use stars and bars? Discuss. 15 / 24

  16. Why No Stars and Bars? If we are running an experiment where we sample a set of objects, the outcomes counted by stars-and-bars is a non-uniform probability space. outcome One i¥ 16 / 24

  17. The Birthday Problem If there are n people in a room, what is the probability that at least two people share the same birthday? First (naive) attempt: same people : 2 }Y%m ! same me : " 17 / 24

  18. The Birthday Problem count ways one no complement Second attempt: : birthday same has . Ir 365N 3-65×-365×-365 - +3-56 ) = . = . . y complement n . 365-+4=3651 I AT 356×3-64×-363 = - h ) ! . 1365 - n 3651 Irl IA I - = ( 365 - n ) ! 736655¥36 ST PEA ] I - = 18 / 24

  19. The Birthday Problem: Some Stats For n = 10, the probability is � 0 . 11. For n = 23, the probability is � 0 . 5. For n = 70, the probability is � 0 . 999. 19 / 24

  20. The Monty Hall Problem You’re on a game show. There are 3 doors you can choose from. Two of the doors lead to GOATS! One of them has a PRIZE! You pick a door. The host then opens a di ff erent door that leads to a goat . He now gives you the option of switching to the other unopened door. Poll : Should you switch? 20 / 24

  21. ↳ Monty Hall: Sample Space Each game, there are three implicit choices ( C 1 , C 2 , C 3 ) : 1. Which door leads to the prize? 2. Which door do you pick? 3. Which door does the host reveal to you? Tree of Outcomes: Rattans \ . C , I 3 2 113%47 c. , 's ! ! ! ! 'm Isbt 21 / 24

  22. ↳ Monty Hall: Probabilities Two cases: (1) You initially choose the prize door (2) You initially choose a goat leaf of yellow a prob : (1) . 2 ? to sum ⇐ HIKE ) - its bits ) -16ft ) It } leaf =L prob of blue ✓ (2) t.sk?XH= 'T a- Cl I 3 2 113%47 c . , http Is ! ! 's 22 / 24

  23. Monty Hall: Events 43 Let W 1 = the contestant switches doors and wins . Let W 2 = the contestant stays and wins . 43 IN C l 3 l z Ad , 113.93 c . 's % ! ! t.az L 's ! L Cs 23 / 24

  24. Summary I Proceed methodically . I What are the possible outcomes? I What is the probability for each outcome? I Is the sample space uniform or non-uniform? I For uniform probability spaces, boils down to counting ! 24 / 24

Recommend


More recommend