zepid.calc.utils.ppv_converter

zepid.calc.utils.ppv_converter(sensitivity, specificity, prevalence)

Generates the positive predictive value from designated sensitivity, specificity, and prevalence.

Positive predictive value is calculated using

\[PPV = \frac{Se \times P}{Se \times P + (1-Sp) (1-P)}\]
Parameters:
  • sensitivity (float) – Sensitivity of the testing criteria
  • specificity (float) – Specificity of the testing criteria
  • prevalence (float) – Prevalence of the outcome in the population
Returns:

Positive predictive value

Return type:

float

Examples

Calculate the positivity predictive value

>>> from zepid.calc import ppv_converter
>>> ppv_converter(0.9, 0.88, 0.15)