Correlation of Positive and Negative Predictive Values of Diagnostic Tests

Theodora Chatzimichail, MD  
tc@hcsl.com

Hellenic Complex Systems Laboratory, Kostis Palamas 21, 66131 Drama, Greece.

Initialization Code

spec[x_,μD_,μH_,σD_,σH_]:=
CDF[NormalDistribution[μH,σH],InverseCDF[NormalDistribution[μD,σD],1-x]]

ppv[x_,μD_,μH_,σD_,σH_,pd_]:=(x pd)/(x pd+(1-spec[x,μD,μH,σD,σH])(1-pd))

npv[x_,μD_,μH_,σD_,σH_,pd_]:=(spec[x,μD,μH,σD,σH](1-pd))/(spec[x,μD,μH,σD,σH](1-pd)+(1-x)pd)

Manipulate[
Labeled[ParametricPlot[{ppv[x,μD,μH,σD,σH,pd],npv[x,μD,μH,σD,σH,pd]},{x,0.001,0.999},AspectRatio->1,AxesLabel->{"PPV","NPV"},PlotStyle->{RGBColor[1,.47,0]} ,ImageSize->1.125{350,375}],Text@"negative predictive value versus positive predictive value curve",Top],

Style["prevalence of disease",Bold],
{{pd,0.05,""},0.00000001,.99,ImageSize->Tiny,Appearance->"Labeled"},
"",
Style["nondiseased population",Bold],
{{μH,0,"mean"},0,6,.01,ImageSize->Tiny,Appearance->"Labeled"},
{{σH,1,"standard deviation"},0.01,6,.01,ImageSize->Tiny,Appearance->"Labeled"},
"",
Style["diseased population",Bold],
{{μD,3.67,"mean"},0,6,.01,ImageSize->Tiny,Appearance->"Labeled"},
{{σD,1,"standard deviation"},0.01,6,.01,ImageSize->Tiny,Appearance->"Labeled"},
SaveDefinitions->True,AutorunSequencing->{1,2,6},TrackedSymbols:> { pd, μH, σH, μD,σD },ControlPlacement->Left]

Description

This Demonstration examines the correlation of the negative predictive value (NPV) and the positive predictive value (PPV) of a diagnostic test for normally distributed nondiseased and diseased populations. Differing levels of prevalence of the disease are considered. The mean and standard deviation of the populations, measured in arbitrary units, are used.

Snapshots

Details

The PPV and NPV that are used in the evaluation of the clinical accuracy of a diagnostic test applied to a diseased or nondiseased population can be calculated given the sensitivity and specificity of the test. Sensitivity is the fraction of the diseased population with a positive test, while specificity is the fraction of the nondiseased population with a negative test. If we denote by sens the sensitivity, spec the specificity and pr the prevalence, then:

PPV=((sens × pr)/(sens × pr + (1-spec)(1-pr))),

NPV=((spec(1-pr))/(spec(1-pr) + (1-sens)pr)).

Given a diseased and a nondiseased population, the specificity can be defined as a function of sensitivity; therefore, we can plot PPV versus NPV (a parametric plot).

The population data in the snapshots describes a bimodal distribution of serum glucose measurements in nondiabetic and diabetic populations [1].

This Demonstration is based on [2].

References

[1] T.-O. Lim, R. Bakri, Z. Morad and M. A. Hamid, "Bimodality in Blood Glucose Distribution: Is It Universal?," Diabetes Care, 25(12), 2002 pp. 2212–2217. doi:10.2337/diacare.25.12.2212.

[2] A. T. Hatjimihail. "Uncertainty of Measurement and Diagnostic Accuracy Measures," from the Wolfram Demonstrations Project—A Wolfram Web Resource. demonstrations.wolfram.com/UncertaintyOfMeasurementAndDiagnosticAccuracyMeasures.

Keywords

sensitivity

specificity

diagnostic test

clinical accuracy

diagnostic accuracy

normal distribution

binormal distribution

positive predictive value

negative predictive value

Related Links

Uncertainty of Measurement and Diagnostic Accuracy Measures

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

Correlation of Positive and Negative Predictive Values of Diagnostic Tests
Version Number 1.1.0
Hellenic Complex Systems Laboratory 2021
First published at Wolfram Demonstrations Project at: (HyperlinkURL["demonstrations.wolfram.com/CorrelationOfPositiveAndNegativePredictiveValuesOfDiagnostic/", https://demonstrations.wolfram.com/CorrelationOfPositiveAndNegativePredictiveValuesOfDiagnostic/])
The notebook is distributed under  an Attribution - NonCommercial - ShareAlike 4.0 International Creative Commons License.