Precision: the denominator contains positive predictions
First specify the positive class, such as “relevant message”. TP counts relevant messages marked relevant. FP counts irrelevant messages given that same positive flag. Both belong to predicted positives, but only TP actually belongs to the positive class. Precision is the ratio of these counts. Matrix layouts vary, so read the row and column labels before taking numbers from a table.[1][2]
Rows: actual classes (+, −); columns: predictions (+, −). The first column supplies the denominator.[1]
With a positive denominator, the ratio lies between 0 and 1. Multiply by 100 to express it as a percentage. “Positive predictive value”, or PPV, names the same metric here. The everyday word “accuracy” is not an interchangeable technical term: classification accuracy uses all four cells, while measurement precision concerns a different statistical concept.[1]
Example 1: how reliable are the positive flags?
72 correct and 18 incorrect positive alerts
- Given
- An original exercise has 72 true-positive and 18 false-positive flags. The remaining matrix cells are not needed for this calculation.
- Find
- Find precision as a fraction and percentage.
All positive predictions form the denominator.
The numerator counts only cases that actually are positive.
Result: 80% of positive flags are correct. Within these flags, 20% are false alerts.
Check: 72 and 18 total 90. The correct share 72/90 and error share 18/90 add to 1; nothing has been inferred about unflagged messages.
The error share among positive flags is the false discovery rate, equal to 1 − precision when defined. The false positive rate has a different denominator: FP + TN, all actual negatives. Therefore 80% precision implies 20% false discovery rate, but does not by itself imply a 20% false positive rate.[2]
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Example 2: identical class rates, different predictive value
Why a score does not transfer unchanged to every population
- Given
- Two constructed evaluations both have 80% recall and 2% false positive rate. A contains 100 actual positives and 100 negatives; B contains 10 positives and 1000 negatives. Holding the class rates constant is an explicit assumption.
- Find
- Compare precision in the two evaluations.
Class counts and the assumed rates give the counts for A.
The rarer positive class in B yields fewer true alerts, while more actual negatives produce false alerts.
Result: In this comparison precision drops from about 97.56% to 28.57%, even though the two assumed class rates stay fixed.
Check: A has 2 false positives out of 100 negatives, B has 20 out of 1000. Both rates really are 2%. This is a calculated model scenario, not a claim about a real product.
Threshold, positive class and test population are part of the result. Comparing thresholds on the same held-out test set differs from comparing populations. Raising the threshold shrinks the set of positive predictions, but does not guarantee higher precision on every finite dataset: the composition of the removed predictions matters too.[1][2]
Zero cases and limits of interpretation
Without any positive prediction there is no empirical correct share among positive predictions.[1]
The calculator reports this case as undefined. A library may use a documented replacement or NaN instead; that is a computational convention. In contrast, TP = 0 with FP > 0 gives a well-defined zero: positive predictions existed, but none was correct. Precision of 1 also does not prove perfect classification. With a positive denominator, it establishes only FP = 0; many actual positives might still have been missed.[1]
Recall answers the complementary question about detected actual positives. The F1 score combines precision and recall, while Balanced Accuracy averages the detection rates of both actual classes. Choose complementary measures for the task rather than treating one number as a complete evaluation.[1]
Five exercises: count, rearrange and question
Calculate · Foundation
A sorter has TP = 54 and FP = 6. Calculate precision as a percentage.
Show hint
The denominator includes incorrect positive flags too.
Learning goal: Identify positive predictions as the correct reference set.
Show solution and calculation
There are 54 correct flags among 60 positive predictions.
Hence P = 54/60 = 0.90 = 90%.
This says nothing about how many actual positives were missed.
Rearrange · Application
Exactly 60 cases are marked positive. Exact precision is 75%. How many flags are correct and how many are incorrect?
Show hint
The given 60 already equals TP + FP.
Learning goal: Recover integer counts from an exact ratio and reference count.
Show solution and calculation
P = TP/60 gives TP = 0.75 × 60 = 45.
The remaining FP = 60 − 45 = 15.
Check 45/(45 + 15) = 0.75.
A rounded score would not necessarily identify unique counts.
Error analysis · Application
Someone says “80% precision means a 20% false positive rate.” Disprove this using TP = 40, FP = 10 and TN = 190.
Show hint
Compare FP/(TP + FP) with FP/(FP + TN).
Learning goal: Distinguish false discovery rate from false positive rate.
Show solution and calculation
Precision is 40/50 = 0.80.
Among positive predictions, 10/50 = 20% are false: that is false discovery rate.
False positive rate is instead 10/200 = 5%.
The error is the choice of denominator.
Interpret · Application
Two filters both have TP = 10 and FP = 0. A misses 90 actual positives; B misses only 2. What can you decide from precision alone?
Show hint
FN does not appear in the precision formula.
Learning goal: Separate perfect reliability of positive flags from complete detection.
Show solution and calculation
Both have precision 1: every existing positive flag is correct.
Their completeness differs substantially: recall A = 10/100 = 10%, recall B = 10/12 ≈ 83.33%.
Precision alone cannot distinguish them here.
Transfer · Challenge
At one threshold TP = 18 and FP = 2. Raising it removes 9 true-positive predictions but none of the false positives. Does precision increase?
Show hint
Calculate before and after using the remaining predictions.
Learning goal: Test a common threshold claim on a concrete finite dataset.
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Sources for this explanation
Quanta · Updated November 1, 2026
- scikit-learn documentation: precision_score, definition and zero_division
- Google Machine Learning Crash Course: Accuracy, recall, precision and related metrics
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Added an original explanation with two worked examples, five varied exercises and distinctions from recall, accuracy and measurement precision.
Cite this reference page
Quanta. Precision (positive predictive value). Updated November 1, 2026. https://quanta-study.de/en/formula-sheet/precision-positivvorhersagewert
When citing a specific scientific statement, also cite the specialist source linked to that statement.