Bayesian Notions and False Positives

19
Bayesian Notions and False Positives

description

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. - PowerPoint PPT Presentation

Transcript of Bayesian Notions and False Positives

Page 1: Bayesian Notions and False Positives

Bayesian Notions and False Positives

Page 2: 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?

Page 3: Bayesian Notions and False Positives

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.

Page 4: Bayesian Notions and False Positives

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

Page 5: Bayesian Notions and False Positives

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

Page 6: Bayesian Notions and False Positives

M ASS.

TEXAS VO TE BUSH

VO TE BUSHVO TE KERRY

VO TE KERRY

Page 7: Bayesian Notions and False Positives

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

Page 8: Bayesian Notions and False Positives

Bayes’ Theorem for Kerry_voter vs. Texan

P( _ | ) P( )P( | _ )

P( _ )

Kerry voter Texan TexanTexan Kerry voter

Kerry voter

Page 9: Bayesian Notions and False Positives

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.

Page 10: Bayesian Notions and False Positives

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?

Page 11: Bayesian Notions and False Positives

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

Page 12: Bayesian Notions and False Positives

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

Page 13: Bayesian Notions and False Positives

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

Page 14: Bayesian Notions and False Positives

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

Page 15: Bayesian Notions and False Positives

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?

Page 16: Bayesian Notions and False Positives

DISEASE

NO TDISEASE

TEST NEG ATIVE

TEST PO SITIVE

Page 17: Bayesian Notions and False Positives

DISEASE

NO TDISEASE

TEST NEG ATIVE

TEST PO SITIVE

TEST NEGATIVE

+

+

Page 18: Bayesian Notions and False Positives

What if the test was more accurate for those who did not have the disease?

Page 19: Bayesian Notions and False Positives

DISEASE

NO TDISEASE

TEST NEG ATIVE

TEST PO SITIVE