next up previous
Next: Module 1Lab Up: Module 1: Introduction Previous: Module 1 Mini-Project

Appendix I: Computing a Moving Average with an Even Number of Terms

In order to compute an l term moving average for l an even integer, we have to do what is called ``centering'' the moving average. This is done as follows:

  1. First compute the simple moving average

  2. Next obtain the centered moving average by averaging adjacent values of these simple moving averages:

When l=2, the centered moving average is called Hanning. It is of the form

As an example, consider computing a 4 term moving average on the first 10 data values of the SASDATA.INTAIR data (a data set which consists of the monthly numbers, in thousands, of passengers on international airline flights for the years 1949 through 1960). The original data are 112,118,132,129,121,135,148,148,136,119. To obtain the first three terms of the 4 term moving average, first compute

Then the first three centered moving average values are

These are the first three values of the 4 term moving average.



Joseph D Petruccelli
Tue Feb 21 14:15:46 EST 1995