★★★★★
"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 · Formula sheet 2026-27
These are all the class 10 AI formulas and counting rules in CBSE 417 for 2026-27, numbered on one sheet you can print. Each comes with a single worked line on fresh numbers, and every number was checked in Python. The sheet marks which formulas belong to the theory paper and which only to the practical. In our live batch each one is drilled on new figures until the working is automatic.
Live online · every 417 formula on one sheet · a worked line for each · checked in Python · theory and practical marked · first class free
Start here
The 417 course whose Class 10 batch drills these numericals, the Python course where the same formulas become short programs, and the Data Science course for students who want the metrics on real data.

The batch / 417 Class 10
The full 417 course: each formula taught from its idea, then practised as timed numericals marked in class.
Open the course →
Practical / Python
NumPy and plain Python versions of the formulas, the way the lab exam and viva ask about them.
Open the course →
Beyond the board / Data
Accuracy, precision and recall computed on real data sets in notebooks, a step past the board unit.
Open the course →Ans. The short version
The class 10 AI formulas for CBSE 417 in 2026-27 come from four units. Evaluating Models: accuracy = (TP + TN) / total, error rate = 1 minus accuracy, precision = TP / (TP + FP), recall = TP / (TP + FN), F1 = 2PR / (P + R). Modeling: perceptron sum = inputs times weights, added, plus bias. Computer Vision: pixels = width x height, values = pixels x 3 for RGB, 2 to the power 8 = 256 levels. NLP: TFIDF = TF x log10(N / documents containing the word). Modern Age Coders drills them live, Monday and Wednesday at 9:00 PM IST, or one to one.
The sheet. Print this part
Twenty formulas and rules cover every calculation in the 417 syllabus. Numbers 1 to 16 can appear in the theory paper; 17 to 20 belong to the practical units. The worked lines underneath use the same figures, so you can check each one.
| No. | Formula or rule | Unit | Worked one-liner |
|---|---|---|---|
| 1 | Total = TP + FP + FN + TN | 3 | 56 + 14 + 8 + 122 = 200 |
| 2 | Accuracy = (TP + TN) / total | 3 | (56 + 122) / 200 = 0.89 |
| 3 | Error rate = (FP + FN) / total = 1 - accuracy | 3 | 22 / 200 = 0.11 |
| 4 | Precision = TP / (TP + FP) | 3 | 56 / 70 = 0.80 |
| 5 | Recall = TP / (TP + FN) | 3 | 56 / 64 = 0.875 |
| 6 | F1 = 2 x P x R / (P + R) | 3 | 2 x 0.80 x 0.875 / 1.675 = 0.84 |
| 7 | Error = |actual - predicted|; error rate = error / actual; accuracy = 1 - error rate | 3 | |250 - 230| = 20; 20 / 250 = 0.08; 0.92 |
| 8 | Train-test split: rows x share | 3 | 1,200 at 75:25 = 900 train, 300 test |
| 9 | Perceptron sum = x1w1 + x2w2 + ... + bias; output 1 if it passes the threshold | 2 | 0.2 + 0 - 0.4 + 0.6 - 0.3 = 0.1, so 1 |
| 10 | Pixels = width x height | 5 | 1024 x 768 = 786,432 |
| 11 | Values stored = pixels x channels (1 grayscale, 3 RGB) | 5 | 786,432 x 3 = 2,359,296 |
| 12 | Levels = 2bits; values run 0 to 2bits - 1 | 5 | 28 = 256, so 0 to 255 |
| 13 | Tokens = words + punctuation marks | 6 | "Rain fell, and the match stopped." = 8 |
| 14 | Bag of Words vector = count of each dictionary word, in dictionary order | 6 | [ball, bat, run, out] for "bat ball bat run" = [1, 2, 1, 0] |
| 15 | TF = count of the word in that document; IDF = N / DF | 6 | N 6, word in 3 documents: IDF = 6 / 3 = 2 |
| 16 | TFIDF = TF x log10(N / DF) | 6 | 2 x log10 2 = 0.602 |
| 17 | Mean = sum / count | 4, practical | 72 / 6 = 12 |
| 18 | Median = middle of the sorted list; even count: average of the two middle values | 4, practical | 9, 9, 11, 12, 14, 17: (11 + 12) / 2 = 11.5 |
| 19 | Mode = the most frequent value | 4, practical | 9 appears twice, so 9 |
| 20 | Convolution output size = n - k + 1 | 5, practical | 7 x 7 image, 3 x 3 kernel: 5 x 5 |
Evaluating Models, worth 10 theory marks, holds six of the twenty and supplies most of the calculation items in a paper. In the latest sample paper the perceptron sum appears only as a one-mark objective item, and pixel or token counts usually do too. TFIDF can come as a short calculation inside an NLP answer.
Print the table above on its own: choose Print in your browser, set the range to the first page, and save as PDF if you want a file. It is meant to be read the evening before the paper, after you have written each formula from memory first.
Formulas 1 to 8. Evaluating Models
Accuracy is correct predictions over all predictions; precision is how many of the predicted positives were right; recall is how many of the real positives were caught; F1 combines precision and recall into one score. All four start from the confusion matrix, so build that first.
A plant-disease app checks 200 leaf photos.
Really diseased Healthy
Predicted sick TP = 56 FP = 14
Predicted fine FN = 8 TN = 122
Accuracy = 178 / 200 = 0.89
Error rate = 22 / 200 = 0.11
Precision = 56 / 70 = 0.80
Recall = 56 / 64 = 0.875
F1 = 1.4 / 1.675 = 0.84
The plain average of precision and recall is 0.8375. F1 is never above the average, and it falls further when the two are far apart.
tp, fp, fn, tn = 56, 14, 8, 122 total = tp + fp + fn + tn p = tp / (tp + fp) r = tp / (tp + fn) print(total, (tp + tn) / total, (fp + fn) / total) print(p, r, round(2 * p * r / (p + r), 2)) # output 200 0.89 0.11 0.8 0.875 0.84
Writing the formulas as code is a good self-test: if the program needs a number you cannot find in the matrix, you have the formula wrong.
When a model predicts a number, not a yes or no, there is no matrix. Error is the gap, ignoring the sign. A bus app predicts a 230-second wait; the bus takes 250. Error = 20 seconds, error rate = 20 / 250 = 0.08, and accuracy for that prediction = 1 - 0.08 = 0.92.
Multiply the rows by each share. 1,200 rows split 75:25 gives 900 to train on and 300 to test on. The test rows must be ones the model never saw in training.
| The costly mistake | Cell | Use |
|---|---|---|
| Missing a real case (disease, fire, fraud) | FN | Recall |
| A false alarm (good mail sent to spam) | FP | Precision |
| Both matter, or classes are uneven | FP and FN | F1 |
| Both classes common and equal in cost | All four | Accuracy |
Ten graded matrix problems are on confusion matrix numericals, and the written answers for the rest of the unit on evaluating models questions.
Formulas 13 to 16. Natural Language Processing
TFIDF = TF x log10(N / DF), where TF is how often the word appears in this document, N is the number of documents and DF is how many of them contain the word. It is high for a word common in one document and rare in the rest.
| N = 6 documents | TF | DF | TFIDF |
|---|---|---|---|
| Word in half the documents | 2 | 3 | 2 x log10(6/3) = 0.602 |
| Word in only this document | 1 | 1 | log10(6/1) = 0.778 |
| Word repeated, in two documents | 4 | 2 | 4 x log10(6/2) = 1.908 |
| Word in every document | any | 6 | log10(6/6) = 0 |
A word that appears in every document scores 0 however often it occurs, which is why stopwords such as "the" and "is" end up worthless for telling documents apart. The whole pipeline on a three-document corpus, cell by cell, is on Bag of Words and TFIDF, worked; the rest of the unit is on NLP questions and answers.
Formulas 9 to 12. Modeling and Computer Vision
The number of pixels is width times height; the number of values stored is pixels times channels; the perceptron's sum is each input times its weight, added, plus the bias. These are short one-mark calculations, so the only real risk is a slip.
inputs 1 0 1 1 weights 0.2 0.9 -0.4 0.6 bias -0.3 sum = 0.2 + 0 - 0.4 + 0.6 - 0.3 = 0.1 0.1 > 0, so output = 1
An input of 0 cancels its weight, however large: the 0.9 adds nothing. A negative weight subtracts. Forgetting the bias here gives 0.4.
import math x = [1, 0, 1, 1] w = [0.2, 0.9, -0.4, 0.6] s = sum(a * b for a, b in zip(x, w)) - 0.3 print(round(s, 2), 1 if s > 0 else 0) print(1024 * 768, 1024 * 768 * 3, 2 ** 8) print(round(2 * math.log10(6 / 3), 3), round(math.log10(6 / 1), 3), math.log10(6 / 6)) # output 0.1 1 786432 2359296 256 0.602 0.778 0.0
The round() matters: without it, Python prints the perceptron sum as 0.09999999999999998, a floating point effect, not a different answer.
| Image | Pixels (formula 10) | Values in grayscale | Values in RGB (formula 11) |
|---|---|---|---|
| 1024 x 768 | 786,432 | 786,432 | 2,359,296 |
For formula 12, an 8-bit value has 28 = 256 possible levels, 0 (black) to 255 (white). The rule works for any bit depth: with 1 bit there are only 2 levels, black and white. The perceptron is drilled on Unit 2 modeling questions and the image counts on Unit 5 computer vision questions.
Formulas 17 to 20. Practical only
Statistical Data and Advance Python are not in the theory paper, and convolution sits on the practical side of Computer Vision. Examiners ask about these in the lab exam and viva, usually as "what will this program print?".
import numpy as np from statistics import mode d = [14, 9, 11, 9, 17, 12] print(np.mean(d), np.median(d), mode(d)) # output 12.0 11.5 9
Sorted, the list is 9, 9, 11, 12, 14, 17. Six values, so the median is the average of the third and fourth. NumPy prints the mean as 12.0, a decimal, because it always divides as floating point.
output size = n - k + 1
7 x 7 image, 3 x 3 kernel -> 5 x 5
one output cell = multiply and add
patch [[1, 2], kernel [[0, 1],
[3, 4]] [1, 0]]
= 1x0 + 2x1 + 3x1 + 4x0 = 5
The kernel slides one step at a time and never hangs off the edge, which is why the output shrinks by k - 1 in each direction.
The eight suggested lab programs, written and explained, are on Python for CBSE Class 10 AI.
Using the sheet
Students rarely forget a formula outright. They lose marks by feeding it the wrong number. These are the slips we see most often when marking timed numerical sets.
| Formula | The slip | The check that catches it |
|---|---|---|
| Precision and recall | FP and FN swapped, so the two answers trade places | Precision's denominator is the "predicted yes" row; recall's is the "really yes" column |
| F1 | Taking the plain average | F1 must be at or below the average; if it is above, redo it |
| Accuracy | Dividing by TP + TN only, giving 1 | The denominator is always all four cells |
| Error, number model | A negative error | Use the gap without its sign |
| Perceptron | Bias left out, or a 0 input still counted | Write one product per input, then the bias, then add |
| RGB values | Answering in pixels when values were asked | Underline "pixels" or "values" in the question |
| Tokens | Punctuation not counted | Circle every mark before counting |
| TFIDF | Natural log, or IDF written upside down as DF / N | Use log10; a word in every document must come out 0 |
Each Monday class takes one family of formulas, metrics or NLP or images, builds it from the idea up, and works examples on screen with the class calling out each step.
The Wednesday class sets a timed numerical set on new figures, marked live, so a remembered answer is no use and only the method scores.
Before each full mock, students write this sheet from memory in five minutes. Any formula missing from their version is drilled again that week.
One-mark items that use these formulas, with answers and reasons, are on Class 10 AI MCQ with answers.
Batch or personalised: you choose
The same sheet and the same teachers, two formats. The batch works through one formula family a week with classmates racing the same clock; one to one goes straight to the formulas your child keeps getting 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
If your child knows the formulas but loses marks to small slips under time pressure, the batch's weekly timed sets usually fix it. If the confusion matrix itself does not make sense yet, a few one to one sessions that rebuild it from the idea are quicker. Fees are shown in your own currency.
Studying outside India?
The 417 formulas and marking are identical in a CBSE school in Kuwait or Nairobi, so the same sheet applies. Here is the batch hour in local time this winter.
| 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 evening hour does not suit, one to one runs at a local time you choose. More for families abroad 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 Class 10 AI formulas
Most are in Evaluating Models: accuracy, error rate, precision, recall and F1 score from a confusion matrix, plus error for number predictions and the train-test split. The others are the perceptron weighted sum, pixel and colour-value counts in Computer Vision, and token counts, Bag of Words and TFIDF in NLP. Mean, median, mode and convolution belong to the practical.
Accuracy = (TP + TN) / (TP + TN + FP + FN). Precision = TP / (TP + FP), the share of predicted positives that were right. Recall = TP / (TP + FN), the share of real positives the model caught. For TP 56, FP 14, FN 8, TN 122 they are 0.89, 0.80 and 0.875.
F1 = 2 x precision x recall / (precision + recall). It balances the two and is pulled toward the lower one. With precision 0.80 and recall 0.875, F1 = 1.4 / 1.675 = 0.84, slightly below their plain average of 0.8375. Never take the simple average.
TFIDF(W) = TF(W) x log10(N / DF(W)). TF is how many times the word appears in the document, N is the total number of documents, and DF is how many documents contain the word. For a word appearing twice in a document and in 3 of 6 documents, TFIDF = 2 x log10 2 = 0.602.
Base 10. The CBSE handbook for Class 10 AI takes log to base 10 of N divided by DF. Natural log, or the smoothed version software libraries use, gives different numbers that will not match the marking scheme, so use the log button for base 10 when you check your work.
For a model that predicts a number, error = |actual - predicted|, error rate = error / actual, and accuracy = 1 minus the error rate. A wait predicted as 230 seconds that was really 250 gives error 20, rate 0.08 and accuracy 0.92. For a classifier, error rate = (FP + FN) / total, which is 1 minus accuracy.
Multiply width by height in pixels. A 1024 x 768 image has 786,432 pixels. A grayscale image stores one value per pixel, so 786,432 values; an RGB image stores three, one each for red, green and blue, so 2,359,296. With 8 bits per value each one runs from 0 to 255.
Multiply each input by its weight, add the products, add the bias, then compare with the threshold. Inputs 1, 0, 1, 1 with weights 0.2, 0.9, -0.4, 0.6 and bias -0.3 give 0.1, above a threshold of 0, so the output is 1. In the latest sample paper this appears only as an objective item.
Yes, the numbered table at the top of this page is the cheat sheet: twenty formulas and rules with a worked line each. Use your browser's Print option and save it as a PDF if you want a file. It is for revision at home; nothing can be taken into the board exam hall.
No. They belong to Statistical Data, which is assessed only in the practical, together with Advance Python. Expect them in the lab exam and viva, often as a NumPy program whose output you must predict, such as the median of an even-length list.
Yes. Every formula on this sheet is taught from its idea and then drilled on fresh figures in timed sets, marked live, in the Monday and Wednesday 9:00 PM IST batch or one to one. It is covered by the monthly fee shown on this page, with no admission fee, and the first class is a free demo.
Start
In the free first class your child solves a short timed set across the formula families with a teacher, then goes through the working line by line on screen. Afterwards the mentor tells you which formulas are secure, which slips keep recurring, and whether the batch or one to one would suit better.
Want the whole syllabus in one sitting as well? Read the Class 10 AI one shot revision.
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