Precision
Of all positive predictions, the fraction that were correct.
Formula
Live Calculator
MembersVariables
Example
TP=80, FP=20: Precision = 0.80
How it works
Precision measures how trustworthy a model’s positive predictions are. It compares the number of true positives to all predicted positives, so it answers: when the model says “yes,” how often is it actually correct? This works because every positive prediction falls into one of two groups: correct positives (TP) or incorrect positives (FP), and precision is the share that are correct.
When to use it
Use precision when false alarms are costly, such as spam detection, fraud alerts, or medical screening follow-ups. It is especially useful when you care more about the reliability of positive predictions than about catching every possible positive case.
Worked example, step by step
Suppose a fraud detector flags 50 transactions as fraudulent. Of those 50 flagged transactions, 35 are truly fraud (TP = 35). The remaining 15 are not fraud but were still flagged (FP = 15). Precision = TP / (TP + FP) Precision = 35 / (35 + 15) Precision = 35 / 50 Precision = 0.70 So the precision is 0.70, or 70%.
Common mistakes to avoid
- Using the total number of actual positives instead of the number of predicted positives
- Confusing precision with recall, which measures how many real positives were found
- Forgetting that false positives reduce precision even if the model catches many true positives
Did You Know?
Precision matters when false positives are costly (e.g., spam filters).
Share this formula
More in Data Science & ML
View allMean Squared Error (MSE)
BasicAverage of squared differences between predicted and actual values.
Root Mean Squared Error (RMSE)
BasicSquare root of MSE, in the same units as the target variable.
Mean Absolute Error (MAE)
BasicAverage of absolute differences between predictions and actual values.
Coefficient of Determination (R²)
IntermediateProportion of variance in the target explained by the model.
Classification Accuracy
BasicFraction of predictions that are correct.
Recall (Sensitivity)
IntermediateOf all actual positives, the fraction correctly identified.