Learn and Learn

Learn And Learn - great place for tutorials, references and how-to

Python Statistics Functions

Python statistics module is used to calculate mathematical statistics of numeric (Real-valued) data. Following is a complete list of Python 3.x math statistics functions. Statistics functions is a part of python standard reference library. Every stats function is well defined in this reference with effective and easy to understand examples and code snippets.

This module is new and added in Python 3.4 version.

All Python statistics functions are listed below in alphabetical order.

Averages And Measures of Central Location

mean()median()median_high()mode()
harmonic_mean()median_low()median_grouped()

Measures of Spread

pstdev()pvariance()stdev()variance()

 

Averages and Measures of Central Location

Please click on any function name for more detail, examples and code snippets.

Function NameFunction Description
mean(data)Return a floating point number after calculating the average or arithmetic mean of given data in the iterator (lists, tuples, etc…)
harmonic_mean(data)Return harmonic mean of given input in floating point value.
median(data)Return the median floating point number.
median_low(data)Return a floating point number after calculating low median of given data in iterator(lists, tuples).
median_high(data)Return a value after calculating high median of given input.
median_grouped(data, interval=1)Return a floating point number after calculating median of given data in iterator (lists, tuples)
mode(data)Return a floating point number or nominal (non-numeric) value depending upon given data in parameter after calculating mode of given data in iterator (lists, tuples)

 

Measures of Spread

Please click on any function name for more detail, examples and code snippets.

Function NameFunction Description
pstdev(data, mu=None)Return a floating point number value after calculating Population Standard Deviation of given data in iterator (lists, tuples)
pvariance(data, mu=None) Returns the population variance of data.
stdev(data, xbar=None)Return a floating point number value after calculating standard deviation of given data in iterator(lists, tuples)
variance(data, xbar=None)Returns the sample variance of data.

Loading...
LearnAndLearn.com © 2018 - All rights reserved