CBSE Class 10 · Artificial Intelligence, code 417 · Unit 3 numericals, 2026-27

Confusion matrix class 10 AI: twelve numericals, every step written out.

This page is pure practice on the confusion matrix for class 10 AI, CBSE 417, 2026-27. Twelve original problems climb in three levels: first the matrix is handed to you, then you build it from a paragraph, then you compare two models or work backwards from a metric. Each one shows the matrix, the formula, the substitution and the answer. Cover the working, solve, then check.

Live online · 12 graded numericals below · working marked step by step in class · fresh numbers every week · first class free

Start here

Courses behind this numerical practice

The 417 course whose Class 10 batch sets these problems each week, the Python course where students compute the same four metrics in code, and the Class 10 maths course for anyone whose fractions and decimals are slowing them down.

Ans. The short version

A confusion matrix in class 10 AI is a two by two table that sorts a model's predictions into true positives (TP), false positives (FP), false negatives (FN) and true negatives (TN). From it: accuracy = (TP + TN) / total, precision = TP / (TP + FP), recall = TP / (TP + FN), and F1 score = 2 x precision x recall / (precision + recall). Board numericals ask you to build the matrix from a short paragraph, then compute and interpret these. Modern Age Coders sets such numericals live in a Monday and Wednesday 9:00 PM IST batch, or one to one.

Before the problems

Confusion matrix class 10 AI: the layout and the accuracy formula

Draw the matrix with the real answer across the top and the prediction down the side, then fill four cells. Every formula below reads straight off those four numbers.

The layout used on this pagepositive = the thing we look for
                 Reality: Yes   Reality: No
Predicted: Yes       TP             FP
Predicted: No        FN             TN

TP + FP = everything the model flagged
TP + FN = everything that was really yes
TP + FP + FN + TN = total cases

Some papers and books swap rows and columns. The cells keep their meaning, so read the labels before you copy a number. Problem 4 practises exactly that.

MetricFormulaAsks
Accuracy(TP + TN) / totalHow often is it right overall?
PrecisionTP / (TP + FP)When it says yes, how often is it right?
RecallTP / (TP + FN)Of the real yeses, how many did it catch?
F1 score2PR / (P + R)A single balance of precision and recall
Error rate(FP + FN) / totalHow often is it wrong? (1 minus accuracy)

The method, every time

  1. Name the positive class

    Write "positive = rain" or "positive = defective" at the top. Every later step depends on it.

  2. Fill the four cells and check the total

    Add the cells. If they do not reach the number of cases in the question, a cell is wrong.

  3. Write the formula, then substitute

    Formula line, numbers line, answer line. Marks are given for each, so never jump to the answer.

  4. Round at the end, to two decimal places

    Carry full values into F1. Rounding precision and recall first can shift the last digit.

Why a model is tested this way, and how to choose between the metrics in words, is explained on evaluating models class 10 questions and answers.

Level 1: problems 1 to 4

Confusion matrix numericals with solutions: the matrix is given

Warm-up level. The four counts are printed for you, so the only skills tested are the formulas and the arithmetic. Problem 4 hides one trap in the table's layout.

Problem 1mango ripeness sorter, 100 mangoes
positive = ripe

              Ripe   Not ripe
Pred ripe      42        8
Pred not ripe   6       44

Find accuracy, precision, recall, F1.

Check: 42 + 8 + 6 + 44 = 100.

MetricWorkingAnswer
Accuracy(42 + 44) / 1000.86
Precision42 / (42 + 8) = 42 / 500.84
Recall42 / (42 + 6) = 42 / 480.875
F12 x 0.84 x 0.875 / (0.84 + 0.875) = 1.47 / 1.7150.86
Problem 2spam filter, 500 emails
positive = spam

TP = 120   FP = 5
FN = 30    TN = 345

Find all four metrics and the
number of emails misclassified.

Misclassified means FP + FN, both kinds of wrong answer.

MetricWorkingAnswer
Accuracy(120 + 345) / 500 = 465 / 5000.93
Precision120 / 1250.96
Recall120 / 1500.80
F12 x 0.96 x 0.80 / 1.76 = 1.536 / 1.760.87
Misclassified5 + 3035
Problem 3plant disease app, 200 leaves
positive = diseased

TP = 33    FP = 17
FN = 11    TN = 139

Find F1. A student writes
(0.66 + 0.75) / 2 = 0.705.
What went wrong?

The student averaged. F1 is the harmonic mean, which sits closer to the smaller of the two values.

MetricWorkingAnswer
Precision33 / 500.66
Recall33 / 440.75
F12 x 0.66 x 0.75 / 1.41 = 0.99 / 1.410.70
Accuracy(33 + 139) / 2000.86
Problem 4card fraud, 200 payments, rotated table
positive = fraud
(rows are REALITY here)

               Pred fraud  Pred genuine
Actual fraud       27           3
Actual genuine      9         161

Find precision and recall.

Actual fraud, predicted genuine is a miss: FN = 3. Actual genuine, predicted fraud is a false alarm: FP = 9.

MetricWorkingAnswer
Precision27 / (27 + 9) = 27 / 360.75
Recall27 / (27 + 3) = 27 / 300.90
F11.35 / 1.650.82
Accuracy(27 + 161) / 2000.94

Level 2: problems 5 to 8

Precision recall F1 score class 10: build the matrix from the words

This is the shape most case-based questions take. The paragraph gives totals and parts; you split them into the four cells, check the sum, and only then calculate.

Problem 5rain forecast, 60 days
A model predicted rain on 18 days;
it rained on 15 of them. On the 42
days it predicted dry, it rained on 5.

positive = rain
TP = 15        FP = 18 - 15 = 3
FN = 5         TN = 42 - 5 = 37
check: 15 + 3 + 5 + 37 = 60

"Predicted rain on 18" is the whole top row, TP + FP, not TP alone.

MetricWorkingAnswer
Accuracy(15 + 37) / 60 = 52 / 600.87
Precision15 / 180.83
Recall15 / 200.75
F12 x 0.833 x 0.75 / 1.583 = 1.25 / 1.5830.79
Problem 6health screening, 1,000 people
40 people have the condition. The
model flags 70 people in all and
catches 30 of the 40.

positive = has the condition
TP = 30        FP = 70 - 30 = 40
FN = 40 - 30 = 10
TN = 1000 - 30 - 40 - 10 = 920

Find TN last, by subtracting from the total. It is the cell paragraphs almost never state.

MetricWorkingAnswer
Accuracy(30 + 920) / 10000.95
Precision30 / 700.43
Recall30 / 400.75
F12 x 0.429 x 0.75 / 1.1790.55

Problem 6 is worth a sentence in your answer: 95% accuracy sounds excellent, yet more than half of the people flagged are healthy and a quarter of the real cases are missed.

Problem 7factory inspection, 400 parts
25 parts are defective. The camera
rejects 32 parts, and 20 of those
really are defective.

positive = defective
TP = 20        FP = 32 - 20 = 12
FN = 25 - 20 = 5
TN = 400 - 20 - 12 - 5 = 363

Two different totals: 32 is what the model rejected, 25 is what was truly faulty. Mixing them is the commonest slip here.

MetricWorkingAnswer
Accuracy(20 + 363) / 400 = 383 / 4000.96
Precision20 / 320.625
Recall20 / 250.80
F12 x 0.625 x 0.80 / 1.425 = 1.0 / 1.4250.70
Problem 8result predictor, 80 students
The model predicts 50 students will
pass; 44 of them do. Of the 30 it
predicts will fail, 9 actually pass.

(a) positive = pass
TP 44  FP 6  FN 9  TN 21
(b) positive = fail
TP 21  FP 9  FN 6  TN 44

Same model, same 80 students. Switching the positive class swaps TP with TN and FP with FN, so precision and recall change; accuracy does not.

Metric(a) pass positive(b) fail positive
Accuracy65 / 80 = 0.8165 / 80 = 0.81
Precision44 / 50 = 0.8821 / 30 = 0.70
Recall44 / 53 = 0.8321 / 27 = 0.78
F10.850.74

Level 3: problems 9 to 12

Is accuracy enough? Compare models and work backwards

No, accuracy is not enough when one class is rare or when the two kinds of error cost different amounts. These four problems show why, then reverse the direction: a metric is given and a cell is missing.

Problem 9rare condition, 1,000 people, 10 positive
Model A says "healthy" to everyone.
  TP 0   FP 0   FN 10   TN 990
Model B:
  TP 8   FP 40  FN 2    TN 950

Which model would a clinic want?

A has the higher accuracy and finds nobody. Precision for A is 0 / 0, which cannot be calculated: say so rather than writing 0 or 1.

MetricModel AModel B
Accuracy990 / 1000 = 0.99958 / 1000 = 0.958
Precision0 / 0, cannot be found8 / 48 = 0.17
Recall0 / 10 = 08 / 10 = 0.80
F100.28
ChooseB: it catches 8 of 10 real cases. Missed cases matter most, so recall decides.
Problem 10two spam filters, 500 emails each
Filter X: TP 90   FP 10  FN 30  TN 370
Filter Y: TP 110  FP 30  FN 10  TN 350

Both are 92% accurate. Which should a
school office use, where a lost parent
email is worse than a stray spam?

Equal accuracy, different mistakes. A lost real email is a false positive for a spam filter, so precision is the deciding metric.

MetricFilter XFilter Y
Accuracy460 / 500 = 0.92460 / 500 = 0.92
Precision90 / 100 = 0.90110 / 140 = 0.79
Recall90 / 120 = 0.75110 / 120 = 0.92
F10.820.85
ChooseX, for its higher precision, even though Y has the higher F1.
Problem 11find the missing cells
200 cases. TP = 40, precision = 0.8,
recall = 0.5. Find FP, FN, TN,
accuracy and F1.

40 / (40 + FP) = 0.8  so 40 + FP = 50
                      FP = 10
40 / (40 + FN) = 0.5  so 40 + FN = 80
                      FN = 40
TN = 200 - 40 - 10 - 40 = 110
accuracy = (40 + 110) / 200 = 0.75
F1 = 2 x 0.8 x 0.5 / 1.3 = 0.62

Divide TP by the metric to get the whole denominator, then subtract TP.

Problem 12from accuracy back to precision
100 cases. TP = 18, FN = 12 and
accuracy = 0.80. Find TN, FP,
precision, recall and F1.

(18 + TN) / 100 = 0.80
              TN = 80 - 18 = 62
FP = 100 - 18 - 12 - 62 = 8
precision = 18 / 26 = 0.69
recall    = 18 / 30 = 0.60
F1 = 2 x 0.692 x 0.6 / 1.292 = 0.64

Accuracy gives TP + TN together. Once TN is known, FP is whatever is left of the total.

More sets in this style, printable and with answer keys, are on the Class 10 AI worksheets page, and the same cases arrive as four-mark questions on CBSE Class 10 AI case-based questions.

How the working is marked

Accuracy formula class 10 AI and the slips that cost marks

Most marks in a matrix numerical are lost before any division happens: in reading the paragraph, in placing a number in the wrong cell, or in skipping the formula line. These are the slips we see most often when marking class work.

SlipHow it shows upThe fix
Row total taken as TP"Flagged 70" written as TP = 70Ask: is this number all the yes predictions, or only the right ones?
FP and FN swappedPrecision and recall come out reversedSay each cell aloud: "predicted yes, really no" is FP
No total checkA cell is off and every metric followsAdd the four cells before computing anything
Averaged F1(P + R) / 2 in place of 2PR / (P + R)Check with 2TP / (2TP + FP + FN), which gives the same F1
Early roundingF1 off in the second decimalKeep fractions or three decimals until the last line
Answer with no line of workingCorrect number, partial marksFormula, substitution, answer: three lines every time

One level a week in class

Monday's class works one level on the shared screen. Each student then solves a fresh problem of the same kind while the teacher watches their working appear.

New numbers on Wednesday

The Wednesday round repeats the week's problem shapes with different figures, timed, so a remembered answer is useless and only the method scores.

Inside every mock

From December each full mock carries a matrix case question, marked line by line, so students see which of their steps earned credit.

All five formulas sit together on the CBSE Class 10 AI formula sheet; one-mark matrix items are in the class 10 AI MCQ bank; and the mock calendar is on the sample paper and mock tests page.

Batch or personalised: you choose

Practise matrix numericals in the batch, or one to one

In both formats the teacher sees the working, not just the final number, and marks it step by step. The batch takes the whole class through the three levels in order; one to one stays on whichever level keeps going wrong. Monthly billing, no admission fee, stop at the end of any month.

Option 1 · Fixed batch timings

Group batch, Monday and Wednesday 9 PM

₹1,499

per month, two live classes a week

  • Monday and Wednesday, 9:00 PM IST, live on video
  • Fifteen to twenty Class 10 AI students, one teacher
  • One level of problems worked per week
  • Timed rounds with fresh figures on Wednesdays
  • A matrix case question in every mock from December
Book a free demo in this batch

Option 2 · Choose your own timing

Personalised one to one

₹4,999

per month, one private class a week, at a time set with you

  • Class times chosen by the family, in your own time zone
  • Starts at whichever level your child finds hard
  • Paragraph-to-matrix drills until the cells land right
  • Every slip traced back to the exact line it began
  • Same CBSE 417 syllabus and teachers
Ask for a personalised plan

A student who understands precision and recall but still drops marks by placing numbers in the wrong cell usually fixes it within a few one to one sessions of paragraph drills. A student who has not met the matrix yet does better in the batch, where Unit 3 is taught from the start before the numericals begin. Fees appear in your own currency.

Studying outside India?

Confusion matrix practice for CBSE students in the Gulf and abroad

Students in Dubai, Muscat, Riyadh or Kuwait City write the same 417 paper, with the same Unit 3 numericals. Here is the batch hour in local time for the coming exam season.

Where you liveMon and Wed 9:00 PM ISTBest format
India (IST)
every Indian city
9:00 PMBatch fits
UAE and Oman
Dubai, Abu Dhabi, Sharjah, Muscat
7:30 PMBatch fits
Saudi Arabia, Qatar, Kuwait, Bahrain
Riyadh, Jeddah, Dammam, Doha, Kuwait City, Manama
6:30 PMBatch fits
Nepal
Kathmandu
9:15 PMBatch fits
Ethiopia and East Africa
Addis Ababa and East Africa Time
6:30 PMBatch fits
Singapore and Malaysia
Singapore, Kuala Lumpur
11:30 PMChoose 1-on-1

If the batch falls at a bad hour for your family, one to one runs whenever suits you. More for families outside India is on CBSE Class 10 AI online classes in the Gulf and abroad.

What families say

Rated 4.9 across 547 Google reviews

Real reviews from real families. We neither write nor commission them.

★★★★★

"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."

Ria Mukherjee

Parent

★★★★★

"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."

Samriddha Mondal

Student

★★★★★

"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."

Vansh Agarwal

Student

★★★★★

"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."

Sonam Oswal

Parent of Dhairya

★★★★★

"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."

Sonu Goyal

Parent

★★★★★

"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."

Ritu Kedia

Parent

The rest of the Class 10 series

More pages for Class 10 board students

Every page in the CBSE Class 10 AI (417) series, grouped by what you need: classes, each unit, question practice, notes and revision, and the exam itself.

ICSE Class 10 Computer Applications (Java): The Tue and Wed ICSE Java batch ICSE Computer Applications syllabus ICSE Java programs practice ICSE CA important questions

Questions about confusion matrix numericals

Confusion matrix class 10 AI: what students ask

What is a confusion matrix in class 10 AI?

It is a two by two table that compares a classification model's predictions with reality. Its four cells count true positives, false positives, false negatives and true negatives. Accuracy, precision, recall and F1 score are all calculated from those four counts, which is why Unit 3 numericals start by filling the matrix.

What is the accuracy formula in class 10 AI?

Accuracy = (TP + TN) / (TP + TN + FP + FN), the correct predictions divided by all predictions. Multiply by 100 for a percentage. For example, 86 correct out of 100 gives 0.86, or 86%. Error rate is the remaining share: (FP + FN) divided by the total.

How do you calculate precision and recall?

Precision = TP / (TP + FP): of everything the model labelled positive, the share that really was. Recall = TP / (TP + FN): of everything that really was positive, the share the model found. Both use TP on top; only the second number below the line differs.

How do you find the F1 score in class 10 AI?

F1 = 2 x precision x recall / (precision + recall). Find precision and recall first, keep three decimals, then substitute. A quick check is 2TP / (2TP + FP + FN), which gives the same value. Never take the plain average of precision and recall: that is a different, wrong number.

How do I make a confusion matrix from a paragraph?

Name the positive class first. Then find TP (predicted yes, really yes), use the predicted-yes total to get FP, the real-yes total to get FN, and subtract all three from the grand total for TN. Add the four cells to confirm they match the number of cases before calculating.

Is accuracy enough to evaluate a model?

No. When one class is rare, a model that always predicts the common class can score 99% accuracy and still find nothing. Two models with the same accuracy can also make very different mistakes. Precision, recall and F1 show what accuracy hides, and Unit 3 numericals often test this.

What is the difference between a false positive and a false negative?

A false positive is a yes prediction that turns out to be no, such as a healthy person flagged as ill. A false negative is a no prediction that turns out to be yes, such as an ill person told they are fine. Which one matters more decides whether precision or recall is the key metric.

How many decimal places should I give?

Two decimal places is the usual safe choice unless the question asks otherwise, and a percentage is acceptable where it fits. Keep more decimals in your working and round only on the final line, because rounding precision and recall early can shift the F1 score.

How many marks do confusion matrix questions carry?

Evaluating Models carries 10 theory marks in CBSE 417, and matrix numericals appear both as one-mark objective items and inside longer case-based questions. The exact split for the 2027 paper will be clear only when CBSE releases the 2026-27 sample paper, so practise both shapes.

Do your classes include confusion matrix practice?

Yes. Matrix numericals are taught and practised in the Monday and Wednesday 9:00 PM IST batch and in personalised one to one, with working marked step by step. The monthly fee shown on this page, in your own currency, covers it. There is no admission fee and the first class is a free demo.

Start

Solve a matrix numerical live, free

In the free first class your child turns a short paragraph into a confusion matrix with the teacher watching, then finds the four metrics with every line of working on screen. The teacher points out where marks would be gained or lost, and afterwards tells you whether the batch or one to one would close the gap faster.

Prefer the concepts before the numbers? Start with evaluating models questions and answers.

WhatsApp us · +91 91233 66161 · connect@modernagecoders.com

Every class is live video. The form requests a callback and reserves nothing.

We call within a few hours. No card, no enrolment fee.

Want it sooner? Book a priority demo

A full live class of about 45 to 60 minutes at a slot you pick, with a written skill report and learning roadmap on WhatsApp afterwards. The fee is adjusted against your first month if you enrol.

Book a priority demo

Keep exploring Modern Age Coders

By class and age

Learn more

Free resources

From the blog

Start here