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, ¡9.12.2019 ¡

  2. Last ¡time ¡ ✺ Probability ¡ ¡ ✺ Coun(ng ¡ ¡ ✺ Condi(onal ¡Probability ¡ ✺ Independence ¡ ¡

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

  4. Conditional ¡Probability ¡ ✺ The ¡probability ¡of ¡ A ¡given ¡ B ¡ ¡ P ( A | B ) = P ( A ∩ B ) P ( B ) P ( B ) � = 0 The ¡“Size” ¡analogy ¡ Credit: ¡Prof. ¡Jeremy ¡Orloff ¡& ¡ ¡ Jonathan ¡Bloom ¡

  5. 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) ¡

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

  7. 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 ) =?

  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 ) = 7 25

  9. 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

  10. 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 ¡

  11. 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 )

  12. Total ¡probability ¡using ¡ conditional ¡probability ¡ P ( A ) = P ( A ∩ B 1 ) + P ( A ∩ B 2 ) + P ( A ∩ B 3 ) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ = P ( A | B 1 ) P ( B 1 ) + P ( A | B 2 ) P ( B 2 ) + P ( A | B 3 ) P ( B 3 ) A ∩ B 1 B 1 ¡ B 3 ¡ A ¡ A ∩ B 3 A ∩ B 2 B 2 ¡

  13. Total ¡probability ¡general ¡ form ¡ � P ( A ) = ( P ( A | B j ) P ( B j )) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ j if B i ∩ B j = Ø for all i � = j A ∩ B 1 B 1 ¡ B 3 ¡ A ¡ A ∩ B 3 A ∩ B 2 B 2 ¡

  14. 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 ¡

  15. 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 ¡

  16. Bayes ¡rule: ¡Prosecutor’s ¡Fallacy ¡ ✺ What ¡Probability ¡should ¡be ¡used? ¡ 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 ¡

  17. Bayes ¡rule: ¡Prosecutor’s ¡Fallacy ¡ ✺ What ¡is ¡the ¡probability ¡ P(A|B) ? ¡ Given ¡there ¡is ¡evidence ¡against ¡the ¡defendant ¡and ¡ the ¡person ¡is ¡guilty. ¡ P(B|A) ¡= ¡0.99 ¡ P(A) ¡= ¡0.05 ¡ 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 ¡

  18. Bayes ¡rule: ¡Prosecutor’s ¡Fallacy ¡ A: ¡Guilty ¡ B: ¡There ¡is ¡evidence ¡against ¡this ¡person ¡ P ( Guilty | There is evidence ) P(B|A) ¡= ¡0.99 ¡ = P ( A | B ) = P ( A ) P ( B | A ) P(A) ¡= ¡0.05 ¡ P ( B ) P(B c |A) ¡= ¡0.01 ¡ P ( A ) P ( B | A ) = P ( A ) P ( B | A ) + P ( A c ) P ( B | A c ) P(B|A c ) ¡= ¡0.10 ¡ P(A c ) ¡= ¡0.95 ¡ 0 . 05 × 0 . 99 P(B c |A c ) ¡= ¡0.90 ¡ = 0 . 05 × 0 . 99 + 0 . 95 × 0 . 1 Innocent ¡ ≃ 0 . 342

  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 ¡ ¡ ✺ Examples ¡and ¡Misconcep2ons ¡of ¡ 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 ¡ ¡ P ( A | B ) = P ( A ) LHS ¡by ¡defini(on ¡ ⇒ P ( A ∩ B ) = P ( A ) P ( B ) ⇒ P ( A ∩ B ) = P ( A ) P ( B )

  23. 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 ¡

  24. 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? ¡

  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? ¡ P ( E 1 ) = 12 52 = 3 13 ; P ( E 2 ) = 13 52 = 1 4 P ( E 1 ∩ E 2 ) = 3 52 = P ( E 1 ) P ( E 2 )

  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) ¡

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