Bayes Theorem

M. Drew LaMar
October 3, 2018

“I know too well that these arguments from probabilities are imposters, and unless great caution is observed in the use of them, they are apt to be deceptive.”

- Plato

Medical testing

Quote: “It’s easy to think of medical tests as black and white. If the test is positive, you have the disease; if it’s negative, you don’t. Even good clinicians sometimes fall into that trap.”

- Harriet Hall

Bayes Theorem to the rescue!!!

Example 5.9: Detection of Down Syndrome

alt text

Question: What is Pr[DS | +]?

Discuss: What probabilities are given to us here?

Example 5.9: Detection of Down Syndrome

       result
status       +      -    Sum
  DS        60     40    100
  no DS   4995  94905  99900
  Sum     5055  94945 100000

Sensitivity: Pr[+ | DS] = 60/100 = 0.6 [True positive rate]

Specificity: Pr[- | no DS] = 94905/99900 = 0.95 [True negative rate]

False positive rate: Pr[+ | no DS] = 1-0.95 = 0.05

False negative rate: Pr[- | DS] = 1-0.6 = 0.4

Example 5.9: Detection of Down Syndrome

plot of chunk unnamed-chunk-2

Discuss: Graphically, what is:

  Pr[DS]

  Pr[+ | DS]

  Pr[+ | no DS]

  Pr[DS | +]

Example 5.9: Detection of Down Syndrome

Example 5.9: Detection of Down Syndrome

Example 5.9: Detection of Down Syndrome (Visual Check)

 

plot of chunk unnamed-chunk-3

alt text

Example 5.9: Detection of Down Syndrome (Calculate)

 

Discuss: Pr[DS | +] = ???

alt text

Example 5.9: Detection of Down Syndrome (Calculate)

 

Discuss: Pr[DS | +] = ???

alt text

Example 5.9: Detection of Down Syndrome (Calculate)

 

Discuss: Pr[DS | +] = ???

alt text

Effect of disease rarity

Effect of disease rarity

plot of chunk unnamed-chunk-4

Question: What happens to Pr[DS | +] when the proportion of the population with the disease goes to zero?

Example 5.9: Detection of Down Syndrome (Calculate)

 

plot of chunk unnamed-chunk-5

 

plot of chunk unnamed-chunk-6