# Apply Bayes' rule

> A test has 99% sensitivity and 95% specificity. Disease prevalence is 1%. A patient tests positive. Using Bayes' rule, compute P(disease | positive) to 2 decimal places.

Canonical: https://learn.significanthobbies.com/curriculum/drills/conditional-probability-bayes

A test has 99% sensitivity and 95% specificity. Disease prevalence is 1%. A patient tests positive. Using Bayes' rule, compute P(disease | positive) to 2 decimal places.

## The mechanism

Probability is a bookkeeping system for uncertainty. Conditional probability restricts the sample space; Bayes flips cause and effect — from 'how likely is the evidence given the hypothesis' to 'how likely is the hypothesis given the evidence'.

## Expected evidence

≈ 0.17 (17%). Most positives are false alarms when the base rate is low.

## Hints

- P(D|+) = P(+|D)·P(D) / P(+).
- P(+) = P(+|D)·P(D) + P(+|¬D)·P(¬D).

## Sources and practice

- [Khan Academy — Probability](https://www.khanacademy.org/math/statistics-probability/probability-library)
- [MIT 6.041SC — Probabilistic Systems Analysis (course)](https://ocw.mit.edu/courses/6-041sc-probabilistic-systems-analysis-and-applied-probability-fall-2013/)
- [Seeing Theory — Basic Probability](https://seeing-theory.brown.edu/basic-probability/index.html)
- [Study Probability Fundamentals](https://learn.significanthobbies.com/curriculum/concepts/probability-fundamentals)
- [Try the interactive drill](https://learn.significanthobbies.com/drills/conditional-probability-bayes)
- [All practice briefs](https://learn.significanthobbies.com/curriculum/drills/)
