Discrrete mathematics for computer science bayes

9 68 0
Discrrete mathematics for computer science bayes

Đang tải... (xem toàn văn)

Thông tin tài liệu

Bayes Theorem Motivating Example: Drug Tests A drug test gives a false positive 2% of the time (that is, 2% of those who test positive actually are not drug users) And the same test gives a false negative 1% of the time (that is, 1% of those who test negative actually are drug users) If Joe tests positive, what are the odds Joe is a drug user? Insufficient information! Suppose we know that 1% of the population uses the drug? Setting Up the Drug Test Problem • • • Let T be the set of people who test positive • Pr(T|D) = 99 because the false negative rate is 1%, that is, 99% of drug users test positive, 1% test negative • • Let D be the set of drug users These are events, and Pr(T|D) is the probability that a drug user tests positive We want to know: What is Pr(D|T)? This is a very different question: What is the probability you are a drug user, given that you test positive? Bayes Theorem Theorem: If Pr(A) and Pr(B) are both nonzero, Proof We know that Pr(A | B) Πρ( Α) = Pr(B | A) Πρ( Β) by the definition of conditional probability: (*)Pr(A | B)⋅and Πρ(similarly Β) = for ΠρPr(B|A) ( Α ∩ Β) = Πρ( Β | Α)⋅ Πρ( Α) Then divide the left and right sides of (*) by Π ρ ( Α ∩ Β ) Pr(A Pr(B|A)∙Pr(B) | B) = , Πρ( Β) Bayes, v Πρ( Α)⋅ Πρ( Β | Α) Pr(A | B) = Πρ( Β | Α)⋅ Πρ( Α) + Πρ( Β | Α)⋅ Πρ( Α) This enables us to calculate Pr(A|B) using only the absolute probability Pr(A) and the conditional probabilities Pr(B|A) and Pr(B|¬A) Proof We know that Now multiply by Pr(B|A) and rewrite Pr(B) using the law of total probability Pr(A | B) Πρ( Α) = Pr(B | A) Πρ( Β) Drug Test again • Suppose that a drug test has – 2% false positives (that is, 2% of the people who test positive are not drug users ) • – 1% false negatives (1% of those who test negative are drug users) Suppose 1% of the population uses drugs If you test positive, what are the odds you are actually a drug user? Drug test, cont’d • • Let D = “Uses drugs” Let T = “Tests positive” Pr(D) = 01 Πρ(Τ | ∆ ) = 02 Πρ(Τ | ∆ ) = 99 • What is Pr(D|T)? Pr(D) = 01 Πρ(Τ | ∆ ) = 02 Πρ(Τ | ∆ ) = 99 • • Πρ( ∆ )⋅ Πρ(Τ | ∆ ) Pr(D | T ) = Πρ(Τ | ∆ )⋅ Πρ( ∆ ) + Πρ(Τ | ∆ )⋅ Πρ( ∆ ) 01⋅.99 = ≈ 33 99 ⋅.01+ 02 ⋅.99 If you fail the drug test, there is only one chance in three you are actually a drug user! How can this be? Think about it – Out of 1000 people there are 10 drug users and 990 non-users – Of those 990, 2% or almost 20 test positive – Almost all of the 10 users also test positive – So there are non-users for every user, among those who test positive! FINIS ... B)⋅and Πρ(similarly Β) = for ΠρPr(B|A) ( Α ∩ Β) = Πρ( Β | Α)⋅ Πρ( Α) Then divide the left and right sides of (*) by Π ρ ( Α ∩ Β ) Pr(A Pr(B|A)∙Pr(B) | B) = , Πρ( Β) Bayes, v Πρ( Α)⋅ Πρ( Β | Α)... different question: What is the probability you are a drug user, given that you test positive? Bayes Theorem Theorem: If Pr(A) and Pr(B) are both nonzero, Proof We know that Pr(A | B) Πρ( Α)... actually are drug users) If Joe tests positive, what are the odds Joe is a drug user? Insufficient information! Suppose we know that 1% of the population uses the drug? Setting Up the Drug Test Problem

Ngày đăng: 22/03/2019, 11:03

Mục lục

  • Slide 1

  • Motivating Example: Drug Tests

  • Setting Up the Drug Test Problem

  • Bayes Theorem

  • Bayes, v. 2

  • Drug Test again

  • Drug test, cont’d

  • Slide 8

  • FINIS

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan