Moving Average

 MOVEAVG.83p MOVEAVG.86p moveavg.89p

Given time series data x1, x2, . . . , xn, we shall find the moving averages from successive groups of k in the list. That is, we will find (x1 + x2 + . . . + xk) / k, then (x2 + x3 + . . . + xk+1) / k, . . . , up to (xn-k+1 + xn-k+2 + . . . + xn) / k. Moreover, we will plot these moving averages as a new time series.

Using the MOVEAVG Program

Before executing the MOVEAVG program, we must enter the original time series into the calculator.

On the TI-83, enter the time series into list L1.

On the TI-86, enter the time series into list xStat.

On the TI-89, enter the data points into column c1 in a Data Editor list called dist. (This list becomes the current list after executing many of the programs from this web site. Simply press APPS, then press 6, then press 1 to get to the current list.)

After the data is entered, execute the program by specifying the span k of the desired moving averages. The program then computes the successive moving averages and stores them in list L2 on the TI-83, (or list yStat on the TI-86, or column c2 in the current list on the TI-89).

Upon completion, the program displays the mean, standard deviation, and range of the original time series, followed by the mean, standard deviation, and range of the created moving averages. The stat plot settings are also adjusted. To see a time plot of the moving averages, press GRAPH.

Example. Below (listed left to right) are the dollar gains of the NDX 100 over the S&P 500 for a period of 70 days. Create a list of the moving five-day average gains over this time period.

 97.4 -424 511.4 63.4 -211.4 226.2 -21.7 -32.6 246.6 -61.8 -236.6 535 414.6 74.2 567.2 500.6 -253 12 367.2 -604.4 -149.6 298.2 175.3 303.6 153 -55.8 371.5 228.4 -31.1 -272.2 -157.6 121.4 313.3 -264.5 354.9 -207.7 55.2 -80.3 105.3 -56.4 479.2 -248 262.1 -282.3 619.9 228.1 61.4 -200.5 -55.3 -544.8 -79.4 -522.9 22.9 -748.4 657.6 -136.1 234.1 -15.9 -53.2 204.8 -435.6 -304.4 234.5 -387 -2.6 -57.6 159.4 -87.1 24.2 -403.3

Solution. Enter the data (from left to right) into list L1 (xStat on the TI-86, or column c1 on the TI-89), then execute the MOVEAVG program with a span of 5. The output shows that the original data ranges from -\$748.4 to \$657.6 with a mean of \$22.84 and a standard deviation of \$303.8, and that the new time series of 5-day moving averages ranges from -\$374.52 to \$418.32 with a mean of \$28.32 and a standard deviation of \$135.36.

After executing the program, press GRAPH to see a time plot of the moving averages, or view these values under list L2 (yStat on the TI-86, or column c2 on the TI-89).