Conditional Probability Math Example 2

Follow the full solution, then compare it with the other examples linked below.

Example 2

hard
A test for a disease is 95%95\% accurate (true positive rate) with a 3%3\% false positive rate. If 1%1\% of the population has the disease, what is the probability a person who tests positive actually has the disease?

Solution

  1. 1
    Define events: DD = has disease, ++ = tests positive. Given: P(+โˆฃD)=0.95P(+ \mid D) = 0.95, P(+โˆฃDc)=0.03P(+ \mid D^c) = 0.03, P(D)=0.01P(D) = 0.01.
  2. 2
    By the law of total probability: P(+)=P(+โˆฃD)P(D)+P(+โˆฃDc)P(Dc)=0.95(0.01)+0.03(0.99)=0.0095+0.0297=0.0392P(+) = P(+ \mid D)P(D) + P(+ \mid D^c)P(D^c) = 0.95(0.01) + 0.03(0.99) = 0.0095 + 0.0297 = 0.0392.
  3. 3
    By Bayes' theorem: P(Dโˆฃ+)=P(+โˆฃD)P(D)P(+)=0.00950.0392โ‰ˆ0.242P(D \mid +) = \frac{P(+ \mid D)P(D)}{P(+)} = \frac{0.0095}{0.0392} \approx 0.242.

Answer

P(Dโˆฃ+)โ‰ˆ0.242P(D \mid +) \approx 0.242
Bayes' theorem reveals that even with a highly accurate test, a positive result may have a low probability of being correct when the disease is rare. This is the base rate fallacy.

About Conditional Probability

The conditional probability P(AโˆฃB)P(A|B) is the probability of event AA occurring given that event BB has already occurred.

Learn more about Conditional Probability โ†’

More Conditional Probability Examples