Machine learning / Median Calculation Using Numpy

It is the middle number in a sorted list of numbers.

Mean = Sum of all data / Number of Items Count in Data Set.

Example: Let us take a data set of some numbers
Ds= [40,10,20,25,24,40,40,14,16]
Number of points in the data set = 9
median value after sorting the data set = 24

Statistical Calculation Python Program Output
Median import numpy
ds = [40,10,20,25,24,40,40,14,16]
mediancal = numpy.median(ds)
print(mediancal)
24.0


Home     Back