VM-LEARNING /class.ix ·track.ai ·ch-b3 session: 2026_27
$cd ..

~/Math for AI

root@vm-learning ~ $ open ch-b3
PART B ▪ UNIT 3
08
Math for AI
Statistics & Probability – The Language of AI
Mathematics is the language of AI. Just as humans use language to express thoughts, AI uses math to understand data and take decisions. Every AI system – from Google Assistant to self-driving cars – works on mathematical calculations.
You don't need to be a maths genius to learn AI. But understanding basic math concepts – especially statistics and probability – helps us understand how AI thinks and takes decisions.
SUB-UNIT 1: IMPORTANCE OF MATH FOR AI
Learning Outcome: Analyze data (numbers/images) and find relation/pattern using Math

1.1 Why is Math Important for AI?

AI works by analyzing data – which can be numbers, images, text, or sound. To analyze this data, AI uses mathematics for:

  1. Finding patterns in large amounts of data.
  2. Making predictions about future events.
  3. Recognizing images and faces.
  4. Understanding language (NLP).
  5. Training AI models to learn from experience.
  6. Measuring accuracy of predictions.
  7. Optimizing – choosing the best solution.
  8. Decision making – weighing options numerically.
When Netflix recommends a movie, it uses math to calculate similarity between your preferences and other users' preferences. When Google Maps shows the fastest route, it uses math to compare thousands of possible paths.

1.2 Uses of Math in AI – The Four Main Branches

Four main branches of mathematics are used in AI:

📊
1. Statistics
Helps in analyzing data, finding averages, trends, and making sense of large data. Used for prediction and decision-making.
🔢
2. Linear Algebra
Deals with vectors, matrices, and equations. Used in image processing, neural networks, and computer vision.
🎲
3. Probability
Helps in predicting the chances of an event happening. Used in risk analysis, weather forecasting, and recommendations.
📈
4. Calculus
Deals with change and motion. Used to train AI models and improve their accuracy (optimization).
🔹 Real-World AI Uses of Each Branch
BranchReal-World AI Use
StatisticsSpam email detection, sports analytics, customer behaviour analysis.
Linear AlgebraFace recognition, image filters, Google search ranking.
ProbabilityWeather forecast, Netflix / YouTube recommendations, medical diagnosis.
CalculusSelf-driving cars, deep learning, optimization of AI models.

1.3 Finding Patterns in Numbers and Images

AI is very good at finding patterns in data – something that would take humans a very long time. These patterns help AI make predictions and decisions.

🔢 Number Patterns
A sequence of numbers that follow a specific rule. AI identifies the rule to predict the next number.

Examples: Arithmetic sequences, multiplication tables, Fibonacci series.
🖼️ Picture / Image Patterns
Finding connections, similarities, or rules between images. Used in computer vision to recognize objects and faces.

Examples: Face recognition, object detection, picture analogies.

🔢 Number Patterns (Examples)

Number patterns follow a rule. Look at the sequence and find the next number:

2, 4, 6, 8, 10, ?
(Rule: Add 2. Next = 12)
1, 3, 5, 7, 9, ?
(Rule: Odd numbers. Next = 11)
2, 4, 8, 16, 32, ?
(Rule: Multiply by 2. Next = 64)
1, 1, 2, 3, 5, 8, ?
(Rule: Sum of last two numbers. Next = 13. Fibonacci series!)
🔹 Types of Number Patterns
Activity – Observe the Number Pattern: Look at this sequence and find the missing number.
5, 10, 20, 40, 80, ?
Answer: 160 (each number is multiplied by 2).

🖼️ Picture Analogy

Picture Analogy is a type of reasoning where you find the relationship or pattern between a pair of images and apply the same rule to another pair.
🔹 How Picture Analogy Works

The basic format is:

A : B :: C : ?
(A is to B as C is to ?)
Example: 🐄 : 🥛 :: 🐔 : ?
Answer: 🥚 (Cow gives milk, so hen gives egg.)

Example: ☀️ : Day :: 🌙 : ?
Answer: Night
🔹 Uses of Picture Analogy in AI
Activity – Picture Analogy: Look at pairs of images and find connections between them. Use the pattern to solve similar problems. This is exactly how AI learns visual relationships!
SUB-UNIT 2: STATISTICS
Learning Outcome: Understand the concept of Statistics in real life

2.1 Definition of Statistics

Statistics is the branch of mathematics that deals with the collection, organization, analysis, interpretation, and presentation of data. It helps us understand large amounts of information and make decisions based on it.
🔹 Key Features of Statistics

2.2 Basic Statistical Measures

In statistics, we commonly use the following measures to describe data:

📊 1. Mean (Average)

Mean = Sum of all values ÷ Number of values
Marks of 5 students: 80, 70, 90, 60, 75
Mean = (80+70+90+60+75) ÷ 5 = 375 ÷ 5 = 75

📊 2. Median (Middle Value)

The middle value when all numbers are arranged in order.

Data: 3, 5, 7, 9, 11
Median = 7 (middle value)

Data (even count): 4, 6, 8, 10
Median = (6+8) ÷ 2 = 7

📊 3. Mode (Most Frequent)

The value that appears most often in data.

Data: 2, 4, 4, 6, 7, 4, 8
Mode = 4 (appears 3 times)

📊 4. Range (Spread of Data)

Range = Highest value − Lowest value
Marks: 45, 78, 60, 92, 55
Range = 92 − 45 = 47

2.3 Applications of Statistics

Statistics is used in almost every field of life. The main applications mentioned in the syllabus are:

🌪️ 1. Disaster Management Statistics helps predict disasters like earthquakes, floods, and cyclones by analyzing past data. Helps plan evacuation, rescue, and relief.
2. Sports Used to analyze player performance, team statistics, win/loss ratios, batting averages, goals scored, etc. Used in cricket, football, Olympics.
🏥 3. Disease Prediction Used to predict disease outbreaks, track patients, analyze treatment effectiveness. Very important during COVID-19 pandemic.
☀️ 4. Weather Forecast Uses past weather data to predict future weather – temperature, rain, wind speed. Helps farmers and travellers.

2.4 Other Uses of Statistics in Daily Life

Activity 1 – Uses of Statistics in Daily Life: Students collect real-life data (e.g., daily temperature, marks, spending) and apply mean, median, mode, and range to analyze it.
Activity 2 – Car Spotting and Tabulating
Purpose: Implement data collection, analysis, and interpretation.
How to do it:
  1. Stand near a road for 15-30 minutes.
  2. Note down the colour and type (car, bike, bus, truck) of each vehicle passing by.
  3. Prepare a tally table:
    ColourTallyCount
    Red||||4
    White|||| ||7
    Black|||3
  4. Answer questions: Which colour is most common? What is the mean count per minute?
  5. Create a bar graph of your data.
This activity shows how AI collects and analyses data in real life!
SUB-UNIT 3: PROBABILITY
Learning Outcome: Understand the concept of Probability in real life

3.1 Introduction to Probability

Probability is a branch of mathematics that measures the chance or likelihood of an event happening. It tells us how likely something is to occur.
🔹 Key Points About Probability
🔹 Probability Scale
0Impossible
0.25Unlikely
0.5Even Chance
0.75Likely
1Certain

3.2 How to Calculate Probability of an Event

P(Event) = Number of favourable outcomes ÷ Total number of possible outcomes
🔹 Key Terms
🔹 Simple Examples
Example 1 – Tossing a coin:
Total outcomes = 2 (Head, Tail)
Favourable outcomes for Head = 1
P(Head) = 1/2 = 0.5 or 50%
Example 2 – Rolling a dice:
Total outcomes = 6 (1, 2, 3, 4, 5, 6)
Favourable outcomes for getting "4" = 1
P(4) = 1/6 ≈ 0.167 or 16.67%
Example 3 – Rolling a dice for an even number:
Total outcomes = 6
Even outcomes = 3 (2, 4, 6)
P(even) = 3/6 = 1/2 = 0.5 or 50%
Example 4 – Picking a red ball from a bag with 3 red and 5 blue balls:
Total balls = 8
Favourable (red) = 3
P(red) = 3/8 = 0.375 or 37.5%

3.3 Types of Events in Probability

1. Sure / Certain EventAn event that will definitely happen. Probability = 1.
Example: The sun rising tomorrow.
2. Impossible EventAn event that cannot happen. Probability = 0.
Example: Getting 7 on a normal dice.
3. Simple EventAn event with only one outcome.
Example: Getting "Head" on a coin toss.
4. Compound EventAn event with more than one outcome.
Example: Getting an even number (2, 4, 6) on a dice.
5. Independent EventsEvents that do NOT affect each other.
Example: Tossing a coin twice.
6. Dependent EventsEvents that affect each other.
Example: Drawing 2 cards without replacement.
7. Mutually Exclusive EventsEvents that cannot happen together.
Example: Getting Head AND Tail in one toss.
8. Equally Likely EventsEvents with same probability.
Example: Getting Head or Tail on a fair coin.
9. Complementary EventsOne event happens OR the other; P(A) + P(not A) = 1.
Example: Pass or Fail an exam.
10. Exhaustive EventsAll possible outcomes combined.
Example: All 6 faces of a dice.
Exercise – Identify the Type of Event:
  1. Getting a number less than 7 on a dice → Sure Event
  2. A dog laying eggs → Impossible Event
  3. Getting a "3" on a dice → Simple Event
  4. Getting an odd number on a dice → Compound Event
  5. Winning a cricket match and losing it → Mutually Exclusive

3.4 Applications of Probability in Real Life

Probability is used in many real-life and AI applications:

1. Sports Predicting team winning chances, player performance, match outcomes. IPL uses probability to predict team wins.
☁️ 2. Weather Forecast "30% chance of rain today" – this is probability! Based on past weather data.
🚦 3. Traffic Estimation Google Maps calculates the probability of reaching destination at a given time based on traffic.
🏥 4. Medical Diagnosis Doctors use probability to estimate chances of disease based on symptoms.
🔹 Other Real-Life Uses
AI + Probability: Most AI models give answers in terms of probability. For example, a spam filter says "95% chance this is spam" – that's probability working inside AI!

3.5 Practice Problems (Revision Time)

Q1: A bag contains 4 red balls and 6 green balls. What is the probability of picking a green ball?
Solution: P(green) = 6/10 = 3/5 = 0.6 or 60%
Q2: When two coins are tossed together, what is the probability of getting two heads?
Solution: Total outcomes = HH, HT, TH, TT = 4
Favourable (HH) = 1
P(two heads) = 1/4 = 0.25 or 25%
Q3: A card is drawn from a deck of 52 cards. What is the probability of drawing an ace?
Solution: Total cards = 52
Aces = 4
P(ace) = 4/52 = 1/13 ≈ 0.077 or 7.7%
Q4: In a box, there are 10 mangoes of which 3 are rotten. Find the probability of picking a good mango.
Solution: Total = 10, Good = 10 − 3 = 7
P(good) = 7/10 = 0.7 or 70%

Quick Revision – Key Points to Remember

  • Math is the language of AI – it helps AI analyze, predict, and decide.
  • 4 Branches used in AI: Statistics, Linear Algebra, Probability, Calculus.
  • Number Patterns: Arithmetic, Geometric, Fibonacci, Square, Cube, Triangular.
  • Picture Analogy: A : B :: C : ? (finding relationship between image pairs).
  • Statistics = collection, organization, analysis, interpretation, and presentation of data.
  • Statistical Measures: Mean (average), Median (middle), Mode (most frequent), Range (spread).
  • Mean: Sum of values ÷ Number of values.
  • Range: Highest value − Lowest value.
  • Applications of Statistics: Disaster Management, Sports, Disease Prediction, Weather Forecast.
  • Probability = measure of how likely an event is to happen (0 to 1).
  • P(Event) = Favourable outcomes ÷ Total outcomes.
  • Probability = 0 → Impossible; Probability = 1 → Certain.
  • Types of Events: Sure, Impossible, Simple, Compound, Independent, Dependent, Mutually Exclusive, Equally Likely, Complementary, Exhaustive.
  • Applications of Probability: Sports, Weather, Traffic, Medical Diagnosis, Insurance, AI predictions.
  • AI uses Probability to give predictions (e.g., 95% spam, 80% cat).
🧠Practice Quiz — test yourself on this chapter