Important mean and measure of central location features :
1. mean () : — This function returns the average or average value of the data passed in its arguments. If the passed argument is empty, StatisticsError is thrown.
2. mode () : — this function returns a maximum number of occurrences . If the passed argument is empty, StatisticsError is raised.

Exit:
The average of list values is: 2.0 The maximum occurring element is: 2
3. median () : — this function is used to calculate the median, that is, the average item. If the passed argument is empty, StatisticsError is called.
4. median_low () : — This function returns the median of the data if the number of items is odd, but if the number of items is even, it returns the bottom of the middle two items. If the passed argument is empty, StatisticsError is thrown.
5. median_high () : — this function returns the median of the data for an odd number of elements, but for an even number of elements, returns the highest of the middle two elements. If the passed argument is empty, StatisticsError is raised.

Output:
The median of list element is: 2.5 The lower median of list element is: 2 The higher median of list element is: 3
6. median_grouped () : — This function is used to calculate the median of a group, that is, the 50th percentile of the data. If the passed argument is empty, StatisticsError is raised.

Output:
The 50th percentile of data is: 2.5
Statistical Functions in Python  Set 2 (Distribution Measure)
This article courtesy of Manjit Singh . If you are as Python.Engineering and would like to contribute, you can also write an article using contribute.python.engineering or by posting an article contribute @ python.engineering. See my article appearing on the Python.Engineering homepage and help other geeks.
Please post comments if you find anything wrong or if you would like to share more information on the topic discussed above.