A disease affects 2% of a population. A medical test correctly gives a positive result for 95% of people who have the disease and gives a false positive result for 5% of people who do not have the disease. If a randomly selected person tests positive, what is the probability that the person actually has the disease?

Solution

Probability · Hard

Step 1: Define the events.

Let D mean the person has the disease.
Let + mean the person tests positive.

We are given:
P(D) = 0.02
P(not D) = 0.98
P(+ | D) = 0.95
P(+ | not D) = 0.05

We want to find P(D | +).

Step 2: Find the probability of having the disease and testing positive.

P(D and +) = P(D)P(+ | D)

P(D and +) = (0.02)(0.95)
P(D and +) = 0.019

Step 3: Find the probability of not having the disease and testing positive.

P(not D and +) = P(not D)P(+ | not D)

P(not D and +) = (0.98)(0.05)
P(not D and +) = 0.049

Step 4: Find the total probability of a positive test.

A positive test can occur in either of these two ways:

P(+) = 0.019 + 0.049
P(+) = 0.068

Step 5: Apply Bayes' theorem.

P(D | +) = P(D and +) / P(+)

P(D | +) = 0.019 / 0.068

Step 6: Calculate the probability.

P(D | +) ≈ 0.2794

As a percentage:
0.2794 × 100% ≈ 27.94%

Therefore, given a positive test result, the probability that the person actually has the disease is approximately 0.2794, or 27.94%.

Result

P(disease | positive) ≈ 0.2794 or 27.94%