You are here: Project Scarlet **»** Probability and Distributions **»** **Bayes’ Law Example**

Bayes’ Law

Let us concern ourselves with Disease X. In the United States, the disease prevalence is 9.6 per 100,000 people. This is 0.0096% of the population. There is a new test for this disease, called the Blackbird Test. To determine how good this new test is, a clinical trial was held using 57 subjects with the disease and 38 subjects without the disease. All 95 subjects were tested for the disease using the Blackbird Test. Some tested positive; some tested negative. The following table (confusion matrix) summarizes these clinical results:

Reality | |||

Diseased, D | Clean, C | ||

Test Result | Positive, + | 50 | 7 |

Negative, − | 7 | 31 | |

With this information, calculate the probability that a randomly-selected person from the population, who tests positive, has Disease X; that is, calculate P[D | +].

The following are additional probabilities that are frequently calculated on such clinical data. See if you can calculate them successfully.

False Positive Rate | P[+ | C] | 0.1842 |
---|---|---|

False Negative Rate | P[− | D] | 0.1228 |

True Positive Rate | P[+ | D] | 0.8772 |

True Negative Rate | P[− | C] | 0.8158 |

Sensitivity | P[+ | D] | 0.8772 |

Specificity | P[− | C] | 0.8158 |

You may want to calculate these values yourself then hover your mouse over the grey spaces to see if you calculated them correctly.

In the box below, please enter the probability the person has Disease X, given they test positive for it (P[D | +]), then click on the “Check your answer!” button. Please round your answer to the ten-thousandths place.

Show Formula

Show Solution

Show the R Code

Show the Excel Formula

© Ole J. Forsberg, Ph.D. 2017. All rights reserved. | . | |