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

The Confusion Matrix

A classification model can be right in two different ways and wrong in two different ways. The confusion matrix is the little table that keeps count of all four — and every metric left in this unit is calculated from it.

1What it is

Confusion matrix
A handy presentation of the accuracy of a model with two or more classes. The table puts the actual values on the y-axis and the predicted values on the x-axis, and the number in each cell is how many predictions fell into that category.

Say you have built a classifier that predicts whether a person is infected with a disease. The output is 1 if infected and 0 if not. Every prediction it makes is one of four things, because the prediction can be 1 or 0 and the truth can also be 1 or 0.

2The four cells

Read the name backwards and it explains itself
The second word is what the model said — Positive means it said yes, Negative means it said no.
The first word is whether it was right — True means correct, False means wrong.
So a False Negative is a case the model called negative and was wrong about. It really was positive.
CellThe model saidThe truth wasMeaning
True Positive (TP)YesYesCorrectly predicted the positive class
True Negative (TN)NoNoCorrectly predicted the negative class
False Positive (FP)YesNoWrongly predicted the negative class as positive
False Negative (FN)NoYesWrongly predicted the positive class as negative
The World Cup example
You are predicting the football World Cup.
TP: you said France would win, and France won.
TN: you said Germany would not win, and Germany lost.
FP: you said Germany would win, but Germany lost.
FN: you said France would not win, but France won.
Which class is 'positive' is your choice
Any class can be taken as the positive class and the rest as negative. Nothing about a disease makes it mathematically positive — someone decided that. So before you fill in a matrix, settle what positive means here, and say so in your answer. Get that backwards and every one of your four numbers lands in the wrong box.

3Building one by hand

The board hands you a paragraph of counts and asks you to draw the matrix. The way to get it right is to take one case at a time and ask the two questions: what did the model say, and was it right?

Build the matrix, one case at a time

Ten patients. For each one you are told what was predicted and what was actually true — put it in the right box.

Case 1 of 10
The model predicted Yes — has the diseaseActually Yes — has the disease

The first word says whether the model was right. The second says what the model predicted. A False Negative is a case the model called negative and got wrong.

The smoke alarm

A smoke alarm that goes off while you are cooking is a false positive: annoying, and you wave a tea towel at it. A smoke alarm that stays silent during a real fire is a false negative. Both are “the alarm was wrong”, and they are not remotely the same kind of wrong. That difference is the whole of the next two lessons.

4Every score from one table

Once the four numbers are in place, everything else in this unit is arithmetic. Change a cell below and watch all four metrics move.

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
40
FP
20
Predicted No
FN
10
TN
30
Accuracy = (40 + 30) / 100 = 70.00%
Precision = 40 / (40 + 20) = 0.6667
Recall = 40 / (40 + 10) = 0.8000
F1 = 2 × 0.6667 × 0.8000 / (0.6667 + 0.8000) = 0.7273

Will the student pass?. Positive class: Student passes. 100 students. The board asked for the matrix, the accuracy and the number of wrong predictions.Source: CBSE sample paper 2025-26

5From the board papers

1
In a fire alarm system, if the model predicts “Fire Present” when there is actually no fire, this is classified as:
(A) True Positive (B) True Negative (C) False Positive (D) False NegativeCBSE board exam 2026
1 mark
▶Show the answer

(C) False Positive. The model said yes (Positive) and it was wrong (False).

2
In the context of autonomous vehicle safety systems, which type of error would be most critical to minimise?
(A) False Positive (detecting danger when there isn’t any) (B) False Negative (failing to detect actual danger) (C) True Positive (D) True NegativeCBSE board exam 2026
1 mark
▶Show the answer

(B) False Negative. A car that brakes for a danger that was not there is a nuisance; a car that fails to notice a real one causes a crash. Note that (C) and (D) are correct predictions, so they are not errors at all — two of the four options can be dismissed immediately.

3
An AI model was tested with 1000 test samples. If TP = 200, TN = 600, FP = 100 and FN = 100, how many total predictions were correct?
(A) 300 (B) 600 (C) 800 (D) 900CBSE board exam 2026
1 mark
▶Show the answer

(C) 800. The correct predictions are the two cells beginning with True: TP + TN = 200 + 600 = 800. The other two cells, 100 + 100 = 200, are the wrong ones — and 800 + 200 gives the 1000 samples back, which is a quick way to check yourself.

4
Draw the confusion matrix for the following data: true positive = 100, true negative = 47, false positive = 62, false negative = 290.CBSE sample papers 2023–24 and 2024–25
2 marks
▶Show the answer

Label both axes, or the marks go elsewhere:

Actual: YesActual: No
Predicted: Yes100 (TP)62 (FP)
Predicted: No290 (FN)47 (TN)

6Check yourself

Quick Check

A model predicts 'no disease' for a patient who does have the disease. This is a:

Quick Check

Which two cells of the confusion matrix hold the correct predictions?

Quick Check

In a confusion matrix, what do the numbers in each cell represent?

Quick Check

A weather model says it will rain tomorrow, and it does. Taking 'rain' as the positive class, this is a: