The Confusion Matrix article ended with a specific question waiting to be answered: of everything the model flagged as positive, how much of it was actually correct? That question, made precise, is exactly what precision measures.
The simple definition
Precision measures what fraction of a model’s positive predictions were actually correct. If a spam filter flags 50 emails as spam, and 45 of those really were spam, its precision is 45/50 = 90%. Precision doesn’t care at all about spam emails the filter missed — it’s entirely focused on one specific question: when the model does say “yes,” how often can you trust it?
Using the four cells from the Confusion Matrix article, precision has a clean, direct formula:
precision = True Positives / (True Positives + False Positives)
In plain terms: of everything the model called positive (True Positives plus False Positives), what fraction was genuinely positive?
Why this specific question matters
Recall from the Confusion Matrix article that False Positives and False Negatives are genuinely different kinds of mistakes, with different real-world costs depending on the task. Precision is the metric that specifically punishes False Positives — a model with lots of False Positives (frequently crying “positive!” when it shouldn’t) will have low precision, even if it also happens to catch most of the real positives. High precision means: when this model raises its hand, you can generally trust it.
flowchart LR
A[Model flags 50 emails as spam] --> B[45 were actually spam: True Positives]
A --> C[5 were actually legitimate: False Positives]
B --> D[Precision = 45 / 50 = 90%]
C --> D
ANALOGY vs. TECHNICAL REALITY
Analogy: Think of a metal detector at airport security. High precision means that when the detector beeps, it’s very likely there’s genuinely something metallic there — few false alarms, few innocent travelers pulled aside unnecessarily. A detector with low precision beeps constantly at things that turn out to be nothing, wasting everyone’s time even if it does eventually catch every real threat.
Where this breaks down: A metal detector’s beep is a single, uniform signal. Precision, calculated from a confusion matrix, is a purely retrospective, calculated statistic — it doesn’t describe how confident any single prediction felt in the moment, only how often the model’s positive calls, in aggregate across many predictions, turned out to be right.
Where high precision matters most
Precision becomes the priority whenever a False Positive is expensive, disruptive, or embarrassing, and the task can tolerate occasionally missing a real positive. A content moderation system that wrongly flags and removes legitimate posts as violations frustrates users and damages trust — high precision matters here, since each false flag has a real, visible cost. A recommendation engine suggesting a product a user doesn’t want is a low-stakes False Positive, so precision matters less there than in the content moderation case.
Calculate precision step by step
In the shared screening example, the model made 26 positive predictions:
18 were truly positive (TP)
8 were actually healthy (FP)
precision = TP ÷ (TP + FP)
= 18 ÷ (18 + 8)
= 18 ÷ 26
≈ 0.692
≈ 69.2%
Plain-English reading:
When this model says “positive,” it is correct about 69 times out of 100.
Precision does not use true negatives or false negatives in its formula. Its attention stays on the model’s positive predictions.
Improve precision by reducing false positives
Suppose a stricter threshold changes TP = 18, FP = 8 into TP = 16, FP = 2:
old precision = 18 ÷ 26 ≈ 69.2%
new precision = 16 ÷ 18 ≈ 88.9%
Precision improved, but two additional sick people were missed. This is the precision–recall trade-off: reducing false alarms can also reduce the number of real cases found.
A concrete example, layered
For a simple beginner example: a weather app that predicts “rain today” needs decent precision — if it cries “rain” constantly and is wrong half the time, people will stop trusting its rain warnings entirely, even on the days it’s genuinely right. For a production example: a bank’s fraud detection model with low precision — frequently flagging legitimate transactions as fraudulent — creates real customer friction, blocked purchases, and support calls; banks specifically track and tune for precision on their fraud models precisely because a high False Positive rate, even in service of catching more real fraud, carries a genuine, measurable business cost in customer trust and operational overhead.
Why precision alone isn’t the whole picture either
It’s worth being honest about a real limitation here, one the next article addresses directly: a model can achieve extremely high precision by being very conservative — only flagging something as positive when it’s almost certain, and staying silent otherwise. Taken to an extreme, a model that only ever flags the single most obvious spam email in a dataset, and stays silent on everything else, could achieve 100% precision (that one flag was correct) while missing the vast majority of real spam entirely. Precision alone doesn’t punish this kind of overly cautious behavior — which is exactly the gap the next article, Recall, is built to catch.
Real AI-agent example: precision means fewer unnecessary interruptions
OpenAI reports 90% precision for the prompt-injection monitor evaluated in the Operator System Card.
In plain language, among the cases the monitor classified as prompt-injection attempts in that evaluation, about 90% truly were attacks. The remaining portion represents false alarms.
For an agent, false alarms matter because the system may pause and ask the user for confirmation even when a webpage is safe. Higher precision reduces those unnecessary interruptions. However, optimizing only for precision could make the monitor quieter by flagging very few pages while allowing genuine attacks through.
Common misconception
A frequent beginner assumption: that “high precision” simply means “a good, reliable model” in some general sense. As the section above explained, this isn’t quite right — a model can achieve outstanding precision by being extremely conservative about what it flags, at the cost of missing most real positive cases entirely. Precision only tells you about the trustworthiness of the model’s positive predictions; it says nothing on its own about how many real positives the model actually managed to catch in the first place.
Where this fits in what comes next
You now understand precision: how trustworthy the model’s positive predictions are. The next article, Recall, covers the natural counterpart — of all the real positive cases that existed, how many did the model actually catch? Together, these two metrics reveal a genuine trade-off that a single accuracy number, or even precision alone, can never fully capture.
In one sentence
Precision measures how trustworthy a model’s positive predictions are — the fraction of flagged cases that were genuinely correct — and it’s the metric to prioritize whenever a false alarm is costly, though it says nothing, on its own, about how many real positive cases the model actually managed to catch.
Related Terms
- Author
- TechByteByByte Editorial Team
- Reviewed by
- TechByteByByte Admin
- Published
- Last reviewed