5
Bayes’ Theorem & Screening Tests Screening Tests - 1 1 Bayes’ Theorem & Diagnostic Tests Screening Tests 2 Some Questions If you test positive for HIV, what is the probability that you have HIV? If you have a positive mammogram, what is the probability that you have breast cancer? Given that you have breast cancer, what is the probability that you will live? 3 ) ( ) ( ) ( B P B A P B A P = Remember: Conditional Probability of A given B 4 Example: Coronary artery disease 1465 442 1023 Total 535 327 208 Negative T 930 115 815 Positive T + Total Absent D Present D + [From the book, Medical Statistics page 30, and the 2x2 table from data of Weiner et al (1979)] 5 The disease Prevalence in these patients P(D + ) = 1023/1465 = .70 Predictive Value of a Positive Test: The probability of having the disease given that a person has a positive test is given by: 88 . 930 815 1465 / 930 1465 / 815 ) ( ) ( ) ( = = = + + + + + T P T D P T D P 1465 442 1023 Total 535 327 208 Negative T 930 115 815 Positive T + Total Absent D Present D + 6 Predictive Value of a Negative Test:_____ = = ) ( ) ( ) ( T P T D P T D P 1465 442 1023 Total 535 327 208 Negative T 930 115 815 Positive T + Total Absent D Present D +

Bayes’ Theorem Diagnostic Tests Screening Testsgchang.people.ysu.edu/class/mph/note/06_4_Prob_Ch6_2...Bayes’ Theorem & Screening Tests Screening Tests - 1 1 Bayes’ Theorem &

Embed Size (px)

Citation preview

Page 1: Bayes’ Theorem Diagnostic Tests Screening Testsgchang.people.ysu.edu/class/mph/note/06_4_Prob_Ch6_2...Bayes’ Theorem & Screening Tests Screening Tests - 1 1 Bayes’ Theorem &

Bayes’ Theorem & Screening Tests

Screening Tests - 1

1

Bayes’ Theorem &

Diagnostic Tests Screening Tests

2

Some Questions

• If you test positive for HIV, what is the probability that you have HIV?

• If you have a positive mammogram, what is the probability that you have breast cancer?

• Given that you have breast cancer, what is the probability that you will live?

3

)()()(

BPBAPBAP ∩

=

Remember:Conditional Probability of A given B

4

Example: Coronary artery disease

14654421023Total

535327208Negative T−

930115815Positive T+

TotalAbsent D−Present D+

[From the book, Medical Statistics page 30, and the 2x2 table from data of Weiner et al (1979)]

5

The disease Prevalence in these patients P(D+) = 1023/1465 = .70Predictive Value of a Positive Test: The probability of having the disease given that a person has a positive test is given by:

88.930815

1465/9301465/815

)()()( ≈==

∩= +

++++

TPTDPTDP

14654421023Total

535327208Negative T −

930115815Positive T+

TotalAbsent D −Present D+

6

Predictive Value of a Negative Test:_____

=∩

= −

−−−−

)()()(

TPTDPTDP

14654421023Total

535327208Negative T −

930115815Positive T+

TotalAbsent D −Present D+

Page 2: Bayes’ Theorem Diagnostic Tests Screening Testsgchang.people.ysu.edu/class/mph/note/06_4_Prob_Ch6_2...Bayes’ Theorem & Screening Tests Screening Tests - 1 1 Bayes’ Theorem &

Bayes’ Theorem & Screening Tests

Screening Tests - 2

7

Things to notice: (Prevalence)

)()()( −++++ ∩+∩= DTPDTPTP

7.1465/10231465/2081465/815 ≈=+=

63.1465/9301465/1151465/815 ≈=+=

)()()( −++++ ∩+∩= TDPTDPDP

14654421023Total

535327208Negative T −

930115815Positive T+

TotalAbsent D −Present D+

Likewise, (Overall percentage that tested positive)

8

Calculate the following:

P(D− ) = _______

P(T− ) = _______

= __________)()()( ++++ −∩ TPDPTDP

14654421023Total

535327208Negative T −

930115815Positive T+

TotalAbsent D −Present D+

9

Sensitivity and Specificity

10

Sensitivity: The probability of a person testing positive, given that (s)he has the disease.

80.1023/8151465/10231465/815

)()()( ≈==

∩= +

++++

DPDTPDTP

14654421023Total

535327208Negative T −

930115815Positive T+

TotalAbsent D −Present D+

11

Specificity: The probability of a person testing negative given that (s)he does not have the disease.

74.442/3271465/4421465/327

)()()( ≈==

∩= −

−−−−

DPDTPDTP

14654421023Total

535327208Negative T −

930115815Positive T+

TotalAbsent D −Present D+

12

Note that sensitivity is not affected bydisease prevalence. For example, if number of people with true coronary artery disease has tripled from 1023 to 3069 so that the new prevalence is now 3069/(1465+3069)=.68, then we should expect that three times as many patients would test positive. Thus 3x815 = 2445 should have a positive result.

The sensitivity would be 2445/3069 = .80Before: 815/1023 = .80

Page 3: Bayes’ Theorem Diagnostic Tests Screening Testsgchang.people.ysu.edu/class/mph/note/06_4_Prob_Ch6_2...Bayes’ Theorem & Screening Tests Screening Tests - 1 1 Bayes’ Theorem &

Bayes’ Theorem & Screening Tests

Screening Tests - 3

13

False Negative rate = 1 − sensitivity

2.1023/2081465/10231465/208

)()()( ≈==

∩= +

+−+−

DPDTPDTP

14654421023Total

535327208Negative T −

930115815Positive T+

TotalAbsent D −Present D+

26.442/1151465/4421465/115

)()()( ≈==

∩= −

−+−+

DPDTPDTP

False Positive rate = 1 − specificity

14

For our problem, since the sensitivity is .8, the false negative rate is 1 - .8 = .2.

Interpretation: 20% of the time a person will actually have the disease when the test says that he/she does not.

Likewise, since specificity is .74, the false positive rate is 0.26.

Sensitivity & False Negatives

15

Sensitivity vs Specificity

In a perfect world, we want both to be high.The two components have a see-saw relationship.Comparisons of tests’ accuracy are done with Receiver Operator Characteristic (ROC) curves.

16

ROC

1.005.80.644.59.813.55.93201.01

SpecificitySensitivityTest Positive Criteria

Sensitivity

1 − Specificity0 1.0

1.0

17

About ROC Curve Area under the ROC represents the probability of correctly distinguishing a normal from an abnormal subject on the relative ordering of the test ratings.Two screening tests for the same disease, the test with the higher area under its ROC curve is considered the better test, unless there is particular level of sensitivity or specificity is especially important in comparing the two tests.

18

How can we get the predictive value of a positive test from sensitivity?

After all, at least as a patient, we want to know that probability that we have a disease given that we have just tested positive!

Bayes’ Theorem

Page 4: Bayes’ Theorem Diagnostic Tests Screening Testsgchang.people.ysu.edu/class/mph/note/06_4_Prob_Ch6_2...Bayes’ Theorem & Screening Tests Screening Tests - 1 1 Bayes’ Theorem &

Bayes’ Theorem & Screening Tests

Screening Tests - 4

19

Bayes' Theorem

)()()( and

)()()(

APBAPABP

BPBAPBAP ∩

=∩

=

Bayes’ Theorem

)()()( BPBAPBAP =∩Solving the first equation as follows,

)()()(

)(AP

BPBAPABP =

Substituting this in for the second equation, we have

20

In words, the predictive value of a positive test is equal to the sensitivity (=.8) times prevalence (=.7) divided by percentage who test positive (=.63).

Applying this to our formula, we have

Bayes' Theorem)(

)()()(

APBPBAP

ABP =

=++ )( TDP 89.63.

)7)(.8(.==+

+++

)()()(

TPDPDTP

sensitivity prevalence

Tested positive

21

Suppose that 84% of hypertensives and 23% of normotensives are classified as hypertensive by an automated blood-pressure machine. If it is estimated that the prevalence of hypertensives is 20%, what is the predictive value of a positive test? What is the predictive value of a negative test?

Sensitivity = .84 Specificity = 1−.23 = .77Pretty Good Test!??

48.)23)(.8(.)84)(.2(.

)2)(.84(.)()(

)2)(.84(.)()2)(.84(.

=+

=∩+∩

== −+++++

DTPDTPTPPV

Example

95.=−PV What if only 2% prevalence? 22

Finding Disease Prevalence in a Specified Population

Want to know: what percentage of a certain group has HIV?Use a screening test on a sample of nindividuals from the group.Know the sensitivity and specificityfrom prior experience.

23

Finding Prevalence

Suppose n+ people test positive.Using Bayes’ Theorem we can derive the formula:

=+)(DP)()(

)()/(−+++

−++

DTPDTP

DTPnn

24

Relative Risk and the Odds Ratio

Important measures useful for comparing the probabilities of disease in two different groups.

Page 5: Bayes’ Theorem Diagnostic Tests Screening Testsgchang.people.ysu.edu/class/mph/note/06_4_Prob_Ch6_2...Bayes’ Theorem & Screening Tests Screening Tests - 1 1 Bayes’ Theorem &

Bayes’ Theorem & Screening Tests

Screening Tests - 5

25

Conditional Probability

100(1.0)

75P(C)=(.75)

25P(C) =(.25)

50P(S’) =(.5)

45(.45)

5(.05)

Not SmokeS’

50P(S) =(.5)

30(.3)

20(.2)

SmokeS

TotalNo CancerC’

CancerC

P(C|S' ) = .05/.5 = .1P(C|S) = .2/.5 = .4

What is =?P(C|S)P(C|S’) 4

(Relative Risk )

)()()|(

BPBAPBAP ∩

=

26

Relative Risk

nb + da + c

c + ddcNot Smoke

(Not Exposed)

a + bbaSmoke

(Exposed)

TotalNo Cancer(No Disease)

Cancer(Disease)

Relative Risk (RR) =P(disease|exposed)

P(disease|unexposed)=

a/(a+b)c/(c+d)

27

Odds

The odds of an event to occur is the probability of an event to occur divided by the probability of the event not to occur.

Example: In casting a balanced die experiment,

the odds of a 6 to occur is = (1/6) / (5/6) = 1/5.

28

Odds Ratio

nb + da + c

c + ddcNot Smoke

(Not Exposed)

a + bbaSmoke

(Exposed)

TotalNo Cancer(No Disease)

Cancer(Disease)

Odds Ratio (OR) =P(disease|exposed)/[1- P(disease|exposed)]P(disease|unexposed)/[1- P(disease|unexp.)]

=a/bc/d

=adcb

29

Odds Ratio

100(1.0)

75P(C)=(.75)

25P(C) =(.25)

50P(S’) =(.5)

45(.45)

5(.05)

Not SmokeS’

50P(S) =(.5)

30(.3)

20(.2)

SmokeS

TotalNo CancerC’

CancerC

The odds ratio of getting cancer for smoking versus non-smoking is: OR = (20/30) / (5/45) = 6Relative Risk: RR = (20/50) / (5/50) = 4 30

For rare diseases, the odds ratio and the relative risk are almost the same.

Odds Ratio (OR) =P(disease|exposed)/[1- P(disease|exposed)]P(disease|unexposed)/[1- P(disease|unexp.)]

Relative Risk (RR) =P(disease|exposed)

P(disease|unexposed)Small ≈ 0