Prevalence Predictive Values

Compute positive and negative predictive values from explicit prevalence, sensitivity, and specificity rather than observed classification counts.

Description

Calculate positive and negative predictive values and the expected positive-test fraction from supplied prevalence, sensitivity, and specificity.

Sensitivity is the probability of a positive test among people with the target condition; specificity is the probability of a negative test among those without it. Predictive values reverse that conditioning: positive predictive value asks how often a positive result corresponds to the condition, while negative predictive value asks how often a negative result corresponds to its absence.1

Predictive values depend on prevalence as well as test performance. When the condition is uncommon, false positives among the larger unaffected group can account for a substantial fraction of positive results. The expected positive-test fraction therefore differs from prevalence.

Prevalence Predictive Values applies those supplied probabilities to a hypothetical population. It returns fractions, not percentages, and does not estimate test performance from observed classification counts.

When to compare predictive values across prevalence assumptions

Use the tool when sensitivity and specificity estimates are available and a relevant population prevalence has been chosen. It makes the consequences of that prevalence assumption visible without inventing a population size.

  • Compare otherwise matched testing scenarios at different prevalences.
  • Calculate the expected fraction of positive results.
  • Check the distinction between sensitivity and positive predictive value.

How to enter test probabilities and calculate predictive values

  1. Enter Sensitivity fraction, Specificity fraction, and Prevalence fraction between 0 and 1; enter 0.9 for 90%.
  2. Run the calculation and read Positive predictive value and Negative predictive value.
  3. Read Positive test probability as the expected fraction of all tests that are positive under the assumptions.
  4. Retain the population definition and performance estimates alongside the result.
q+ = s×p + (1−c)×(1−p); q− = (1−s)×p + c×(1−p); PPV = s×p/q+; NPV = c×(1−p)/q−

s is sensitivity, c specificity, and p prevalence. True and false result probabilities are combined before conditioning on each test result.

The implementation checks both result probabilities are strictly positive before returning any outputs. If either positive or negative results are impossible under the supplied inputs, it rejects the calculation because the corresponding predictive value is undefined. It does not return only the other predictive value.

json
{
  "input": {
    "sensitivityFraction": 0.9,
    "specificityFraction": 0.9,
    "prevalenceFraction": 0.1
  },
  "output": {
    "positivePredictiveValue": 0.5,
    "negativePredictiveValue": 0.9878048780487805,
    "positiveTestProbability": 0.18
  }
}

Boundary fractions are allowed when both denominators remain positive. A perfect test at prevalence zero or one produces an input error because one result category has probability zero.

Limitations of assumed-population predictive values

  • The calculation supplies no uncertainty interval or adjustment for population differences in test performance.
  • Prevalence must describe the population being tested. The tool does not infer it from the positive-test fraction.
  • Repeated testing, dependent results, reference-standard errors, and changing disease stages are not modeled.
  • These are population probabilities under supplied assumptions; no individual diagnosis or treatment decision is established.

Alternative or Complementary observed classification measures

If labeled outcome counts are available, calculate observed precision or specificity directly and retain the study population. Precision corresponds to observed PPV, while specificity measures a different conditional probability.

References

  1. Statistical Guidance on Reporting Results from Studies Evaluating Diagnostic Tests — U.S. Food and Drug Administration (2007 guidance)

Similar or alternative tools

  • Precision

    Calculate observed positive predictive value from true-positive and false-positive counts.

  • Specificity

    Calculate specificity from true-negative and false-positive counts.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies