★★★★★
"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
CBSE Class 10 · Artificial Intelligence, code 417 · Unit 3 numericals, 2026-27
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
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.

The batch / 417 Class 10
The full 417 course: Unit 3 numericals set with fresh figures each week and marked one step at a time on the shared screen.
Open the course →
Check in code / Python
Write a ten-line program that prints accuracy, precision, recall and F1 from four counts, then use it to check your hand working.
Open the course →
Arithmetic / Class 10 maths
For students who lose matrix marks to division and rounding slips rather than to the AI idea itself.
Open the course →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
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.
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.
| Metric | Formula | Asks |
|---|---|---|
| Accuracy | (TP + TN) / total | How often is it right overall? |
| Precision | TP / (TP + FP) | When it says yes, how often is it right? |
| Recall | TP / (TP + FN) | Of the real yeses, how many did it catch? |
| F1 score | 2PR / (P + R) | A single balance of precision and recall |
| Error rate | (FP + FN) / total | How often is it wrong? (1 minus accuracy) |
Write "positive = rain" or "positive = defective" at the top. Every later step depends on it.
Add the cells. If they do not reach the number of cases in the question, a cell is wrong.
Formula line, numbers line, answer line. Marks are given for each, so never jump to the answer.
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
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.
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.
| Metric | Working | Answer |
|---|---|---|
| Accuracy | (42 + 44) / 100 | 0.86 |
| Precision | 42 / (42 + 8) = 42 / 50 | 0.84 |
| Recall | 42 / (42 + 6) = 42 / 48 | 0.875 |
| F1 | 2 x 0.84 x 0.875 / (0.84 + 0.875) = 1.47 / 1.715 | 0.86 |
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.
| Metric | Working | Answer |
|---|---|---|
| Accuracy | (120 + 345) / 500 = 465 / 500 | 0.93 |
| Precision | 120 / 125 | 0.96 |
| Recall | 120 / 150 | 0.80 |
| F1 | 2 x 0.96 x 0.80 / 1.76 = 1.536 / 1.76 | 0.87 |
| Misclassified | 5 + 30 | 35 |
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.
| Metric | Working | Answer |
|---|---|---|
| Precision | 33 / 50 | 0.66 |
| Recall | 33 / 44 | 0.75 |
| F1 | 2 x 0.66 x 0.75 / 1.41 = 0.99 / 1.41 | 0.70 |
| Accuracy | (33 + 139) / 200 | 0.86 |
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.
| Metric | Working | Answer |
|---|---|---|
| Precision | 27 / (27 + 9) = 27 / 36 | 0.75 |
| Recall | 27 / (27 + 3) = 27 / 30 | 0.90 |
| F1 | 1.35 / 1.65 | 0.82 |
| Accuracy | (27 + 161) / 200 | 0.94 |
Level 2: problems 5 to 8
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.
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.
| Metric | Working | Answer |
|---|---|---|
| Accuracy | (15 + 37) / 60 = 52 / 60 | 0.87 |
| Precision | 15 / 18 | 0.83 |
| Recall | 15 / 20 | 0.75 |
| F1 | 2 x 0.833 x 0.75 / 1.583 = 1.25 / 1.583 | 0.79 |
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.
| Metric | Working | Answer |
|---|---|---|
| Accuracy | (30 + 920) / 1000 | 0.95 |
| Precision | 30 / 70 | 0.43 |
| Recall | 30 / 40 | 0.75 |
| F1 | 2 x 0.429 x 0.75 / 1.179 | 0.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.
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.
| Metric | Working | Answer |
|---|---|---|
| Accuracy | (20 + 363) / 400 = 383 / 400 | 0.96 |
| Precision | 20 / 32 | 0.625 |
| Recall | 20 / 25 | 0.80 |
| F1 | 2 x 0.625 x 0.80 / 1.425 = 1.0 / 1.425 | 0.70 |
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 |
|---|---|---|
| Accuracy | 65 / 80 = 0.81 | 65 / 80 = 0.81 |
| Precision | 44 / 50 = 0.88 | 21 / 30 = 0.70 |
| Recall | 44 / 53 = 0.83 | 21 / 27 = 0.78 |
| F1 | 0.85 | 0.74 |
Level 3: problems 9 to 12
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.
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.
| Metric | Model A | Model B |
|---|---|---|
| Accuracy | 990 / 1000 = 0.99 | 958 / 1000 = 0.958 |
| Precision | 0 / 0, cannot be found | 8 / 48 = 0.17 |
| Recall | 0 / 10 = 0 | 8 / 10 = 0.80 |
| F1 | 0 | 0.28 |
| Choose | B: it catches 8 of 10 real cases. Missed cases matter most, so recall decides. | |
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.
| Metric | Filter X | Filter Y |
|---|---|---|
| Accuracy | 460 / 500 = 0.92 | 460 / 500 = 0.92 |
| Precision | 90 / 100 = 0.90 | 110 / 140 = 0.79 |
| Recall | 90 / 120 = 0.75 | 110 / 120 = 0.92 |
| F1 | 0.82 | 0.85 |
| Choose | X, for its higher precision, even though Y has the higher F1. | |
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.
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
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.
| Slip | How it shows up | The fix |
|---|---|---|
| Row total taken as TP | "Flagged 70" written as TP = 70 | Ask: is this number all the yes predictions, or only the right ones? |
| FP and FN swapped | Precision and recall come out reversed | Say each cell aloud: "predicted yes, really no" is FP |
| No total check | A cell is off and every metric follows | Add 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 rounding | F1 off in the second decimal | Keep fractions or three decimals until the last line |
| Answer with no line of working | Correct number, partial marks | Formula, substitution, answer: three lines every time |
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.
The Wednesday round repeats the week's problem shapes with different figures, timed, so a remembered answer is useless and only the method scores.
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
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
₹1,499
per month, two live classes a week
Option 2 · Choose your own timing
₹4,999
per month, one private class a weektwo private classes a week, at a time set with you
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?
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 live | Mon and Wed 9:00 PM IST | Best format |
|---|---|---|
| India (IST) every Indian city | 9:00 PM | Batch fits |
| UAE and Oman Dubai, Abu Dhabi, Sharjah, Muscat | 7:30 PM | Batch fits |
| Saudi Arabia, Qatar, Kuwait, Bahrain Riyadh, Jeddah, Dammam, Doha, Kuwait City, Manama | 6:30 PM | Batch fits |
| Nepal Kathmandu | 9:15 PM | Batch fits |
| Ethiopia and East Africa Addis Ababa and East Africa Time | 6:30 PM | Batch fits |
| Singapore and Malaysia Singapore, Kuala Lumpur | 11:30 PM | Choose 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
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
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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