Calculator for Diagnostic Accuracy Measures

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration calculates various accuracy measures of a diagnostic test for a disease. This is done for differing negative and positive test results of nondiseased and diseased populations. The measures calculated are the positive predictive value ("PPV"), the negative predictive value ("NPV"), the (diagnostic) odds ratio ("OR"), the likelihood ratio for a positive test result ("LR+"), and the likelihood ratio for a negative test result ("LR-"). The negative and positive test results of the nondiseased and diseased populations are selected using the sliders.

Contributed by: Theodora Chatzimichail (April 2018)
(Hellenic Complex Systems Laboratory)
Open content licensed under CC BY-NC-SA



The measures used in the evaluation of the clinical accuracy of a diagnostic test, applied to nondiseased and diseased populations, can be calculated as functions of the sensitivity and the specificity of the test, as well as the prevalence of the disease. Sensitivity is the fraction of the diseased population with a positive test result, while specificity is the fraction of the nondiseased population with a negative test result. Prevalence of the disease is the ratio of the diseased population to the total (nondiseased and diseased) population. If we denote by the sensitivity, the specificity, and the prevalence, we have:






The Demonstration is appropriate as an educational tool for medical students.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.