Javatpoint Logo
Javatpoint Logo

Python statistics module

Python statistics module provides the functions to mathematical statistics of numeric data. There are some popular statistical functions defined in this module.

mean() function

The mean() function is used to calculate the arithmetic mean of the numbers in the list.

Example

Output:

Mean is : 4.857142857142857

median() function

The median() function is used to return the middle value of the numeric data in the list.

Example

Output:

Median of data-set is : 4.5

mode() function

The mode() function returns the most common data that occurs in the list.

Example

Output:

Calculated Mode 2

stdev() function

The stdev() function is used to calculate the standard deviation on a given sample which is available in the form of the list.

Example

Output:

Standard Deviation of sample is 1.5811388300841898

median_low()

The median_low function is used to return the low median of numeric data in the list.

Example

Output:

Low median of the data-set is 5

median_high()

The median_high function is used to return the high median of numeric data in the list.

Example

Output:

High median of the data-set is 6
Next TopicPython Tutorial





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA