probability and statistics
play

Probability and Statistics for Computer Science A major use of - PowerPoint PPT Presentation

Probability and Statistics for Computer Science A major use of probability in sta4s4cal inference is the upda4ng of probabili4es when certain events are observed Prof. M.H. DeGroot Credit: wikipedia Hongye Liu, Teaching


  1. Probability and Statistics ì for Computer Science “A major use of probability in sta4s4cal inference is the upda4ng of probabili4es when certain events are observed” – Prof. M.H. DeGroot Credit: wikipedia Hongye Liu, Teaching Assistant Prof, CS361, UIUC, 9.8.2020

  2. Opt Fixed review out team - is today 9/8 @ deadline 7 pm central

  3. Laws of Sets Commuta4ve Laws A ∩ B = B ∩ A A � B = B � A Associa4ve Laws (A ∩ B) ∩ C = A ∩ (B ∩ C) (A � B) � C = A � (B � C) Distribu4ve Laws A ∩ (B � C) = (A ∩ B) � (A ∩ C) A � (B ∩ C) = (A � B) ∩ (A � C)

  4. Laws of Sets Idempotent Laws Complement Laws A ∩ A = A A � A c = U A � A = A A ∩ A c = ø U c = ø Iden4ty Laws ø c = U A � ø = A De Morgan’s Laws A ∩ U = A A � U = U (A ∩ B) c = A c � B c A ∩ ø = ø (A � B) c = A c ∩ B c ⇐ pc AUDI Involu4on Law (A c ) c = A - plan By = pushpin U is the complete set

  5. Warm up F) Ways of students with queue co forming a randomly 'm . - - l co ! per EEE - - students 5 ✓ of forming queue → ways of a students from µ - permu randomly lo tree ¥÷I÷ con ' " II res , 5.tk#. ? ways of forty tsf randomly * 5 z ) WM ' ? ) f ' students from co →

  6. Which is larger? 4183 ) i ) l ! ! ) None B 4 A D c . . . = c. I . ) in ,

  7. Last time : a first look Probability Definitions Random Experiment . Event Outcome , Sample space , - three probability axioms probability Properties of probability afalculating

  8. Objectives Probability More probability calculation • Conditional probability * fazes rule ✓ * Independence

  9. Senate Committee problem The United States Senate contains two senators from each of the 50 states. If a commiZee of eight senators is selected at random, what is the probability that it will contain at least one of the of two senators from IL ? 8 too are ) of IL I - p ( none senators gg chosen treaties i - in , =

  10. ( I L z I L Senators - ins ) E) ( % ( Y t , T ris , a-

  11. Probability: Birthday problem � Among 30 people, what is the probability that at least 2 of them celebrate their birthday on - the same day? Assume that there is no February 29 and each day of the year is equally likely to be a birthday. share I - prob f none of people the B- day } order matters Tings : n House Irl ' Ii ' l -

  12. per n=t÷s . 365 ( 521=365 × 365 × 365 - - - - - - - s - s , H s , 30 365 } 365 fi . - - - y , 30 365 Irl = - 365 × 364 × 363 ( El F . - - - - - sbsp - - . 365 ! t Wu are different → - go 335 !

  13. How # of people change with does it - 706 P = o - 30 K - - De Groot et , al .

  14. between differences the what are - examples ? these two , Birthday Committee Senate . order ✓ doesn't matters matter ' I T

  15. Conditional Probability � Mo4va4on of condi4onal pities sina.tn?.irire1 probability 7 test is → Di . if ① too I Darth driven parts

  16. Conditional Probability � Example: An insurance company knows in a popula4on of 100 thousands females, 89.835% expect to live to age 60, while Ent 57.062% can expect to live to 80. Given a woman at the age of 60, what is the probability that she lives to 80?

  17. I

  18. ⇐ Conditional Probability � The probability of A given B P ( A | B ) = P ( A ∩ B ) I ¥""m%m^# ④ P ( B ) P ( B ) ̸ = 0 The “Size” analogy Credit: Prof. Jeremy Orloff & Jonathan Bloom

  19. Conditional Probability A : a woman P ( A | B ) = 57 , 062 89 , 835 = 0 . 6352 lives to 80 B : a woman is P ( A | B ) = P ( A ∩ B ) at 60 now P ( B ) - 57062/100000 = P ( A ) = 57 , 062 o . 6352 While 100 , 000 = 0 . 57062 =

  20. Conditional Probability: die example Y Throw 5-sided fair B : min ( X, Y ) = 2 t 5 die twice. 4 . 3 I * A : max ( X, Y ) = 4 2 x - st Is 1 5 1 2 3 4 - X ÷ "Ii÷¥÷ P ( A | B ) =?

  21. ⇒ Conditional probability, that is? P ( A | B ) = P ( A ∩ B ) P ( B ) ̸ = 0 P ( B )

  22. Venn Diagrams of events as sets % % same :* d E 2 Ω E 1 T E 1 − E 2 E c E 1 ∪ E 2 E 1 ∩ E 2 ⑧ 1 T T l t t as

  23. Multiplication rule using conditional probability � Joint event P ( A | B ) = P ( A ∩ B ) P ( B ) ̸ = 0 P ( B ) ⇒ P ( A ∩ B ) = P ( A | B ) P ( B ) B → Ita

  24. Multiplication using conditional probability ⇒ Esse * pond "EhaI"7÷s B-sdijkw.ie qpcsgpi.pt#D likelihood \ prior pcmert )= ? T

  25. Symmetry of joint event in terms of conditional prob. P ( A | B ) = P ( A ∩ B ) P ( B ) ̸ = 0 P ( B ) TEE ⇒ P ( A ∩ B ) = P ( A | B ) P ( B ) ⇒ P ( B ∩ A ) = P ( B | A ) P ( A )

  26. Symmetry of joint event in terms of conditional prob. An B B n A = ∵ P ( B ∩ A ) = P ( A ∩ B ) ⇒ P ( A | B ) P ( B ) = P ( B | A ) P ( A ) pl A) to PCB ) # o

  27. The famous Bayes rule ¥ P ( A | B ) P ( B ) = P ( B | A ) P ( A ) P ( A | B ) = P ( B | A ) P ( A ) ⇒ P ( B ) - D % ¥ I in , " - . - > Du . . - Thomas Bayes (1701-1761)

  28. Bayes rule: lemon cars There are two car factories, A and B , that supply the same dealer. Factory A produced 1000 cars, of which 10 were lemons. Factory B I - = produced 2 cars and both were lemons. You bought a car that turned out to be a lemon. I f T A What is the probability that it came from B dealer the from a bad factory B ? car : Fac B from * came A it : = Putnam =L p calm = = T

  29. Bayes rule: lemon cars There are two car factories, A and B, that supply the same dealer. Factory A produced 1000 cars, of which 10 were lemons. Factory B produced 2 cars and both were lemons. You bought a car that turned out to be a lemon. What is the probability that it came from factory B? Ix # = E- to P ( B | L ) = P ( L | B ) P ( B ) = P ( L )

  30. Simulation of Conditional Probability hZp:// www.randomservices.org/ random/apps/ Condi4onalProbabilityExperim ent.html

  31. Additional References � Charles M. Grinstead and J. Laurie Snell "Introduc4on to Probability” � Morris H. Degroot and Mark J. Schervish "Probability and Sta4s4cs”

  32. Assignments � Reading Chapter 3 of the textbook � Next 4me: More on independence and condi4onal probability

  33. Addition material on Counting

  34. Addition principle � Suppose there are n disjoint events, the number of outcomes for the union of these events will be the sum of the outcomes of these events.

  35. Multiplication principle � Suppose that a choice is made in two consecu4ve stages � Stage 1 has m choices � Stage 2 has n choices � Then the total number of choices is mn

  36. Multiplication: example � How many ways are there to draw two cards of the same suit from a standard deck of 52 cards? The draw is without replacement.

  37. Multiplication: example � How many ways are there to draw two cards of the same suit from a standard deck of 52 cards? The draw is without replacement. 52×12

  38. Permutations (order matters) � From 10 digits (0,…9) pick 3 numbers for a CS course number (no repe44on), how many possible numbers are there?

  39. Permutations (order matters) � From 10 digits (0,…9) pick 3 numbers for a CS course number (no repe44on), how many possible numbers are there? 10×9×8 = P(10,3) = 720 n ! P ( n, r ) = ( n − r )!

  40. Combinations (order not important) � A graph has N ver4ces, how many edges could there exist at most? Edges are un- direc4onal. n ! ( n − r )! r ! = P ( n, r ) = C ( n, n − r ) C ( n, r ) = r !

  41. Combinations (order not important) � A graph has N ver4ces, how many edges could there exist at most? Edges are un- direc4onal. C(N,2) = N×(N-1)/2 n ! ( n − r )! r ! = P ( n, r ) = C ( n, n − r ) C ( n, r ) = r !

  42. Partition � How many ways are there to rearrange ILLINOIS? 8! 3!2!1!1!1! I L � General form n ! n 1 ! n 2 ! ...n r !

  43. Allocation � Puxng 6 iden4cal leZers into 3 mailboxs (empty allowed) L L L L L L Choose 2 from the 8 posi4ons

  44. Allocation � Puxng 6 iden4cal leZers into 3 mailboxs (empty allowed) L L L L L L Choose 2 from the 8 posi4ons: C(8,2) = 28

  45. Counting: How many think pairs could there be? � Q. Es4mate for # of pairs from different groups. There are 4 even sized groups in a class of 200

  46. Random experiment � Q: Is the following experiment a random experiment for probabilis4c study? A. Yes B. No

  47. Size of sample space � Q: What is the size of the sample space of this experiment? Deal 5 different cards out of a fairly shuffled deck of standard poker (order maZers). A . C(52,5) B . P(52,5) C . 52

  48. Event � Roll a 4-sided die twice The event “max is 4” and “sum is 4” are disjoint. A. True B. False

  49. Probability � Q: A deck of ordinary cards is shuffled and 13 cards are dealt. What is the probability that the last card dealt is an ace? A . 4*P(51,12)/P(52,13) B . 4/13 C . 4*C(51,12)/C(52,13)

  50. Allocation: beads � Puxng 3000 beads randomly into 20 bins (empty allowed) 3019! C (3019 , 19) = 19!3000!

  51. See you next time See You!

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