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