Home

Awesome

MicroPython Statistics module

Statistics module for MicroPython, based on statistics module for Python 3 (>= 3.4) :

All Python 3 statistics functions are implemented on MicroPython version, with the same syntax :

FunctionDescription
mean()Arithmetic mean (“average”) of data
harmonic_mean()Harmonic mean of data
median()Median (middle value) of data
median_low()Low median of data
median_high()High median of data
median_grouped()Median, or 50th percentile, of grouped data
mode()Mode (most common value) of discrete data
pstdev()Population standard deviation of data
pvariance()Population variance of data
stdev()Sample standard deviation of data
variance()Sample variance of data

The MicroPython version of statistics module has some limitations :

Many MicroPython modules are optimised to save RAM memory because many microcontrollers only have tens of KBytes.