🩺Bayes Theorem Test Accuracy Calculator

See why false positives pile up, in a table of 100,000 people

%
%
%

How to use the Bayes theorem test accuracy calculator

The chance that a positive result means real disease is not settled by test accuracy alone. How common the condition is, the prevalence, has to go into the sum as well, and that is the heart of Bayes theorem. Enter prevalence, sensitivity and specificity and the calculator returns the positive and negative predictive values. Prevalence is the pre-test probability, and the positive predictive value is the post-test probability once a positive result is in hand.

The table for 100,000 people is there because the false positive puzzle only makes sense in counts. With 1% prevalence, 99% sensitivity and 95% specificity, the test catches 990 of the 1,000 patients but also flags 4,950 of the 99,000 healthy people. Of the 5,940 positives only 990 truly have the disease, so the positive predictive value is about 16.7%. Nothing is wrong with the test: healthy people simply outnumber patients by a wide margin.

The positive likelihood ratio divides sensitivity by the false positive rate, so a specificity of 100% makes the denominator zero and leaves it undefined, and when nobody tests positive the predictive value is undefined too. Those cases are labelled rather than guessed. Table counts are rounded to whole people for display while the predictive values are computed from the unrounded figures.

Frequently asked questions

Why is the positive predictive value low when sensitivity is 99%?

When prevalence is low the healthy group is far larger, so false positives outnumber true patients. The positive predictive value climbs as prevalence rises.

How do sensitivity and specificity differ?

Sensitivity is the share of patients flagged positive, while specificity is the share of healthy people correctly cleared. Low specificity means more false positives.

Can the positive likelihood ratio be undefined?

Yes. It divides sensitivity by one minus specificity, so a specificity of 100% divides by zero and leaves the ratio undefined.