Introduction
A prediction system can make two different kinds of mistakes: it can flag something that is not actually present, or it can fail to flag something that is. Precision and recall describe these errors from different angles. Together, they help explain whether a system’s positive predictions are trustworthy and whether it finds most of the positive cases that matter.
- What Precision and Recall Measure
- The Four Outcomes Behind the Measures
- How the Types of Mistakes Differ
- A Simple Example of Precision and Recall
- Why Improving One Measure Can Reduce the Other
- Choosing Which Measure Matters More
- Combining Precision and Recall with the F1 Score
- Why the Size and Mix of the Data Matter
- Common Misunderstandings
- Conclusion
What Precision and Recall Measure
Precision and recall are measures used to evaluate a system that sorts examples into categories, especially when one category is treated as the positive result. For instance, an email filter might label a message as spam, or a photo tool might identify an image as containing a particular object. The system’s predictions can then be compared with the correct labels.
Precision asks: Of all the items the system predicted as positive, how many really were positive? It measures how reliable positive predictions are.
Recall asks: Of all the items that really were positive, how many did the system successfully identify? It measures how completely the system finds positive cases.
These questions focus on different groups. Precision starts with the system’s positive predictions and checks how many are correct. Recall starts with the actual positive cases and checks how many were found. As a result, a system can have high precision but low recall, or high recall but low precision.
The Four Outcomes Behind the Measures
To understand the formulas, it helps to sort results into four groups. A true positive is a positive case correctly identified. A false positive is a negative case incorrectly labeled positive. A false negative is a positive case the system missed. A true negative is a negative case correctly labeled negative.
Imagine a tool that checks a collection of messages and flags some as spam. A message that is spam and gets flagged is a true positive. A legitimate message that gets flagged is a false positive. Spam that passes through is a false negative. A legitimate message that is not flagged is a true negative.
Precision is calculated as true positives divided by all positive predictions: true positives divided by true positives plus false positives. Recall is calculated as true positives divided by all actual positive cases: true positives divided by true positives plus false negatives.
In plain English, precision penalizes false alarms, while recall penalizes missed cases. True negatives matter to many other evaluation measures, but they do not appear directly in either of these formulas.
How the Types of Mistakes Differ
False positives: the cost of an incorrect alert
A false positive occurs when a system raises a positive flag even though the case is negative. If a search tool labels an unrelated document as a match, that is a false positive. If a filter marks a wanted message as unwanted, that is another example.
False positives can waste a person’s time, reduce confidence in a system, or lead to unnecessary follow-up. When there are many of them, users may begin to ignore alerts, including accurate ones. High precision is therefore valuable when each positive prediction needs to be dependable or when reviewing false alarms is costly.
False negatives: the cost of a missed case
A false negative occurs when a system fails to identify a case that is actually positive. A search tool that overlooks a relevant document has made a false negative. So has a filter that lets a spam message through.
False negatives matter when missing a positive case is more costly than checking an extra alert. A system designed to find as many relevant items as possible may prioritize recall, accepting that it will also return some items that are not relevant. The appropriate balance depends on what happens after a prediction is made.
A Simple Example of Precision and Recall
Suppose a document search system is tested on a set containing 20 relevant documents. It returns 10 documents, and 8 of those are relevant. The 8 relevant results are true positives, while the 2 irrelevant results are false positives. The 12 relevant documents it did not return are false negatives.
Its precision is 8 out of 10, or 80 percent: four out of every five returned documents are relevant. Its recall is 8 out of 20, or 40 percent: the system found two out of every five relevant documents in the test set.
This result tells a clearer story than saying the system is simply “80 percent accurate.” The returned results are mostly useful, but the system misses many relevant documents. Someone who wants a short, dependable list may value the precision. Someone conducting a broad search may be more concerned about the low recall.
Why Improving One Measure Can Reduce the Other
Many prediction systems assign a score to each case and then use a threshold to decide which scores count as positive. Raising the threshold means that only stronger candidates are flagged. This often reduces false positives and increases precision, but it can also cause more actual positives to be missed, lowering recall.
Lowering the threshold usually has the opposite effect. More cases are flagged, which can catch additional positives and raise recall. However, some of those extra predictions may be wrong, reducing precision. This is a common trade-off, not a mathematical rule that every small threshold change must produce the same result in every dataset.
The threshold should reflect the purpose of the system and the costs of its errors. A broad discovery tool may be set to return more possibilities for a person to review. A system that sends only a limited number of alerts may need to keep false alarms low. Neither setting is automatically best; the decision depends on the task, available follow-up, and consequences of mistakes.
Choosing Which Measure Matters More
Precision is often especially useful when false positives are disruptive. For example, a team reviewing flagged records may have limited time and prefer a smaller set in which most entries are genuine matches. High precision means fewer wasted checks, although it does not guarantee that the system finds every match.
Recall is often especially useful when missing positive cases is the main concern. A researcher searching for relevant material might prefer a wider set of results, then remove unrelated items during review. High recall means fewer positives are overlooked, although the result list may contain more false alarms.
Some tasks need both. A system that returns nearly everything may have high recall but little practical value if most results are wrong. A system that returns only a few near-certain matches may have high precision but be inadequate if it misses most of the cases. Evaluation should therefore connect the measures to real decisions rather than treating either number as a universal score of quality.
Combining Precision and Recall with the F1 Score
When a single summary is useful, precision and recall can be combined in the F1 score, which is their harmonic mean. The harmonic mean gives more weight to the lower of the two values than a simple arithmetic average would. As a result, a very low precision or recall pulls the F1 score down.
The F1 score is useful for comparing systems when both precision and recall matter and a balanced summary is desired. However, it does not decide which errors are more costly. It also leaves out true negatives and may not reflect the practical value of different cases. A score that combines measures cannot replace an explanation of the task’s priorities.
Other combined measures can give greater emphasis to precision or recall, but their usefulness also depends on the setting. Whenever a summary score is reported, it is helpful to show precision and recall alongside it so readers can see what the combined number hides.
Why the Size and Mix of the Data Matter
Precision can change when the proportion of positive cases changes. Suppose a system is used in two collections, one containing many positive cases and another containing very few. Even if the system behaves similarly in both, positive predictions in the second collection may include a larger share of false positives. This is one reason results from a carefully selected test set may not carry over directly to everyday use.
Recall is calculated among actual positive cases, so its value is not directly defined by the number of negatives in the same way. Still, recall can vary if the positive cases in a new setting differ from those in the evaluation data. For example, they may be harder to identify or may come from a different source.
Evaluation results are most informative when the test data resemble the conditions in which the system will be used. It is also important to define what counts as positive, how labels were established, and whether the data include enough examples to make the reported measures meaningful.
Common Misunderstandings
High accuracy does not necessarily mean high precision or recall. Accuracy counts all correct predictions, including true negatives. If positive cases are rare, a system can be correct on many negatives while still missing many positives. Precision and recall make the positive-class errors more visible.
Precision and recall are not interchangeable. Precision concerns the quality of positive predictions; recall concerns the coverage of actual positives. Saying a system has “good results” without specifying which measure is strong can hide an important weakness.
A high score is not automatically a good decision. The measures describe performance against chosen labels and data. They do not establish whether the labels are appropriate, whether the system is fair in every use, or whether acting on its predictions is worthwhile. Those questions require additional evaluation and context.
Conclusion
Precision and recall reveal different kinds of prediction mistakes. Precision shows how often positive predictions are correct, making false alarms easier to see. Recall shows how many actual positive cases are found, making missed cases easier to see. Looking at both, along with the task’s real costs and test data, gives a more useful picture than relying on a single score.

