StatisticsBayes' Theorem

Bayes' theorem: P(condition | positive) with 1% prevalence, 95% sensitivity, 90% specificity

Homework Question

A disease affects 1%1\% of a population. A test detects it 95%95\% of the time when present (sensitivity) and correctly gives a negative 90%90\% of the time when absent (specificity). If a randomly chosen case tests positive, what is the probability it truly has a disease?

Verified Final Answer
P(D∣+)≈0.0876P(D \mid +) \approx 0.0876 (about 8.8%8.8\%)

Key Formula & Principle

P(D∣+)=P(+∣D)P(D)P(+∣D)P(D)+P(+∣Dc)P(Dc)P(D \mid +) = \frac{P(+ \mid D)P(D)}{P(+ \mid D)P(D) + P(+ \mid D^c)P(D^c)}

Step-by-Step Solution

  1. 1
    Given: P(D)=0.01P(D) = 0.01, P(+∣D)=0.95P(+ \mid D) = 0.95, P(+∣Dc)=1−0.9=0.10P(+ \mid D^c) = 1 - 0.9 = 0.10.
  2. 2
    Total probability of a positive: P(+)=(0.95)(0.01)+(0.10)(0.99)=0.1085P(+) = (0.95)(0.01) + (0.10)(0.99) = 0.1085.
  3. 3
    Bayes: P(D∣+)=(0.95)(0.01)0.1085=0.00950.1085≈0.0876P(D \mid +) = \frac{(0.95)(0.01)}{0.1085} = \frac{0.0095}{0.1085} \approx 0.0876.
  4. 4
    Even with an accurate test, a low base rate means many positives are false positives.
Interactive Homework Customizer

Have this WebAssign / Canvas problem with different numbers?

Replace the numbers or functions below to match your exact assignment version, then generate a custom step-by-step derivation.

View all Statistics →