Class 9 AI Notes – Unit 3: Maths for AI (Statistics and Probability)

🔗 How are Maths and AI Related?

Mathematics is the Foundation of AI

Think of Math as the “language” that AI speaks. Just like we need language to communicate, AI needs math to think and make decisions.

Key Connections:

  1. Numbers and Data
  • AI processes everything as numbers
  • Example: In face recognition, your face becomes numbers (pixels values)
  • A photo of 100×100 pixels = 10,000 numbers for AI to process
  1. Patterns and Formulas
  • AI finds patterns using mathematical formulas
  • Example: YouTube uses math to find pattern in your watching habits
  • If you watch 5 cricket videos → AI calculates you’re 80% likely to enjoy more cricket content
  1. Decision Making
  • AI uses math to choose best option
  • Example: Google Maps calculates shortest path
  • Route A: 5km + heavy traffic = 30 min
  • Route B: 7km + no traffic = 20 min
  • AI chooses Route B using math
  1. Learning from Mistakes
  • AI uses math to improve
  • Example: Autocorrect learns from corrections
  • You type “teh” → correct to “the” 100 times
  • AI calculates: 100% chance “teh” should be “the”

Real-World Example:

Instagram Filters

  • Detects face position (geometry)
  • Calculates where to place dog ears (coordinates)
  • Adjusts size based on face size (proportions)
  • All using mathematical calculations!

📐 Essential Mathematics for AI

1. Basic Arithmetic

  • Addition, subtraction, multiplication, division
  • AI Use: Calculating scores, distances, costs
  • Example: Food delivery app calculating total bill

2. Algebra

  • Using variables and equations
  • AI Use: Finding unknown values
  • Example: If 3 apples cost ₹60, find cost of 5 apples
  • AI uses: 3x = 60, so x = 20, therefore 5x = ₹100

3. Geometry

  • Shapes, angles, distances
  • AI Use: Face recognition, object detection
  • Example: Snapchat filters need to know distance between eyes

4. Statistics (Covered in detail below)

  • Analyzing data patterns
  • AI Use: Making predictions
  • Example: Predicting tomorrow’s weather

5. Probability (Covered in detail below)

  • Calculating chances
  • AI Use: Risk assessment
  • Example: Spam email detection

6. Calculus (Advanced – for reference)

  • Rate of change
  • AI Use: Optimizing learning
  • Example: How fast self-driving car should brake

📊 Statistics (Detailed)

What is Statistics?

Statistics is the science of collecting, organizing, analyzing, and interpreting data to make decisions.

Key Statistical Concepts:

1. Data Types

  • Quantitative: Numbers (marks, height, weight)
  • Qualitative: Categories (favorite color, gender)

Example Dataset: Class 9A Test Scores

Students: Ram(85), Priya(92), Amit(78), Sita(88), Raj(75)

2. Measures of Central Tendency

Mean (Average)
  • Sum of all values ÷ Total count
  • Calculation: (85+92+78+88+75) ÷ 5 = 83.6
  • Real use: Average marks to judge class performance
  • AI application: Average user rating for movie recommendations
Median (Middle Value)
  • Arrange in order: 75, 78, 85, 88, 92
  • Middle value = 85
  • Real use: Finding typical salary (not affected by extreme values)
  • AI application: Finding typical user behavior
Mode (Most Frequent)
  • Value that appears most often
  • Example: Shoe sizes sold: 6,7,7,7,8,8,9
  • Mode = 7 (appears 3 times)
  • AI application: Most purchased item for inventory

3. Measures of Spread

Range
  • Highest value – Lowest value
  • Example: 92 – 75 = 17
  • Real use: Temperature variation in a day
  • AI application: Detecting anomalies in data
Variance and Standard Deviation
  • How spread out data is from mean
  • Simple understanding:
  • Low spread = Most students scored close to 83.6
  • High spread = Scores vary a lot
  • AI application: Risk assessment in stock market

4. Data Visualization

Bar Graph
  • Use: Comparing categories
  • Example: Subject-wise marks comparison
  • AI application: Showing product sales by category
Histogram
  • Use: Showing distribution
  • Example: Number of students in mark ranges (0-40, 41-60, 61-80, 81-100)
  • AI application: Age distribution of app users
Pie Chart
  • Use: Showing parts of whole
  • Example: Time spent on activities in a day
  • AI application: Market share visualization
Line Graph
  • Use: Showing trends over time
  • Example: Monthly pocket money savings
  • AI application: Stock price trends
Box Plot
  • Use: Showing data summary
  • Shows median, quartiles, outliers
  • AI application: Comparing algorithm performances

🎯 Applications of Statistics in AI

1. Predictive Analytics

  • Example: IPL match winner prediction
  • Uses past match statistics
  • Considers batting average, bowling figures, ground history

2. Pattern Recognition

  • Example: Handwriting recognition
  • Statistical analysis of letter shapes
  • Identifies your unique writing pattern

3. Quality Control

  • Example: Manufacturing defect detection
  • If average defect = 2%, current = 5%
  • AI alerts: Something wrong in production!

4. Recommendation Systems

  • Example: Netflix suggestions
  • Statistics of what similar users watched
  • If 80% who liked Movie A also liked Movie B → Recommend B

5. Healthcare

  • Example: Disease prediction
  • Statistical analysis of symptoms
  • 90% with symptoms X, Y, Z have flu → Likely diagnosis

6. Weather Forecasting

  • Example: Rain prediction
  • Historical weather patterns
  • If similar conditions led to rain 70% times → 70% rain chance

🎲 What is Probability in Statistics?

Definition:

Probability measures the likelihood (chance) of an event happening, expressed as a number between 0 and 1.

Probability Scale:

  • 0 = Impossible (Sun rising from west)
  • 0.5 = Equal chance (Coin toss)
  • 1 = Certain (Sun rising from east)

Basic Probability Formula:

Probability = Number of favorable outcomes / Total number of possible outcomes

Examples:

1. Simple Probability

Dice Roll Example:

  • Want to roll a 6
  • Favorable outcomes = 1 (only one 6)
  • Total outcomes = 6 (faces on dice)
  • Probability = 1/6 = 0.167 or 16.7%

2. Compound Events

Card Example:

  • Drawing a red card from deck
  • Red cards = 26 (13 hearts + 13 diamonds)
  • Total cards = 52
  • Probability = 26/52 = 1/2 = 50%

Types of Probability:

1. Theoretical Probability

  • Based on logic and reasoning
  • Example: Coin toss = 50% heads

2. Experimental Probability

  • Based on actual experiments
  • Example: Tossed coin 100 times, got 48 heads
  • Experimental probability = 48/100 = 48%

3. Conditional Probability

  • Probability given something already happened
  • Example: Probability of rain given cloudy sky
  • Changes based on condition

Probability Rules:

  1. Addition Rule
  • P(A or B) = P(A) + P(B) – P(A and B)
  • Example: Probability of getting either red card OR face card
  1. Multiplication Rule
  • P(A and B) = P(A) × P(B) for independent events
  • Example: Probability of getting heads twice in a row = 1/2 × 1/2 = 1/4
  1. Complement Rule
  • P(not A) = 1 – P(A)
  • Example: If rain probability = 30%, then no rain = 70%

🚀 Applications of Probability in AI

1. Spam Email Detection

  • How it works:
  • Calculates probability email is spam
  • Checks words like “lottery”, “free money”
  • If P(spam) > 0.8 → Move to spam folder
  • Real calculation:
  • Email has “lottery” → 90% spam probability
  • Email from known contact → 10% spam probability

2. Medical Diagnosis AI

  • Example: COVID detection from symptoms
  • Fever + cough → 60% probability
  • + loss of taste → 85% probability
  • + contact with patient → 95% probability
  • AI suggests: Get tested immediately

3. Weather Prediction

  • Multiple factors:
  • Temperature pattern → 40% rain chance
  • + humidity high → 60% rain chance
  • + clouds forming → 80% rain chance
  • AI combines all probabilities for forecast

4. Game AI

  • Chess example:
  • AI calculates probability of winning with each move
  • Move A: 65% win chance
  • Move B: 45% win chance
  • AI chooses Move A

5. Voice Assistants

  • Understanding speech:
  • “Call mom” coul

Discover more from EduGrown School

Subscribe to get the latest posts sent to your email.

Subscribe