Page 202 - Robotics and AI class 10
P. 202
(N+1) th
2
For even number of dataset:
N th term+ N +1 term
2 2
2
To calculate median in Python :
import statistics
marks=[45,34,41,46,47,39,38,48,45,34,41,39,39]
m=statistics.median(marks)
print("the middle value of the sorted marks in class :",m)
Output:
the middle value of the sorted marks in class : 41
● Mode
It is the most frequent value in a given dataset.
There is no formula for this:
Mode = The value in the data set that occurs most frequently
To calculate mode in Python :
import statistics
marks=[45,34,41,46,47,39,38,48,45,34,41,39,39]
m=statistics.mode(marks)
print("the most frequent marks :",m)
Output:
the most frequent marks : 39
● Standard Deviation
It is the measure of dispersion of a set of data from its mean. The higher the dispersion of the data, the greater
is the standard deviation and vica versa.
The formula for calculation:
∑ ( x - mean) 2
σ =
n
To calculate Standard Deviation in Python:
import statistics
` marks=[45,34,41,46,47,39,38,48,45,34,41,39,39]
m=statistics.stdev(marks)
print("the standard deviation of marks :",round(m,2))
Output:
the standard deviation of marks : 4.66
200 Touchpad Robotics & Artificial Intelligence-X

