Bayesian Notions and False Positives
description
Transcript of Bayesian Notions and False Positives
Bayesian Notions and False Positives
In the 2004, presidential election, of those Texans who voted for either Kerry or Bush,
62% voted for Bush and
38% for Kerry.
Of the Massachusetts residents who voted for either Kerry or Bush,
37% voted for Bush and
63% for Kerry.
Bill was a Kerry voter. He comes from either Texas or Massachusetts but I know nothing more about him.
Is it more likely that he comes from Texas or from Massachusetts?
I need to tell you that:
in Texas there were 7.4 million voters for either Kerry or Bush and
in Massachusetts there were only 2.9 million such voters.
• I need to tell you that in Texas there were 7.4 million voters for either Kerry or Bush and in Massachusetts there were 2.9 million such voters.
• Thus, of the Kerry voters from the two states, 61% came from Texas and only 39% came from Massachusetts.
• Thus, of the Kerry voters from the two states, 61% came from Texas and only 39% came from Massachusetts.
• So Bill is more likely a Texan.
M ASS.
TEXAS VO TE BUSH
VO TE BUSHVO TE KERRY
VO TE KERRY
Bayes’ Theorem
P( | )B A
P( | ) P( )P( | )
P( )
A B BB A
A
P( | )A B
Where:
P( )B
P( )A
Is the probability of Event B given that Event A has occurred
Is the probability of Event A given that Event B has occurred
Is the probability of Event B
Is the probability of Event A
Bayes’ Theorem for Kerry_voter vs. Texan
P( _ | ) P( )P( | _ )
P( _ )
Kerry voter Texan TexanTexan Kerry voter
Kerry voter
False Positives in Medical TestsSuppose that a test for a disease generates the following results:
1. if a tested patient has the disease, the test returns a positive result 99.9% of the time, or with probability 0.999
2. if a tested patient does not have the disease, the test returns a negative result 99.5% of the time, or with probability 0.995.
Suppose also that only 0.2% of the population has that disease, so that a randomly selected patient has a 0.002 prior probability of having the disease.
False Positives in Medical TestsSuppose that a test for a disease generates the following results:
1. if a tested patient has the disease, the test returns a positive result 99.9% of the time, or with probability 0.999
2. if a tested patient does not have the disease, the test returns a negative result 99.5% of the time, or with probability 0.995.
Suppose also that only 0.2% of the population has that disease, so that a randomly selected patient has a 0.002 prior probability of having the disease.
What is the probability of a “false positive”:The patient does not have the disease
given that the test was positive?
Let’s begin with What is the probability of a “true positive”:
The patient does have the diseasegiven that the test was positive?
A: Patient Tests Positively
B: Patient Has Disease
P( | ) P( )P( | )
P( )
A B BB A
A
P( | )B A
P( | )A B
P( )B
P( )A
Is the probability Patient Tests Positively given that Patient Has Disease
Is the probability Patient Has Disease
Is the probability Patient Tests Positively
Is the probability Patient Has Disease given that Patient Tests Positively
Let’s begin with What is the probability of a “true positive”:
The patient does have the diseasegiven that the test was positive?
A: Patient Tests Positively
B: Patient Has Disease
P( | ) P( )P( | )
P( )
A B BB A
A
P( | )B A
P( | )A B
P( )B
P( )A
Is the probability Patient Tests Positively given that Patient Has Disease
Is the probability Patient Has Disease
Is the probability Patient Tests Positively
Is the probability Patient Has Disease given that Patient Tests Positively
Let’s begin with What is the probability of a “true positive”:
The patient does have the diseasegiven that the test was positive?
A: Patient Tests Positively
B: Patient Has Disease
P( | ) P( )P( | )
P( )
A B BB A
A
P( | )B A
P( | )A B
P( )B
P( )A
.999
.002
Is the probability Patient Tests Positively
Is the probability Patient Has Disease given that Patient Tests Positively
What is the probability that the Patient Tests Positively?
P( | )B A
P( | )A B
P( )B
P( )A
.999
.002
.006988
Is the probability Patient Has Disease given that Patient Tests Positively
( ) ( | ) ( ) ( | ) ( )
.999 .002 (1 .995) (1 .002)
.006988
P A P A BP B P A notBP notB
P( | )B A
P( | )A B
P( )B
P( )A
.999
.002
.006988
.2859 and P(not B|A) is 1-.2859 = .7141
A: Patient Tests Positively
B: Patient Has Disease
P( | ) P( )P( | )
P( )
A B BB A
A
What is the probability of a “false positive”:The patient does not have the disease
given that the test was positive?
DISEASE
NO TDISEASE
TEST NEG ATIVE
TEST PO SITIVE
DISEASE
NO TDISEASE
TEST NEG ATIVE
TEST PO SITIVE
TEST NEGATIVE
+
+
What if the test was more accurate for those who did not have the disease?
DISEASE
NO TDISEASE
TEST NEG ATIVE
TEST PO SITIVE