math built-in module there are a few aggregate
functions useful for calculating statistics. There is
mean for calculating the arithmetic mean of a set.
Since this function belongs to the
math module, the
module name needs to be specified when calling it:
stddev_pop for calculating the
sample and population standard deviation, respectively.
Similarly, there are
var_pop for calculating
sample and population variance. Try them out: