ABSTRACT (original article)
Background: In medical diagnostics, estimating post-test or posterior probabilities for disease, positive and negative predictive values, and their associated uncertainty is essential for patient care.
Objective: The aim of this work is to introduce a software tool developed in the Wolfram Language for the parametric estimation, visualization, and comparison of Bayesian diagnostic measures and their uncertainty.
Methods: This tool employs Bayes’ theorem to estimate positive and negative predictive values and posterior probabilities for the presence and absence of a disease. It estimates their standard sampling, measurement, and combined uncertainty, as well as their confidence intervals, applying uncertainty propagation methods based on first-order Taylor series approximations. It employs normal, lognormal, and gamma distributions.
Results: The software generates plots and tables of the estimates to support clinical decision-making. An illustrative case study using fasting plasma glucose data from the National Health and Nutrition Examination Survey (NHANES) demonstrates its application in diagnosing diabetes mellitus. The results highlight the significant impact of measurement uncertainty on Bayesian diagnostic measures, particularly on positive predictive value and posterior probabilities.
Conclusion: The software tool enhances the estimation and facilitates the comparison of Bayesian diagnostic measures, which are critical for medical practice. It provides a framework for their uncertainty quantification and assists in understanding and applying Bayes’ theorem in medical diagnostics.
CITATION (original article): Chatzimichail T, Hatjimihail AT. A Software Tool for Applying Bayes’ Theorem in Medical Diagnostics. BMC Med Inform Decis Mak. 2024;24:399. https://doi.org/10.1186/s12911-024-02721-x
Background: In medical diagnostics, estimating post-test or posterior probabilities for disease, positive and negative predictive values, and their associated uncertainty is essential for patient care.
Objective: The aim of this work is to introduce a software tool developed in the Wolfram Language for the parametric estimation, visualization, and comparison of Bayesian diagnostic measures and their uncertainty.
Methods: This tool employs Bayes’ theorem to estimate positive and negative predictive values and posterior probabilities for the presence and absence of a disease. It estimates their standard sampling, measurement, and combined uncertainty, as well as their confidence intervals, applying uncertainty propagation methods based on first-order Taylor series approximations. It employs normal, lognormal, and gamma distributions.
Results: The software generates plots and tables of the estimates to support clinical decision-making. An illustrative case study using fasting plasma glucose data from the National Health and Nutrition Examination Survey (NHANES) demonstrates its application in diagnosing diabetes mellitus. The results highlight the significant impact of measurement uncertainty on Bayesian diagnostic measures, particularly on positive predictive value and posterior probabilities.
Conclusion: The software tool enhances the estimation and facilitates the comparison of Bayesian diagnostic measures, which are critical for medical practice. It provides a framework for their uncertainty quantification and assists in understanding and applying Bayes’ theorem in medical diagnostics.
CITATION (original article): Chatzimichail T, Hatjimihail AT. A Software Tool for Applying Bayes’ Theorem in Medical Diagnostics. BMC Med Inform Decis Mak. 2024;24:399. https://doi.org/10.1186/s12911-024-02721-x
Software synopsis
Software synopsis
The Bayesian Diagnostic Insights software program is a specialized computational tool developed to assist medical professionals and researchers in diagnostics . The program allows for the calculation and plotting of four Bayesian diagnostic measures : positive predictive value[P (D│T > t)], negative predictive value[P (│T < t)], posterior probability for disease[P (D│T = t)], and posterior probability for the absence of disease[P (│T = t)] . By utilizing the principles of uncertainty propagation, the program allows for the calculation and plotting of the sampling, measurement, and combined uncertainty of these measures, as well as the associated confidence intervals .
D
D
Interface overview
Interface overview
About the program controls
About the program controls
Users may define the numerical settings with menus or sliders. Sliders are finely manipulated by pressing the alt or opt key while dragging the mouse. Pressing the shift or ctrl keys can even more finely manipulate them. Dragging with the mouse while pressing the ctrl, alt, or opt keys zooms plots in or out. When the mouse cursor is positioned over a point on a curve in a plot, the coordinates of that point are displayed, and vertical drop lines are drawn to the respective axes.
Modules and submodules
Modules and submodules
The program is organized into four primary modules, each with multiple submodules:
Diagnostic measures plots
Diagnostic measures plots
Plots: a) 𝑃(𝐷|𝑇≥𝑡) and 𝑃(𝐷|𝑇=𝑡) b) P (│T < t) and P (│T = t) versus: a) The measurement value 𝑡 b) The prior probability or prevalence of disease 𝑣
D
D
Diagnostic measures tables
Diagnostic measures tables
For a measurement value 𝑡, the following measures are tabulated: a) 𝑃(𝐷|𝑇≥𝑡), b) 𝑃(𝐷|𝑇=𝑡) c) P (│T < t) d) P (│T = t) The above modules allow the user to define: a) The prior probability or prevalence of disease 𝑣. b) The mean and standard deviation of the measurements of a diseased and a nondiseased population. c) The univariate distribution the measurements of each population (normal, lognormal, gamma). d) The measurement value 𝑡.
D
D
Standard uncertainty plots
Standard uncertainty plots
Plots: a) The standard sampling, measurement, and combined uncertainty b) The relative standard sampling, measurement, and combined uncertainty c) The associated confidence intervals of: a) 𝑃(𝐷|𝑇≥𝑡) and 𝑃(𝐷|𝑇=𝑡) b) P (│T < t) and P (│T = t) versus: a) The measurement value 𝑡 b) The constant contribution to measurement uncertainty c) The measurement uncertainty proportionality constant d) The total size of the population sample n e) The prior probability for disease 𝑣
D
D
𝑏
0
𝑏
1
Standard uncertainty tables
Standard uncertainty tables
The program tabulates the standard sampling, measurement, and combined uncertainty, and relative uncertainty and the associated confidence intervals of: a) 𝑃(𝐷|𝑇≥𝑡), b) 𝑃(𝐷|𝑇=𝑡) c) P (│T < t) d) P (│T = t) for a user-defined measurement value t and all the possible combinations of the distributions. Each of the above modules allows users to define: a) The size, mean, and standard deviation of the measurements of a diseased and a nondiseased population sample. b) The univariate distribution of the measurements of each population (normal, lognormal, gamma). c) A linear [(𝑥) ≅+𝑡] or nonlinear [(𝑥) =+] equation of the measurement uncertainty versus the measurement value t, and the number of the quality control (QC) measurements used to derive it. d) The measurement value t. e) The confidence level p of confidence intervals.
D
D
𝑢
m
𝑏
0
𝑏
1
𝑢
m
2
𝑏
0
2
𝑏
1
2
t
Notation and abbreviations
Notation and abbreviations
Parameters
Parameters
t : measurement value of a diagnostic test : mean of the measurements of the diseased population : standard deviation of the measurements of the diseased population \b: mean of the measurements of the nondiseased population : standard deviation of the measurements of the nondiseased population : size of a diseased population sample : mean of the measurements of diseased population sample : standard deviation of the measurements of diseased population sample : size of nondiseased population sample : mean of the measurements of a nondiseased population sample : standard deviation of the measurements of a nondiseased population sample 𝑣 : prior probability or prevalence of disease : number of quality control measurements : constant contribution to measurement uncertainty : measurement uncertainty proportionality constant p: confidence level (z): standard combined uncertainty of z(z): standard measurement uncertainty of z(z): standard sampling uncertainty of zn: sample sizer: ratioLCL: lower confidence limitUCL: upper confidence limit
𝜇
D
𝜎
D
𝜇
𝐷
𝜎
𝐷
𝑛
D
𝑚
D
s
D
𝑛
D
𝑚
D
s
D
𝑛
U
𝑏
0
𝑏
1
u
c
u
m
u
s
Bayesian diagnostic measures
Bayesian diagnostic measures
P(D|T⩾t): positive predictive value
P(|T<t): negative predictive value
P(D|T=t): Bayesian probability for disease
P(|T=t): Bayesian probability for the absence of disease
P(
D
P(D|T=t): Bayesian probability for disease
P(
D
Definitions
Definitions
The program
The program
Disclaimer of warranties
Disclaimer of warranties
The notebook is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or Hellenic Complex Systems Laboratory or any of its members be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the notebook or the use or other dealings in the notebook.
About
About
Bayesian Diagnostic Insights
Version 2.1.1
Hellenic Complex Systems Laboratory 2025
This notebook is distributed under an Attribution - NonCommercial - ShareAlike 4.0 International Creative Commons License.
Version 2.1.1
Hellenic Complex Systems Laboratory 2025
This notebook is distributed under an Attribution - NonCommercial - ShareAlike 4.0 International Creative Commons License.
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
A software tool for applying Bayes' theorem in medical diagnostics
by Theodora Chatzimichail & Aristides T. Hatjimihail
Wolfram Community, STAFF PICKS, January 8, 2025
https://community.wolfram.com/groups/-/m/t/3353619
by Theodora Chatzimichail & Aristides T. Hatjimihail
Wolfram Community, STAFF PICKS, January 8, 2025
https://community.wolfram.com/groups/-/m/t/3353619