Dark Mode

Bayesian Test Results Calculator

Understanding how test results affect probability

1%
90%
5%

Understanding the Inputs:

These sliders control the key components of Bayes' Theorem for this scenario:

  • Prevalence (Base Rate): Corresponds to the Prevalence term in the formula – the initial probability of the condition before testing.
  • Sensitivity: Relates to the likelihood of a positive test if the condition *is* present (used in Prevalence × Sensitivity).
  • False Positive Rate: The probability of a positive test if the condition *is not* present (used in (1 – Prevalence) × FalsePositiveRate).

Adjust them to see how each impacts the final calculated probability below.

What does a positive test mean?

Given a positive test result, the probability that the condition is present:

16.1%

Visual Representation

Interpretation

With these parameters, even after a positive test, there's only a 16.1% chance the condition is actually present.

Historical Context: Bayes' Theorem

1701-1761:

Thomas Bayes, an English statistician and Presbyterian minister, developed the theorem but never published it during his lifetime.

1763:

Richard Price, Bayes' friend, found the work after Bayes' death and published "An Essay towards solving a Problem in the Doctrine of Chances."

1774:

Pierre-Simon Laplace independently developed and extended the theorem, bringing it into mainstream mathematics.

1950s-1960s:

After being largely overlooked for nearly two centuries, Bayesian methods experienced a resurgence with advances in computing power.

Present day:

Bayes' theorem is now fundamental in medicine, law, machine learning, and many other fields where updating beliefs based on new evidence is critical.

How It Works: Bayes' Theorem

P(Condition | Positive) =
Prevalence × Sensitivity (Prevalence × Sensitivity) + ((1 – Prevalence) × FalsePositiveRate)

Key Insights:

  • When a condition is rare, even a good test can yield many false positives relative to true positives.
  • The impact of a positive test depends primarily on the event's prevalence and the test's false positive rate.
  • If the initial probability (prevalence) of a condition is extremely low, a positive test might not substantially raise the final probability.
  • This is why medical screening for rare conditions often requires follow-up testing.
  • The "base rate fallacy" occurs when people ignore the prior probability (prevalence) and overestimate the meaning of a positive test.