LambdaLabTM
Artificial Intelligence · Class 10 · Unit 3 · Evaluating Models
class 10 aievaluation⏱️ 10 min read

Precision and Recall

These two formulas differ by a single letter, which is why they get mixed up. But they answer completely different questions, and picking the wrong one can make a dangerous model look good.

1Precision

Precision
The ratio of the total number of correctly classified positive examples to the total number of predicted positive examples.
Precision = Correct positive predictions / Total positive predictions = TP / (TP + FP)

In words: when the model says yes, how often is it right? A precision of 0.843 on a heart disease model means that when it says a patient has heart disease, it is correct about 84% of the time.

Precision is the top row
TP and FP are the two cells in the Predicted Yes row. Precision never looks below that row — it only cares about the predictions the model actually made.

2Recall

Recall
The measure of the model correctly identifying True Positives.
Recall = Correct positive predictions / Total actual positive values = TP / (TP + FN)

In words: of all the real yeses, how many did it find? A recall of 0.86 means that out of all the patients who actually have heart disease, 86% were correctly identified.

Recall has other names
Recall is also called Sensitivity or the True Positive Rate. All three mean the same thing.
Recall is the left column
TP and FN are the two cells in the Actual Yes column — every case that really was positive, whatever the model said about it.

3See them on the matrix

Pick Precision and then Recall below and watch which cells light up. They share TP; they differ in the second cell, and that is the whole distinction.

The confusion matrix, and what comes out of it

Pick a metric to light up the cells it is built from. Precision is the top row; recall is the left column.

Actual / Reality
YesNo
Predicted Yes
TP
90
FP
40
Predicted No
FN
50
TN
820
Accuracy = (90 + 820) / 1000 = 91.00%
Precision = 90 / (90 + 40) = 0.6923
Recall = 90 / (90 + 50) = 0.6429
F1 = 2 × 0.6923 × 0.6429 / (0.6923 + 0.6429) = 0.6667

Loan default prediction. Positive class: Applicant defaults. 91% accuracy sounds excellent until you look further: of the applicants who really did default, the model caught under two thirds.Source: Class X handbook, Case Study 2

PrecisionRecall
FormulaTP / (TP + FP)TP / (TP + FN)
On the matrixThe Predicted Yes rowThe Actual Yes column
It asksWhen it says yes, is it right?Of the real yeses, how many were found?
Cuts downFalse PositivesFalse Negatives
Also called—Sensitivity, True Positive Rate

4Which one should you use?

One question decides it
Which mistake would you rather not make?
If a false positive is the costly one, you need to push the FPs down — use precision.
If a false negative is the costly one, you need to push the FNs down — use recall.
The two examples the handbook uses
Precision — launching a satellite. A day with good weather is the positive class. Missing a good day is fine; calling a bad day good and launching into it is a disaster. Reduce the false positives.
Recall — a Covid-19 classifier. An infected person is the positive class. If an infected person is told they are clear, they get no treatment and may infect many others. Reduce the false negatives.

Fishing with a net

Precision asks: of everything I pulled up, how much was actually fish, and how much was old boots?
Recall asks: of all the fish in the lake, how many did I get?
A tiny, careful net has high precision and low recall. Dragging the entire lake has perfect recall and dreadful precision.
Precision or recall?

Ask one question of every scenario: which mistake would you rather not make?

Scenario 1 of 6

A classifier that decides whether someone has Covid-19.

False positive too costly → precision. False negative too costly → recall. If you genuinely cannot say which is worse, that is what the F1 score is for.

5From the board papers

1
Precision is defined as:
(A) The ratio of correctly predicted positive observations to total observations. (B) The ratio of correctly predicted positive observations to total predicted positive observations. (C) The ratio of correctly predicted negative observations to total observations. (D) The harmonic mean of true positives and true negatives.CBSE board exam 2026
1 mark
▶Show the answer

(B). Read the endings carefully: (A) says total observations, which would be accuracy’s denominator; (B) says total predicted positive, which is TP + FP. That one word is the whole question.

2
A cybersecurity model was tested on 1500 network activities. It correctly predicted 1000 were cyber attacks, and correctly identified 250 that were not. It predicted 200 were attacks when they were not, and predicted 50 were not attacks when they were.
(A) Draw the confusion matrix. (B) How many cases are True Negative? (C) Calculate precision.CBSE board exam 2026
4 marks
▶Show the answer

(A) Positive class = “is an attack”. TP = 1000, FP = 200, FN = 50, TN = 250 (and they add to 1500, which confirms you have read the paragraph correctly).

Actual: AttackActual: Not
Predicted: Attack1000200
Predicted: Not50250

(B) True Negative = 250.
(C) Precision = TP / (TP + FP) = 1000 / (1000 + 200) = 1000/1200 = 0.8333, or 83.33%.

3
In a spam email detection system, out of 1000 emails received, 300 are spam. The system correctly identifies 240 spam emails as spam, but it also marks 60 legitimate emails as spam. What is the precision of the system?CBSE sample paper 2025–26
1 mark
▶Show the answer

0.80, or 80%. TP = 240 and FP = 60, so precision = 240 / (240 + 60) = 240/300 = 0.8.
The 1000 and the 300 are there to be ignored — precision never touches the total, only the row the model predicted yes on.

4
It is one of the parameters for evaluating a model’s performance, and is defined as the percentage of true positive cases versus all the cases where the actual value is true. Which evaluation parameter is this?CBSE board exam 2025
1 mark
▶Show the answer

Recall. “All the cases where the actual value is true” is TP + FN — the Actual Yes column. If it had said “all the cases the model predicted true”, it would have been precision.

6Check yourself

Quick Check

What is the formula for recall?

Quick Check

Recall is also known as:

Quick Check

For a Covid-19 classifier, which metric matters most?

Quick Check

A model has TP = 90, FP = 40, FN = 50. What is its precision?