--- from: http://rosettacode.org/wiki/Averages/Arithmetic_mean note: Probability and statistics