Concept · filed under Machine learning basics (AI-900)
Precision vs recall, read off a confusion matrix
Precision is the share of a model’s positive calls that turned out right; recall is the share of real positives the model managed to find. Both come straight off a confusion matrix, which sorts every prediction into true positive, false positive, false negative or true negative. AI-900 tested this and AI-901 leaves it out. The same four cells still appear wherever a classifier gets evaluated.
- ExamAI-901 (replaced AI-900 on June 30, 2026)
- ScopeAI-900 only · not on AI-901
- Questions here7
- UpdatedOct 19, 2026
Fig. 1
Reading the four cells
A confusion matrix sets what the model predicted against what actually happened. In the figure the model flagged 48 customers as likely to cancel, and 36 of them did. That is precision: 36 out of 48, or 0.75. Sixty customers really canceled, and the model caught 36 of them. That is recall: 36 out of 60, or 0.60.
Accuracy counts every correct cell, 164 out of 200 or 0.82, and looks the healthiest of the three. It will whenever most customers stay: a model that predicted “stays” for everyone would score 0.70 here and catch nobody.
Nothing here needs a memorized formula. Both numbers put the true positives on top; they differ only in which mistake joins them underneath. Precision adds the false alarms, recall adds the misses.
Precision and recall apply to classification, one of the supervised model types set out in supervised vs unsupervised learning. Features, labels and training data are on the machine learning basics topic.
Table 1
Which number to watch
| Plan | The costly mistake | Watch |
|---|---|---|
| Give every flagged customer a 30% discount | Discounts for people who were staying anyway (false positives) | Precision |
| Send every flagged customer a short check-in email | Missing someone who then leaves (false negatives) | Recall |
| Report one headline figure upward | A weak model hidden behind a common outcome | Accuracy, with the other two beside it |
The model didn’t change between rows. The price of each kind of mistake did.
Other model types
Regression is judged by how far predictions land from the real values: mean absolute error (MAE), root mean squared error (RMSE) and the coefficient of determination (R²). Clustering is judged by how tight each group is and how far apart the groups sit. Precision and recall belong to classification.
Where this meets AI-901
Split the same matrix by customer group and you have a fairness check: a model whose recall is much lower for one group misses that group more often. Fairness is one of the six principles the AI-901 study guide does list; responsible AI principles covers how it is tested.
Worksheet
Four cells, two ratios
Some of these need arithmetic. Sketch the four cells before you divide.
Questions come in batches of five. Pick an answer for each, then evaluate the batch: notes on all four options open under every question.
Accuracy by batch
0 evaluated · 0 right · 7 to go
Batch 1 questions 1–5
01
What is the purpose of the confusion matrix in Azure ML model evaluation?
Your label —The notes on all four options open when this batch is evaluated.
Answer: A
- Correct: The matrix counts true positives, false positives, true negatives and false negatives, showing where the model gets each class right and wrong.
- Input data distributions are shown with histograms or data profiles, not with prediction outcomes.
- Feature importance comes from model explanation tools and ranks inputs, not prediction outcomes.
- Accuracy can be calculated from the matrix, but the matrix exists to break results down, which a single number cannot do.
02
Which metric would be most appropriate for evaluating a binary classification model in Azure ML?
Your label —The notes on all four options open when this batch is evaluated.
Answer: B
- Mean absolute error measures the distance between predicted and actual numbers, which suits regression.
- Correct: AUC summarizes how well the model separates the two classes across all thresholds, so it fits binary classification.
- R-squared shows how much variance in a numeric target the model explains, a regression measure.
- RMSE measures the typical size of numeric prediction errors and applies to regression models.
03
What is the purpose of model evaluation in machine learning?
Your label —The notes on all four options open when this batch is evaluated.
Answer: A
- Correct: Evaluation scores the trained model on data it has not seen, using metrics suited to the task, to judge whether it is good enough.
- Changing features to raise scores is feature engineering, and tuning against the evaluation set would make that score unreliable.
- Documentation may record evaluation results, but producing it is not the purpose of evaluating a model.
- Gathering more training data can follow evaluation, but evaluation itself measures the model rather than creating data.
04
A fraud model's results on a test set: 40 true positives, 10 false positives, 20 false negatives and 30 true negatives. What is its precision?
Your label —The notes on all four options open when this batch is evaluated.
Answer: C
- This is recall, TP / (TP + FN) = 40 / 60, the share of actual fraud the model caught.
- This is accuracy, (TP + TN) / total = 70 / 100, which counts both kinds of right prediction.
- Correct: precision is TP / (TP + FP) = 40 / 50, the share of flagged cases that really were fraud.
- This is TN / (TN + FP) = 30 / 40, the share of genuine cases rightly cleared, not precision.
05
A screening model flags patients for a follow-up test. Missing a patient who has the disease is far more costly than an extra test for a healthy one. Which metric should the team prioritize?
Your label —The notes on all four options open when this batch is evaluated.
Answer: B
- Precision penalizes false alarms, which matter less here than missed cases.
- Correct: recall measures how many actual positive cases the model catches, so raising it minimizes missed patients.
- Accuracy can look high while many sick patients are missed, especially when the disease is rare.
- R-squared evaluates regression models that predict numbers, not yes/no screening results.
0 of 5 labeled
Batch 2 questions 6–7
06
A defect-detection model is tested on 100 parts: 30 true positives, 5 false positives, 15 false negatives and 50 true negatives. What is its recall?
Your label —The notes on all four options open when this batch is evaluated.
Answer: A
- Correct: recall is TP / (TP + FN) = 30 / 45, the share of truly defective parts the model caught.
- This is precision, TP / (TP + FP) = 30 / 35, the share of flagged parts that really were defective.
- This is accuracy, (TP + TN) / total = 80 / 100, which counts both kinds of right prediction.
- This is TN / (TN + FP) = 50 / 55, the share of good parts rightly passed, not recall.
07
A spam filter moves suspected spam to the junk folder. A real customer email lost in junk costs the business far more than some spam reaching the inbox. Which metric should the team prioritize?
Your label —The notes on all four options open when this batch is evaluated.
Answer: B
- Recall counts how much spam gets caught; pushing it up tends to send more real email to junk, the costly error here.
- Correct: a real email flagged as spam is a false positive, and precision measures how many flagged emails really were spam.
- Accuracy blends both kinds of error into one number, so it can stay high while real emails keep landing in junk.
- Mean absolute error measures regression models that predict numbers; a spam filter is a classifier.
0 of 2 labeled
Keep these
- Precision: of the cases the model flagged, how many were real.
- Recall: of the real cases, how many the model flagged.
- Accuracy flatters a model when one outcome is rare.
- Which to favor depends on what each kind of mistake costs.