Math for AI
Math for AI
,
(STATISTICS & DAV PUBLIC SCHOOL,
VELACHERY, CHENNAI
PROBABILITY)
HOW ARE MATH AND AI
RELATED?
Math is the study of patterns
To solve the puzzles, you identify an
order/arrangement in the list of numbers or
the images.
This arrangement is called a pattern.
These patterns exist all around us.
We have patterns in numbers, images, and
language.
KEY MATHEMATICAL
AREAS
Linear Algebra: IN AI
Used in processing images, creating neural
networks, and handling data in large matrices.
Probability and Statistics: Essential for making predictions,
dealing with uncertainties, and handling data patterns.
Calculus: Plays a key role in optimizing algorithms, especially
in training machine learning models through gradient
descent.
Discrete Mathematics: Important for algorithms, logic, and
understanding complex data structures.
AI USES MATH FOR:
Statistics (Exploring data): Example – What is the middle
value of the data? Which is the most common value in the
data?
Formula:
Mean=Sum of all values / Total number of values
Example:
Dataset: 5, 8, 12, 10, 15
Mean=(5+8+12+10+15)/5=50/5=10
MEAN FROM GROUPED
DATA
Formula for Mean from Steps:
Grouped Data: Calculate the midpoint (x) of
Mean = ∑(f×x)/N each class interval.
Where: Multiply each midpoint by
f = frequency of the class the corresponding frequency
(f).
x = midpoint of the class Sum up the products of f×x.
interval
Divide the total sum by the
N = total frequency (sum
total frequency (N).
of all frequencies)
EXAMPLE FOR MEAN FROM GROUPED DATA
Class Frequency Midpoint
Interval (f) (x) f×x
0-10 5 5 25
10-20 8 15 120
20-30 12 25 300
30-40 10 35 350
Given grouped data:
F × x = 25 + 120 + 300 + 350 = 795
Total frequency
N = 5 + 8 + 12 + 10 = 35
Mean = 795/35 = 22.71
MEDIAN
Definition:
The median is the middle value in a sorted dataset,
which divides the data into two equal halves.
Steps to Find the Median:
Sort the data in ascending or descending order.
If the number of data points (n) is odd:
The median is the middle value, i.e., the value at
position (n+1)/2.
If the number of data points (n) is even:
The median is the average of the two middle values,
i.e., the average of the values at positions (n/2)
and (n+1)/2
EXAMPLE FOR MEDIAN
Odd number of data points:
Dataset: 3, 5, 8, 12, 15
Median = 8 (middle value)
Even number of data points:
Dataset: 3, 5, 8, 12
Median = (5+8)/2=6.5
MEDIAN FROM GROUPED
DATA
Formula for Median from Steps to Calculate Median:
Grouped Data:
Median=L+ x h Determine the median class: