Given a sequence {a_i}_(i = 1)^N, an n-moving average is a new sequence {s_i}_(i = 1)^(N - n + 1) defined from the a_i by taking the arithmetic mean of subsequences of n terms, s_i = 1/n sum_(j = i)^(i + n - 1) a_j. So the sequences S_n giving n-moving averages are S_2 | = | 1/2(a_1 + a_2, a_2 + a_3, ..., a_(n - 1) + a_n) S_3 | = | 1/3(a_1 + a_2 + a_3, a_2 + a_3 + a_4, ..., a_(n - 2) + a_(n - 1) + a_n). 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.