Data & ComputingEvaluation MetricsA-Level
CambridgeAQAIBAbiturAPBaccalauréat GénéralBachilleratoCAPS

Precision Calculator

Accuracy of positive predictions.

Use the free calculatorCheck the variablesOpen the advanced solver
This is the free calculator preview. Advanced walkthroughs stay in the app.
Result
Ready
Precision

Formula first

Overview

Precision, also known as positive predictive value, quantifies the accuracy of a model's positive classifications. It represents the proportion of items identified as positive that truly belong to the positive class.

Symbols

Variables

P = Precision, TP = True Positives, FP = False Positives

Precision
True Positives
False Positives

Apply it well

When To Use

When to use: Apply this metric when the cost of a false positive is high, such as in spam detection or legal judgments. It is most effective when you need to be confident that every positive result is legitimate, even if you miss some positives.

Why it matters: Precision is vital for maintaining system credibility and avoiding unnecessary actions triggered by false alarms. In fields like facial recognition or credit card fraud, high precision prevents inconveniencing innocent users or wasting investigative resources.

Avoid these traps

Common Mistakes

  • Confusing precision with recall.
  • Using FN instead of FP.

One free problem

Practice Problem

A malware detection system flags 100 files as malicious. Upon review, 85 were found to be actual viruses, while 15 were safe system files. Calculate the precision of the detection system.

True Positives85
False Positives15

Solve for:

Hint: Divide the count of true positives by the total number of positive predictions.

The full worked solution stays in the interactive walkthrough.

References

Sources

  1. Wikipedia: Precision and recall
  2. An Introduction to Statistical Learning: with Applications in R by James, Witten, Hastie, Tibshirani
  3. Wikipedia: Confusion matrix
  4. The Elements of Statistical Learning (Hastie, Tibshirani, Friedman)
  5. Hastie, T., Tibshirani, R., & Friedman, J. (2009). The Elements of Statistical Learning: Data Mining, Inference, and Prediction (2nd ed.).
  6. Wikipedia: Precision and recall (article title)
  7. OCR A-Level Computer Science — Algorithms and Data