The Method of Moving Averages

The method of moving averages are of two types:

  1. Simple Moving Averages
  2. Weighted Moving Averages

Simple Moving Averages

If the observed values of a variable $Y$ are $y_1, y_2,\cdots, y_n$ corresponding to the time periods $t_1, t_2,\cdots, t_n$, respectively, the $k$-period simple moving averages are defined as

\begin{align*}
a_1 &= \frac{1}{k} \sum_{i=1}^{k} y_i\\
a_2 &= \frac{1}{k} \sum_{i=2}^{k+1} y_i,\\
a_3 &= \frac{1}{k} \sum_{i=3}^{k+2} y_i \\
\vdots &= \quad \vdots\\
a_m &= \frac{1}{k} \sum_{i=m}^{n} y_i
\end{align*}

where $a_1, a_2, \cdots, a_m$ is the sequence of $k$-period simple moving averages. That is, the $k$-period simple moving averages are calculated by averaging first $k$ observations and then repeating this process of averaging the $k$ observations by dropping each time the first observation and including the next one. This process is continued till the last $k$ observations have been averaged. For example, the 3-period simple moving averages are given as:

\begin{align*}
a_1 &= \frac{1}{3} (y_1+y_2+y_3) = \frac{1}{3} \sum_{i=1}^{3} y_i\\
a_2 &= \frac{1}{3} (y_2+y_3+y_4) = \frac{1}{3} \sum_{i=2}^{4} y_i\\
a_3 &= \frac{1}{3} (y_3+y_4+y_5) = \frac{1}{3} \sum_{i=3}^{5} y_i\\
\vdots &= \quad \vdots\\
\text{and so on}
\end{align*}

Each of these simple moving average of the sequence $a_1, a_2, a_3,\cdots$ is placed against the middle of each successive group. The $k$-period moving successive totals $S_1, S_2, S_3, \cdots$ are obtained by the following relations

\begin{align*}
S_1 = \sum_{i=1}^{k} y_i\\
S_2 &= S1+ y_{k+1}-y_1\\
S_3 &= S_2 + y_{k+2} – y_2\\
\vdots &= \quad \vdots\\
\text{so on}
\end{align*}

The $k$-period simple moving averages are obtained by dividing these $k$-period moving successive totals ($S_1, S_2, S_3, \cdots$) by $k$, as given in the following relations

\begin{align*}
a_1 &= \frac{S_1}{k}\\
a_2 &= a_1 + \frac{y_{k_1}0y_1} {k}\\
a_3 &= a_2 + \frac{y_{k+2} -y_2}{k}\\
\vdots &= \quad \vdots\\
\text{so on}
\end{align*}

method of moving averages
  • When $k$ is odd, the sequence $a_1, a_2, a_3, \cdots$ will be placed against the middle of its time period.
  • When $k$ is even, the sequence $a_1, a_2, a_3, \cdots$ of simple moving averages will be placed in the middle of two time periods. It is necessary to centralize these averages. For centralization, further 2-period moving averages of the former $k$-period moving averages are computed which are called $k$-period centered moving averages.

Weighted Moving Averages

For observed values ($y_1, y_2, \cdots, y_n$) of a variable $Y$ corresponding to the time periods $t_1, t_2, \cdots, t_n$, respectively, the $k$-period weighted moving averages with weights $w_1, w_2, \cdots, w_k$ are defined as

\begin{align*}
a_1 &= \frac{1}{\sum w} \sum_{i=1}^{k} y_i w\\
a_2 &= \frac{1}{\sum w} \sum_{i=2}^{k+1} y_i w\\
a_3 &= \frac{1}{\sum w} \sum_{i=3}^{k+2} y_i w\\
\vdots &= \vdots\\
a_m &= \frac{1}{\sum w} \sum_{i=m}^{n} y_i w\\
\end{align*}

where $a_1, a_2, \cdots, a_m$ is a sequence of $k$-period weighted moving averages with weights $w_1, w_2, \cdots, w_k$, respectively. The $k$-period weighted moving averages are calculated by taking the weighted average of first $k$ observed values with weights $w_1, w_2, \cdots, w_k$ and then repeating this process of averaging the $k$ observations by dropping each time the first observation and including the next one. This process is continued until the last $k$ observations have been averaged.

Merits

  • The method of moving averages is simple and easy.
  • This method is appropriate to remove, seasonal variations, cyclical fluctuations, and irregular variations.

Demerits

  • Some values at the beginning and the end of the series are lost.
  • Moving averages are greatly affected by extreme values.
  • The method does not provide a mathematical formula for the trend.

Example: Calculate 3-years simple moving averages for the following time series. Also, plot actual data and moving averages on a graph. Also, find the 3-years weighted moving averages with weights 2, 2, 1, respectively.

Year19701971197219731974197519751977
Production170.0154.8156.6158.9140.3154.2160.7178.3

Solution:

YearProduction3-year Simple MT3-year simple MA3-year WMT3-year WMA
1970170.0    
1971154.8481.3160.43806.1161.22
1972156.5470.2156.73781.5156.30
1973158.9455.7151.90771.1154.22
1974140.3453.4151.13752.6150.52
1975154.2455.2151.73749.7149.94
1976160.7493.2164.40808.1161.62
1977178.3    

*MT=moving total, MA=moving averages, WMT=weighted MT, WMA=Weighted MA

three year moving average

Muhammad Imdad Ullah

Currently working as Assistant Professor of Statistics in Ghazi University, Dera Ghazi Khan. Completed my Ph.D. in Statistics from the Department of Statistics, Bahauddin Zakariya University, Multan, Pakistan. l like Applied Statistics, Mathematics, and Statistical Computing. Statistical and Mathematical software used is SAS, STATA, GRETL, EVIEWS, R, SPSS, VBA in MS-Excel. Like to use type-setting LaTeX for composing Articles, thesis, etc.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

x Logo: Shield Security
This Site Is Protected By
Shield Security