Back to the 2023 paper

Module 2: Linear Models and Bayesian Learning

20237m

A patient takes a lab test and the result comes back positive. It is known that the test returns a correct positive result in only 98% of the cases and a correct negative result in only 97% of the cases. Furthermore, only 0.008 of the entire population has this disease.
(i) What is the probability that this patient has cancer?
(ii) What is the probability that he does not have cancer?
(iii) What is the diagnosis?

Worked SolutionAI Assisted

Given: Test correct positive P(+∣D)=0.98P(+|D)=0.98 (sensitivity), correct negative $P(-|
eg D)=0.97(specificity)→falsepositive (specificity) → false positive P(+|
eg D)=0.03,diseaseprevalence, disease prevalence P(D)=0.008$.

We compute posterior using Bayes: P(D∣+)=P(+∣D)P(D)P(+)P(D|+) = \frac{P(+|D)P(D)}{P(+)} where $P(+)=P(+|D)P(D)+P(+|
eg D)P(
eg D)$.

  • P(D)=0.008P(D)=0.008, $P(
    eg D)=0.992$
  • P(+∣D)=0.98P(+|D)=0.98, $P(+|
    eg D)=1-0.97=0.03$

P(+)=0.98∗0.008+0.03∗0.992=0.00784+0.02976=0.0376P(+) =0.98*0.008 +0.03*0.992 =0.00784+0.02976=0.0376

(i) P(D∣+)=0.00784/0.0376≈0.2085≈20.9%P(D|+) =0.00784/0.0376 \approx 0.2085 \approx 20.9\%

**(ii) $P(
eg D|+) =1 -0.2085=0.7915 \approx 79.2%∗∗(or** (or 0.02976/0.0376=0.7915$)

(iii) Diagnosis: Despite positive test, patient most probably does NOT have cancer/disease (about 79% chance healthy) because disease is rare (base rate fallacy). Positive predictive value only ~21%. Recommend further testing (more specific test, follow-up) — do not immediately diagnose cancer. If used as MAP classifier, predict $
eg D$
(no cancer).

Note: This classic low-prevalence paradox shows importance of prior. If prevalence higher, posterior rises sharply.

Similar questions

AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.