CBSE Class 10 · Artificial Intelligence, code 417 · Formula sheet 2026-27

Class 10 AI formulas: every formula in CBSE 417 on one sheet, each worked once.

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

Courses behind this formula sheet

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.

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

What formulas are in class 10 AI? The complete list

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 ruleUnitWorked one-liner
1Total = TP + FP + FN + TN356 + 14 + 8 + 122 = 200
2Accuracy = (TP + TN) / total3(56 + 122) / 200 = 0.89
3Error rate = (FP + FN) / total = 1 - accuracy322 / 200 = 0.11
4Precision = TP / (TP + FP)356 / 70 = 0.80
5Recall = TP / (TP + FN)356 / 64 = 0.875
6F1 = 2 x P x R / (P + R)32 x 0.80 x 0.875 / 1.675 = 0.84
7Error = |actual - predicted|; error rate = error / actual; accuracy = 1 - error rate3|250 - 230| = 20; 20 / 250 = 0.08; 0.92
8Train-test split: rows x share31,200 at 75:25 = 900 train, 300 test
9Perceptron sum = x1w1 + x2w2 + ... + bias; output 1 if it passes the threshold20.2 + 0 - 0.4 + 0.6 - 0.3 = 0.1, so 1
10Pixels = width x height51024 x 768 = 786,432
11Values stored = pixels x channels (1 grayscale, 3 RGB)5786,432 x 3 = 2,359,296
12Levels = 2bits; values run 0 to 2bits - 1528 = 256, so 0 to 255
13Tokens = words + punctuation marks6"Rain fell, and the match stopped." = 8
14Bag of Words vector = count of each dictionary word, in dictionary order6[ball, bat, run, out] for "bat ball bat run" = [1, 2, 1, 0]
15TF = count of the word in that document; IDF = N / DF6N 6, word in 3 documents: IDF = 6 / 3 = 2
16TFIDF = TF x log10(N / DF)62 x log10 2 = 0.602
17Mean = sum / count4, practical72 / 6 = 12
18Median = middle of the sorted list; even count: average of the two middle values4, practical9, 9, 11, 12, 14, 17: (11 + 12) / 2 = 11.5
19Mode = the most frequent value4, practical9 appears twice, so 9
20Convolution output size = n - k + 15, practical7 x 7 image, 3 x 3 kernel: 5 x 5

Where these formulas earn marks

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.

Printing it

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, precision, recall and F1 formula for class 10 AI

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.

One matrix, eight formulas200 test cases
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.

The same, checked in Pythonrun as printed
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.

Error for a number prediction (formula 7)

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.

Train-test split (formula 8)

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.

Which metric the question wants

The costly mistakeCellUse
Missing a real case (disease, fire, fraud)FNRecall
A false alarm (good mail sent to spam)FPPrecision
Both matter, or classes are unevenFP and FNF1
Both classes common and equal in costAll fourAccuracy

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 formula for class 10, with tokens and Bag of Words

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.

The four NLP rules in order

  1. Tokens. Split into words and keep each punctuation mark as its own token. "Rain fell, and the match stopped." has six words, a comma and a full stop: 8 tokens.
  2. Bag of Words. After normalising, list each unique word once as the dictionary, then count. Dictionary [ball, bat, run, out]; "bat ball bat run" becomes [1, 2, 1, 0]. Order follows the dictionary, not the sentence.
  3. TF and IDF. TF is the raw count from the vector. The CBSE handbook writes IDF as the ratio N / DF, and takes its logarithm in the next step.
  4. TFIDF. Multiply TF by log10 of that ratio. Base 10, not the natural log: a calculator's ln key gives different numbers that will not match the marking scheme.
N = 6 documentsTFDFTFIDF
Word in half the documents232 x log10(6/3) = 0.602
Word in only this document11log10(6/1) = 0.778
Word repeated, in two documents424 x log10(6/2) = 1.908
Word in every documentany6log10(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

Pixel, colour value and perceptron formulas

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.

Formula 9, perceptronthreshold 0
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.

Formulas 9 to 16, checkedrun as printed
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.

ImagePixels (formula 10)Values in grayscaleValues in RGB (formula 11)
1024 x 768786,432786,4322,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

Statistics and convolution: the formulas for the practical and viva

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?".

Formulas 17 to 19numpy, run as printed
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.

Formula 20, convolutionpractical side of Unit 5
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

AI class 10 cheat sheet: the slips that cost formula marks

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.

FormulaThe slipThe check that catches it
Precision and recallFP and FN swapped, so the two answers trade placesPrecision's denominator is the "predicted yes" row; recall's is the "really yes" column
F1Taking the plain averageF1 must be at or below the average; if it is above, redo it
AccuracyDividing by TP + TN only, giving 1The denominator is always all four cells
Error, number modelA negative errorUse the gap without its sign
PerceptronBias left out, or a 0 input still countedWrite one product per input, then the bias, then add
RGB valuesAnswering in pixels when values were askedUnderline "pixels" or "values" in the question
TokensPunctuation not countedCircle every mark before counting
TFIDFNatural log, or IDF written upside down as DF / NUse log10; a word in every document must come out 0

One family per Monday

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.

Fresh numbers on Wednesday

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.

Formula recall inside mocks

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

Drill these formulas in the batch, or one to one

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

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 formula family taught each week
  • A timed numerical set on fresh figures every Wednesday
  • The sheet written from memory before every mock
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

  • Days and time picked by you, in your own time zone
  • Only the formulas your child slips on
  • The same formula reworked on new numbers until steady
  • Working checked line by line on screen
  • Same CBSE 417 syllabus and teachers
Ask for a personalised plan

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?

Class 10 AI formulas practice for CBSE students in the Gulf and abroad

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 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 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

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 Class 10 AI formulas

What students ask about class 10 AI formulas

What are the formulas in class 10 AI?

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.

What is the formula of accuracy, precision and recall?

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.

What is the F1 score formula in class 10 AI?

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.

What is the TFIDF formula for class 10?

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.

Is log base 10 or natural log used for TFIDF in class 10 AI?

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.

How do you calculate error in class 10 AI?

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.

How do you calculate the number of pixels in an image?

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.

How is the perceptron output calculated?

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.

Is there an AI class 10 cheat sheet I can print?

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.

Are mean, median and mode asked in the class 10 AI theory paper?

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.

Do your classes cover all these numericals?

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

Try a timed numerical set free, with a teacher

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.

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