probability and statistics
play

Probability and Statistics for Computer Science On - PowerPoint PPT Presentation

Probability and Statistics for Computer Science On Condi(onal Probability and independence, Prof. Forsyth men(oned in the textbook These topics


  1. Probability ¡and ¡Statistics ¡ ì ¡ for ¡Computer ¡Science ¡ ¡ On ¡Condi(onal ¡Probability ¡ and ¡independence, ¡ Prof. ¡ Forsyth ¡men(oned ¡in ¡the ¡ textbook ¡“ These ¡topics ¡ mislead ¡intui1on ¡so ¡regularly ¡ that ¡some ¡errors ¡have ¡ names .” ¡ Credit: ¡wikipedia ¡ Hongye ¡Liu, ¡Teaching ¡Assistant ¡Prof, ¡CS361, ¡UIUC, ¡2.6.2020 ¡

  2. Announcement ¡

  3. Announcement ¡ ✺ HW3 ¡is ¡out ¡today ¡and ¡is ¡due ¡on ¡2/13 ¡Thurs. ¡ Please ¡start ¡early ¡for ¡this ¡homework ¡is ¡ rela(vely ¡harder. ¡ ✺ Please ¡check ¡the ¡slides ¡I ¡have ¡for ¡coun(ng ¡in ¡ last ¡lecture ¡ ¡

  4. Last ¡time ¡ ✺ Probability ¡ ¡ ✺ Coun(ng ¡ ¡ ✺ Review ¡of ¡basics ¡of ¡probability ¡ ✺ Condi(onal ¡Probability ¡ ¡

  5. Content ¡ ✺ Condi(onal ¡Probability ¡ ¡ ✺ Review ¡the ¡main ¡concepts ¡ ✺ Examples ¡and ¡Misconcep8ons ¡of ¡ Condi(onal ¡Probability ¡ ¡ ✺ Independence ¡ ✺ Condi(onal ¡Independence ¡ ¡

  6. Conditional ¡Probability ¡ ✺ The ¡probability ¡of ¡ A ¡given ¡ B ¡ ¡ P ( A | B ) = P ( A ∩ B ) P ( B ) P ( B ) � = 0 The ¡line-­‑crossed ¡area ¡is ¡the ¡ new ¡sample ¡space ¡for ¡ condi(onal ¡P(A| ¡B) ¡

  7. Content ¡ ✺ Condi(onal ¡Probability ¡ ¡ ✺ Review ¡the ¡main ¡concept ¡ ✺ Examples ¡and ¡Misconcep2ons ¡of ¡ Condi1onal ¡Probability ¡ ¡ ✺ Independence ¡ ✺ Condi(onal ¡Independence ¡ ¡

  8. Conditional ¡Probability: ¡die ¡ example ¡ ¡ Y ¡ Throw ¡5-­‑sided ¡fair ¡ 5 ¡ die ¡twice. ¡ 4 ¡ 3 ¡ ¡ ¡ A : max ( X, Y ) = 4 2 ¡ B : min ( X, Y ) = 2 1 ¡ 5 ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡ X ¡ P ( A ) =? P ( A | B ) =?

  9. Conditional ¡Probability: ¡die ¡example ¡ ¡ Y ¡ Throw ¡5-­‑sided ¡fair ¡ 5 ¡ die ¡twice. ¡ 4 ¡ 3 ¡ ¡ ¡ A : max ( X, Y ) = 4 2 ¡ B : min ( X, Y ) = 2 1 ¡ 5 ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡ X ¡ P ( A ) = 7 25

  10. Conditional ¡Probability: ¡die ¡example ¡ ¡ Y ¡ Throw ¡5-­‑sided ¡die ¡ 5 ¡ twice, ¡ 4 ¡ 3 ¡ ¡ ¡ A : max ( X, Y ) = 4 2 ¡ B : min ( X, Y ) = 2 1 ¡ 5 ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡ X ¡ P ( A | B ) = 2 7

  11. Frequency ¡Approach ¡onto ¡Bayesian ¡ ✺ In ¡the ¡5-­‑die ¡problem, ¡we ¡counted ¡the ¡ frequencies ¡to ¡compute ¡the ¡ condi(onal ¡probability. ¡ ✺ Using ¡the ¡symmetry ¡of ¡joint ¡ probability, ¡we ¡can ¡derive ¡other ¡ formulas ¡for ¡condi(onal ¡probability ¡

  12. Bayes ¡rule ¡ ✺ Given ¡the ¡defini(on ¡of ¡condi(onal ¡ probability ¡and ¡the ¡symmetry ¡of ¡joint ¡ probability, ¡we ¡have: ¡ ¡ ¡ P ( A | B ) P ( B ) = P ( A ∩ B ) = P ( B ∩ A ) = P ( B | A ) P ( A ) ¡ ¡ ¡ ¡And ¡it ¡leads ¡to ¡the ¡famous ¡Bayes ¡rule: ¡ P ( A | B ) = P ( B | A ) P ( A ) P ( B )

  13. Total ¡probability ¡using ¡conditional ¡ probability ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

  14. Total ¡probability ¡general ¡form ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

  15. Bayes ¡rule: ¡Prosecutor’s ¡Fallacy ¡ A: ¡Guilty ¡ B: ¡There ¡is ¡evidence ¡against ¡this ¡person ¡

  16. Bayes ¡rule: ¡Prosecutor’s ¡Fallacy ¡ A: ¡Guilty ¡ B: ¡There ¡is ¡evidence ¡against ¡this ¡person ¡ P(B|A) ¡= ¡0.99 ¡ P ( There is evidence | Innocent ) P(A) ¡= ¡0.05 ¡ = P ( B | A c ) = 0 . 10 P(B c |A) ¡= ¡0.01 ¡ P(B|A c ) ¡= ¡0.10 ¡ P(A c ) ¡= ¡0.95 ¡ P(B c |A c ) ¡= ¡0.90 ¡ Innocent ¡

  17. Bayes ¡rule: ¡Prosecutor’s ¡Fallacy ¡ ✺ What ¡Probability ¡should ¡be ¡used? ¡ Guilty ¡ P ( There is evidence | Innocent ) P(B|A) ¡= ¡0.99 ¡ P(A) ¡= ¡0.05 ¡ = P ( B | A c ) = 0 . 10 P(B c |A) ¡= ¡0.01 ¡ A. P(B c |A) ¡ P(B|A c ) ¡= ¡0.10 ¡ P(A c ) ¡= ¡0.95 ¡ B. P(A|B) ¡ P(B c |A c ) ¡= ¡0.90 ¡ Innocent ¡

  18. Important ¡facts ¡ ✺ Bayes ¡rule ¡ P ( A | B ) = P ( B | A ) P ( A ) P ( B ) ✺ Total ¡probability ¡

  19. Important ¡facts ¡ ✺ Bayes ¡rule ¡ P ( A | B ) = P ( B | A ) P ( A ) P ( B ) ✺ Total ¡probability ¡ P ( A ) = P ( A | B ) P ( B ) + P ( A | B c ) P ( B c ) � P ( A ) = ( P ( A | B j ) P ( B j )) j if B i ∩ B j = Ø for all i � = j

  20. Content ¡ ✺ Condi(onal ¡Probability ¡ ¡ ✺ Review ¡the ¡main ¡concepts ¡ ✺ Examples ¡and ¡Misconcep8ons ¡of ¡ Condi(onal ¡Probability ¡ ¡ ✺ Independence ¡ ✺ Condi(onal ¡Independence ¡ ¡

  21. Independence ¡ ✺ One ¡defini(on: ¡ P ( A | B ) = P ( A ) or P ( B | A ) = P ( B ) While ¡ P ( A ) � = 0 & P ( B ) � = 0 ¡That ¡is: ¡whether ¡B ¡happened ¡ ¡doesn’t ¡change ¡the ¡probability ¡of ¡A ¡ ¡and ¡vice ¡versa ¡

  22. Independence ¡ ✺ Alterna(ve ¡defini(on ¡deriva(on ¡ ¡

  23. Independence ¡ ✺ Alterna(ve ¡defini(on ¡deriva(on ¡ ¡ P ( A | B ) = P ( A ) LHS ¡by ¡defini(on ¡ ⇒ P ( A ∩ B ) = P ( A ) P ( B ) ⇒ P ( A ∩ B ) = P ( A ) P ( B )

  24. Independence ¡ ✺ Alterna(ve ¡defini(on: ¡ ¡ P ( A ∩ B ) = P ( A ) P ( B ) Two ¡events ¡are ¡independent ¡if ¡and ¡ only ¡if ¡the ¡joint ¡event’s ¡probability ¡is ¡ the ¡product ¡of ¡each ¡individual ¡ probability; ¡this ¡is ¡true ¡also ¡for ¡P(A) ¡= ¡0 ¡ or ¡P(B) ¡= ¡0 ¡

  25. Testing ¡Independence: ¡ ✺ Suppose ¡you ¡draw ¡one ¡card ¡from ¡a ¡ standard ¡deck ¡of ¡cards. ¡E 1 ¡is ¡the ¡event ¡ that ¡the ¡card ¡is ¡a ¡King, ¡Queen ¡or ¡Jack. ¡E 2 ¡ is ¡the ¡event ¡the ¡card ¡is ¡a ¡Heart. ¡Are ¡E 1 ¡ and ¡E 2 ¡independent? ¡

  26. Probability ¡using ¡the ¡property ¡of ¡ Independence: ¡Airline ¡overbooking ¡(1) ¡ ✺ An ¡airline ¡has ¡a ¡flight ¡with ¡6 ¡seats. ¡They ¡ always ¡sell ¡7 ¡(ckets ¡for ¡this ¡flight. ¡If ¡(cket ¡ holders ¡show ¡up ¡independently ¡with ¡ probability ¡ p , ¡what ¡is ¡the ¡probability ¡that ¡ the ¡flight ¡is ¡overbooked ¡? ¡

  27. Probability ¡using ¡the ¡property ¡of ¡ Independence: ¡Airline ¡overbooking ¡(1) ¡ ✺ An ¡airline ¡has ¡a ¡flight ¡with ¡6 ¡seats. ¡They ¡ always ¡sell ¡7 ¡(ckets ¡for ¡this ¡flight. ¡If ¡(cket ¡ holders ¡show ¡up ¡independently ¡with ¡ probability ¡ p , ¡what ¡is ¡the ¡probability ¡that ¡ the ¡flight ¡is ¡overbooked ¡? ¡ P( ¡7 ¡passengers ¡showed ¡up) ¡

  28. Probability ¡using ¡the ¡property ¡of ¡ Independence: ¡Airline ¡overbooking ¡(2) ¡ ✺ An ¡airline ¡has ¡a ¡flight ¡with ¡6 ¡seats. ¡They ¡ always ¡sell ¡8 ¡(ckets ¡for ¡this ¡flight. ¡If ¡(cket ¡ holders ¡show ¡up ¡independently ¡with ¡ probability ¡ p , ¡what ¡is ¡the ¡probability ¡that ¡ exactly ¡6 ¡people ¡showed ¡up? ¡ P(6 ¡people ¡showed ¡up) ¡= ¡ ¡

  29. Probability ¡using ¡the ¡property ¡of ¡ Independence: ¡Airline ¡overbooking ¡(3) ¡ ✺ An ¡airline ¡has ¡a ¡flight ¡with ¡6 ¡seats. ¡They ¡ always ¡sell ¡8 ¡(ckets ¡for ¡this ¡flight. ¡If ¡(cket ¡ holders ¡show ¡up ¡independently ¡with ¡ probability ¡ p , ¡what ¡is ¡the ¡probability ¡that ¡ the ¡flight ¡is ¡overbooked ¡? ¡ P( ¡overbooked) ¡= ¡

  30. Probability ¡using ¡the ¡property ¡of ¡ Independence: ¡Airline ¡overbooking ¡(4) ¡ ✺ An ¡airline ¡has ¡a ¡flight ¡with ¡ s ¡seats. ¡They ¡ always ¡sell ¡ t ¡( t > s ) ¡(ckets ¡for ¡this ¡flight. ¡If ¡ (cket ¡holders ¡show ¡up ¡independently ¡ with ¡probability ¡ p , ¡what ¡is ¡the ¡probability ¡ that ¡exactly ¡ u ¡people ¡showed ¡up? ¡ P( ¡exactly ¡ u ¡people ¡showed ¡up) ¡ ¡

  31. Probability ¡using ¡the ¡property ¡of ¡ Independence: ¡Airline ¡overbooking ¡(5) ¡ ✺ An ¡airline ¡has ¡a ¡flight ¡with ¡ s ¡seats. ¡They ¡ always ¡sell ¡ t ¡( t > s ) ¡(ckets ¡for ¡this ¡flight. ¡If ¡ (cket ¡holders ¡show ¡up ¡independently ¡ with ¡probability ¡ p , ¡what ¡is ¡the ¡probability ¡ that ¡the ¡flight ¡is ¡overbooked ¡? ¡ P( ¡overbooked) ¡ ¡

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