Arithmetic mean - mauriceling/mauriceling.github.io GitHub Wiki

Purpose: To calculate arithmetic mean (commonly known as average) of a data set.

Code:

>>> from scipy import stats
>>> X = [9.07, 8.97, 6.41, 3.03, 1.19, 2.67, 2.81, 9.2]
>>> result = stats.describe(X)
>>> print("Arithmetic mean = %.2f" % result.mean)
Arithmetic mean = 5.42