Calcylator
Positive predictive value

Positive predictive value:
formula and worked example

When a test says yes, how often is it right? That chance is the positive predictive value.

Calcylator Editorial Team

Updated · 5 min read

The chance a positive is real

Positive predictive value (PPV), known as precision in machine learning, is the proportion of positive results that are genuinely positive. It is the question a person actually faces: 'my result came back positive, so how likely is it that I have the condition?'

That differs from sensitivity, which starts from the cases and asks how many the test catches. PPV starts from the positive results and asks how many were correct. The direction of the question changes the answer, and mixing the two is behind many misunderstandings of screening results.

It is equally useful outside medicine: the share of flagged transactions that are truly fraudulent, or the share of alerts that point to a real incident, are both PPVs.

Notice that PPV is the one measure here that can change without anything about the test itself changing. A team that re-deploys a model to a new region, or a clinic that begins testing a different age group, can see PPV shift overnight. That is a property of the population, not a sign that the test has broken.

Formula and inputs

Positive predictive value =true_positives ÷ (true_positives+false_positives) × 100
true_positives:
True positives
false_positives:
False positives
Result is a percentage. The denominator is every positive result, whether correct or not.
  • True positives: positive results where the condition is truly present.
  • False positives: positive results where the condition is absent.

The two are counted from the same group of tested people, so the proportions of true and false positives reflect how common the condition is in that group. Change the group, and the PPV changes with it.

Its mirror is the false discovery rate, which is 100% minus PPV. In the fraud example above, a PPV of 80% corresponds to a false discovery rate of 20%. Some teams find the second framing more useful because it speaks directly about wasted effort, while others prefer to track PPV because it moves in the same direction as quality.

Worked example: 80 right, 20 wrong

A fraud model raises 100 alerts in a week. On investigation, 80 are genuine fraud and 20 are legitimate transactions.

  • True positives

    80

  • False positives

    20

Positive predictive value

80 %

The 100 alerts are all positive results, 80 + 20.

  1. Count all positive results: 80 + 20 = 100.
  2. Divide correct positives by that total: 80 / 100 = 0.80.
  3. Multiply by 100 to get 80%.
  4. The complement, 20%, is the share of alerts that waste an investigator's time.

What 80% tells you, and what it hides

A PPV of 80% means four in five alerts are real. For an investigation team that is a useful signal; for a patient receiving a worrying screening result, it is the number that frames the next conversation. Neither should treat the figure as portable.

The main driver is prevalence. Hold sensitivity and specificity fixed and move the test from a clinic where the condition is common to a general screening setting where it is rare, and PPV falls sharply because false positives from the large healthy group outnumber the true cases. The figure is only valid for the population it was measured in.

Practical thresholds for an acceptable PPV differ by field. An alert system might tolerate a moderate PPV if each check is cheap, while an invasive follow-up demands a higher one.

One more way to sense-check the figure is to ask how many alerts a reviewer can handle. If a team can look at 50 alerts a day and PPV is 80%, they will confirm about 40 genuine cases daily. At a PPV of 20%, the same effort confirms only 10, and the team may start skipping alerts, which quietly turns a good detector into a poor process.

What happens as true positives grow

PPV when true positives rise by 10% and false positives stay at 20
ScenarioTrue positivesCalculated result
Original assumptions8080 %
True positives increased by 10%8881.481 %

Eighty-eight true positives against 20 false positives gives 81.48%, a rise of under two points from a 10% jump in true positives. The result is a mild effect because false positives are still diluting the pool. Cutting false positives from 20 to 10 on the original 80 would lift PPV to about 88.9%, so reducing false alarms is the stronger lever.

The takeaway for model tuning is that precision gains come mainly from trimming false positives. Pushing recall up by flagging more cases usually adds false alarms at the same time and can leave PPV flat or lower.

Misreading predictive value

  • Quoting PPV from a case-control sample where cases were deliberately over-represented. The figure bears no relation to real-world prevalence.
  • Assuming a PPV measured at one site applies at another with different case mix.
  • Confusing it with sensitivity, so that 'the test is 90% accurate' is taken to mean a positive is 90% likely to be right.
  • Ignoring the denominator size. An 80% PPV from 10 positives is much shakier than from 1,000.
  • Forgetting that changing the threshold moves PPV along with sensitivity and specificity.

Finally, watch for survivorship in the data. If only alerts that someone chose to investigate ever get a confirmed outcome, the unreviewed alerts are quietly treated as correct or ignored, and the measured PPV is biased. Make sure every positive, or a random sample of them, receives a ground-truth check.

A quick check you can run

Take 10,000 people and a condition affecting 1% of them, so 100 have it. With 90% sensitivity and 95% specificity, the test finds 90 true cases and flags 5% of the 9,900 healthy people, about 495 false positives. PPV is 90 / (90 + 495), roughly 15%. The same test where 20% have the condition gives a PPV near 82%, from 1,800 true positives against 400 false ones.

Common questions

What is positive predictive value in simple terms?

It is the percentage of positive results that turn out to be correct. If 100 people test positive and 80 truly have the condition, the PPV is 80%, and the other 20 are false alarms.

Why does prevalence affect positive predictive value?

When a condition is rare, most people tested are healthy, so even a small false positive rate produces many false alarms that swamp the true cases. That drags PPV down although the test itself has not changed.

How is PPV different from sensitivity?

Sensitivity asks what share of real cases the test finds, starting from the people who have the condition. PPV asks what share of positive results are real, starting from the people who tested positive.

Is PPV the same as precision?

Yes. Precision in machine learning is true positives divided by all predicted positives, which is the same calculation as positive predictive value in diagnostic testing.

How can you raise positive predictive value?

Test where the condition is more common, raise the threshold to cut false positives, or add a confirmatory test for anyone who screens positive. Each approach has a cost in missed cases or extra effort.

Was this guide helpful?

Continue reading

View all blogs