The statistics
module in Python provides functions for calculating mathematical statistics of numeric data. These functions are useful for analyzing data and performing statistical calculations with ease. Below is a list of some commonly used functions in the statistics
module, along with their descriptions and links to detailed guides for each function.
For a complete tutorial, visit Python statistics Module Tutorial.
Python statistics Module Functions Table
Function | Description |
---|---|
statistics.mean() | Calculates the arithmetic mean (average) of the given data. |
statistics.median() | Calculates the median (middle value) of the given data. |
statistics.median_low() | Calculates the low median of the given data. |
statistics.median_high() | Calculates the high median of the given data. |
statistics.median_grouped() | Calculates the median of grouped continuous data. |
statistics.mode() | Calculates the mode (most common value) of the given data. |
statistics.multimode() | Calculates a list of the most common values in the given data. |
statistics.harmonic_mean() | Calculates the harmonic mean of the given data. |
statistics.geometric_mean() | Calculates the geometric mean of the given data. |
statistics.stdev() | Calculates the standard deviation of the given data. |
statistics.variance() | Calculates the variance of the given data. |
statistics.pstdev() | Calculates the population standard deviation of the given data. |
statistics.pvariance() | Calculates the population variance of the given data. |
statistics.quantiles() | Divides the given data into intervals based on quantiles. |
statistics.fmean() | Calculates the mean of the given data using floating-point arithmetic. |
For more detailed information on each function, refer to the official Python documentation.