Limited time75% off all plans
Get the app

Bayes theorem application

Bayes theorem application

Published January 10, 2026

Bayes theorem application

On this page

Diagnostic Accuracy - The 2x2 Tango

Diagnostic Test Accuracy 2x2 Table and Metrics

Disease +Disease -
Test +True Positive (TP)False Positive (FP)
Test -False Negative (FN)True Negative (TN)
-   $Sensitivity = TP / (TP + FN)$
  • Specificity: Probability of testing negative if you don't have the disease. Rules IN.
    • $Specificity = TN / (TN + FP)$
  • Positive Predictive Value (PPV): Probability of having the disease if you test positive.
    • $PPV = TP / (TP + FP)$
  • Negative Predictive Value (NPV): Probability of not having the disease if you test negative.
    • $NPV = TN / (TN + FN)$

📌 SPIN & SNOUT: SPecific test, when Positive, rules IN. SNensitive test, when Negative, rules OUT.

⭐ Increasing disease prevalence increases PPV and decreases NPV. Sensitivity and specificity are intrinsic test characteristics and are unaffected by prevalence.

Prevalence's Power - The PPV/NPV Pivot

  • Prevalence = Pre-test Probability: The baseline chance of having a disease in a specific population before testing.

  • This directly influences the post-test probabilities (PPV and NPV).

  • High Prevalence Setting (e.g., specialist clinic):

      • PPV : A positive test is more trustworthy.
      • NPV : A negative test is less reliable.
  • Low Prevalence Setting (e.g., general screening):

      • PPV : More false positives are expected.
      • NPV : A negative test is very reassuring.

⭐ A positive screening test for a rare disease in the general population has a low PPV. Always confirm with a more specific test before diagnosing.

Prevalence, PPV, and NPV relationship with cut-off

Bayesian Logic - The Probability Update

Bayes' theorem updates pre-test probability to post-test probability based on a test result. This is done by converting probabilities to odds, applying a likelihood ratio, and then converting back.

  • Pre-test Odds: Odds of disease before testing.
    • $Pre-test odds = Prevalence / (1 - Prevalence)$
  • Likelihood Ratio (LR): The power of a test to change our certainty.
    • For a positive test: $LR+ = Sensitivity / (1 - Specificity)$
    • For a negative test: $LR- = (1 - Sensitivity) / Specificity$
  • Bayesian Update: The core calculation.
    • $Post-test odds = Pre-test odds × Likelihood Ratio$

⭐ A truly useful diagnostic test has an LR+ > 10 or an LR- < 0.1. These values cause large shifts in post-test probability, often confirming or ruling out a diagnosis.

image

  • Pre-test probability (often prevalence) is the crucial starting point before applying a diagnostic test.
  • Positive Predictive Value (PPV) is directly proportional to prevalence; as disease prevalence , PPV .
  • Negative Predictive Value (NPV) is inversely proportional to prevalence; as disease prevalence , NPV .
  • Sensitivity and Specificity are intrinsic test characteristics and are not affected by disease prevalence.
  • A high-Sensitivity test, when negative, effectively rules out disease (SNOUT).
  • A high-Specificity test, when positive, helps rule in disease (SPIN).

Continue reading on Oncourse

Sign up for free to access the full lesson, plus unlimited questions, flashcards, AI-powered notes, and more.

CONTINUE READING — FREE

or get the app

Rezzy — Oncourse's AI Study Mate

Have doubts about this lesson?

Ask Rezzy, your AI Study Mate, to explain anything you didn't understand

Enjoying this lesson?

Get full access to all lessons, practice questions, and more.

START FOR FREE