Skip to content
AIGP Quest

Comparison

Precision vs recall

Written with AI from the sources below and checked against our facts sheet. Last checked . How this site is made · Spot an error?

The one-line rule

Precision asks: of everything the model flagged, how much was right? Recall asks: of everything really there, how much did the model catch? Precision punishes false alarms; recall punishes misses.

Side by side

PrecisionRecall
Question it answersOf everything flagged, how much was real?Of everything real, how much was flagged?
FormulaTP ÷ (TP + FP)TP ÷ (TP + FN)
Error it penalizesFalse positives (false alarms)False negatives (misses)
Other namesPositive predictive valueSensitivity, true positive rate
Effect of a lower thresholdUsually fallsUsually rises
Affected by how rare positives areYes: the rarer the cases, the harder high precision becomesNo: it only looks at real positives
Favor it whenFalse alarms hurt people or overload reviewersMisses are dangerous or irreversible
Typical systemAutomatic fraud freeze, face match for a suspect listCancer screen, weapons scanner, safety stop
Fairness metric built on itPredictive parity (equal precision across groups)Equal opportunity (equal recall across groups)

TP means true positives, FP false positives and FN false negatives. A memory hook: precision asks about the pile of flags; recall asks about the real cases.

When each applies

Every classifier trades one error for the other. Lower the threshold and the model flags more cases: recall rises and precision usually falls. Raise it and the reverse happens. The Google Machine Learning Crash Course shows this trade-off with worked charts.

Favor recall when a miss is the worse harm. A missed sepsis case can be fatal; a false alarm costs a nurse a few minutes.

Favor precision when a false alarm is the worse harm. An automatic account freeze locks an innocent customer out of their money. A false face match can put the wrong person on a suspect list.

Balance both when the costs are similar. The F1 score combines them, but it assumes both errors cost the same.

Governance adds three checks. Choose the metric and threshold before testing, not after seeing results. Report both numbers by group, since a model can hit its average while failing one population. And remember that the NIST AI RMF MEASURE function expects metrics tied to the system's context and risks.

Worked example

Harrow County's benefits office, a fictional agency, tests a model that flags suspected fraud. In a sample of 20,000 claims, 200 are fraudulent. The model flags 400 claims. Of those, 150 are real fraud and 250 are honest claimants. It misses the other 50 frauds.

  • Accuracy: 19,700 of 20,000 calls are right, or 98.5%. A model that flags nothing scores 99.0%.
  • Precision: 150 of 400 flags, or 37.5%. Most flagged claimants did nothing wrong.
  • Recall: 150 of 200 frauds, or 75%.
  • F1: 50%.

The vendor proposes raising the threshold. Now the model flags 180 claims, 120 of them real fraud. Precision rises to about 67%, and recall falls to 60%.

Which setting is right depends on what a flag does. If a flag triggers a human review, the lower threshold may be fine. If a flag suspends benefits automatically, 250 honest families lose support. The office should favor precision there, add human review, and check both metrics for each group of claimants.

A system that can cut public benefits likely falls under Annex III point 5(a) of the EU AI Act. Its provider must then declare accuracy metrics in the instructions for use under Art. 15(3).

The exam trap

The classic trap is a single headline accuracy figure on rare events. "97% accurate" on a 2% base rate can mean the model catches almost nothing. The right first question asks for recall, false alarms and results by group.

The tells:

  • "Of the cases flagged" signals precision. "Of the actual cases" signals recall.
  • A deadly miss points to recall. A harmful false alarm points to precision.
  • An answer that picks the metric after seeing which one the model passes is wrong.
  • F1 is useful, but an answer offering F1 alone hides which error dominates.

Equal opportunity is a recall comparison across groups, which links this page to algorithmic bias and disparate impact. Practice the confusion matrix in lesson III.B.7.

Frequently asked questions

What is the difference between precision and recall?

Precision is the share of a model's positive predictions that are correct: true positives divided by all flags. Recall is the share of actual positives the model finds: true positives divided by all real cases. High precision means few false alarms. High recall means few misses. Moving the decision threshold usually raises one and lowers the other.

Is it better to have high precision or high recall?

It depends on which error does more harm, and to whom. Favor recall when a miss is dangerous, such as a cancer screen or a weapons scanner. Favor precision when a false alarm is costly, such as an automatic account freeze or a face match that could lead to an arrest. Decide with stakeholders before testing, and record why.

Why is accuracy misleading on imbalanced data?

When one outcome is rare, a model can score high accuracy by predicting the common outcome every time. If 1% of payments are fraud, a model that never flags anything is 99% accurate and catches nothing. Precision and recall expose this, because both focus on the rare positive class.

What is the F1 score?

The F1 score is the harmonic mean of precision and recall: 2 × precision × recall ÷ (precision + recall). It stays close to the weaker of the two, so a model cannot hide a poor recall behind a strong precision. It treats both errors as equally costly, which is often not true in practice.

Does the EU AI Act require precision and recall?

Not by name. Art. 15(3) requires providers of high-risk AI to declare accuracy levels and the relevant accuracy metrics in the instructions for use. Art. 13(3)(b) adds that the instructions must cover the system's level of accuracy and its metrics. For a classifier, precision and recall are typical metrics to declare.

Sources

  1. NIST AI 100-1, AI Risk Management Framework 1.0 (MEASURE function, TEVV)
  2. EU AI Act, Regulation (EU) 2024/1689: Arts. 13(3)(b) and 15(3) on declared accuracy metrics (EUR-Lex)
  3. Google Machine Learning Crash Course: Accuracy, recall, precision and related metrics
Spot an error? Tell us