Given a sequence , an
-moving average is a new sequence
defined from the
by taking the arithmetic
mean of subsequences of
terms,
(1)
|
So the sequences
giving
-moving
averages are
(2)
| |||
(3)
|
and so on. The plot above shows the 2- (red), 4- (yellow), 6- (green), and 8- (blue) moving averages for a set of 100 data points.
Moving averages are implemented in the Wolfram Language as MovingAverage[data, n].