Skip to content
Machine Learning

What is precision?

Precision is the number of correct positive predictions divided by the total number of positive predictions: TP / (TP + FP).

datasciencetrivia.com

Card 1 of 259. Answer: Precision is the number of correct positive predictions divided by the total number of positive predictions: TP / (TP + FP).

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

Precision is the share of a model's positive predictions that are actually positive: precision = TP / (TP + FP). A precision of 0.9 means one flagged case in ten is a false alarm. It ignores the positives the model missed, which recall measures.

Even for a fixed model, precision depends on how common positives are. Take a test that catches 90% of sick patients and wrongly flags 5% of healthy ones. Among 10,000 people with 1% prevalence, it finds 90 of the 100 sick and flags 495 of the 9,900 healthy, so precision is 90 / 585 ≈ 0.15. At 10% prevalence it finds 900 and flags 450: precision 900 / 1,350 ≈ 0.67.

Interviewers then ask about thresholds. Raising the decision threshold usually raises precision and lowers recall, but precision can dip at some steps, while recall never rises. If a model predicts no positives, precision is 0/0 and undefined; scikit-learn reports 0 and warns. Favor precision when false positives are costly, such as blocking legitimate payments.

All questions