A Quick Introduction To Averaging Methods

You are currently viewing A Quick Introduction To Averaging Methods

Overview

Time Series models can be used to forecast values over a time period, i.e., Forecasting values. There are many ways to forecast values. This blog will focus on the most basic methods, known as Averaging Methods. These models can be used when there is no major pattern in the data or the data points are insufficient.

Types of average models:

  • Simple Average Models
  • Moving Average Models
  • Weighted Average Models

We will use univariate data to explore the models mentioned above and understand their workings.

Simple Averaging Methods Technique

The simple Average Technique is understood by looking at a data set with one variable, ‘Price.’ The price is indexed using time. Quarters is the time interval.

If we want to predict 2018-Q1’s price using the Simple Average Technique, then we just take the average price, which is 77.25 (1236/16).

The data points can be plotted on a graph to show a pattern. There is a decline in price every quarter, while prices peak every fourth quarter. However, the overall trend is positive.

These two concepts, Seasonality, and Trend, are both present. The third concept, Cyclicity, cannot be determined. To do so, we will need more data points (e.g., data from the last 78 years).

The simple moving average was used to create the following graph:

We need a way to capture trends and seasonality in our data. This brings us to the next method.

Moving Averaging Methods models

The moving Averaging Method is a method of moving over time instead of taking the average value for all variables. It can be 12, for Q1, or 14, for Q2.

We can only use the above example to forecast the 2018-Q1 value. To do this, we need first to know the number of periods for which the average should be used. If we take the average of the four previous quarters, then our forecast for 2018-Q1 will be 82. This contrasts with the 72.25 that we obtained using the Simple Average Technique.

This method has one problem. It gives the same weight or importance to all values from the past. It is easy to see that current values should have high-weightage. However, higher weightage should also be given for certain time periods. This issue can be solved using a Weighted Moving Average technique.

Weighted Moving Averaging Methods

We use Weighted moving average to give weights to data points when we know certain times have higher weightage.

Take, for example, the average of the last four quarters. If we use the above data, then we can forecast the 2018 Q1 value by taking the average of 2017Q1, Q2, and Q3, but instead of just using a moving average, assigning weights to them. If we decide to give the weight 0.4 to 2017 Q4, 0.3 to 2017 Q3, 0.2 to 2017 Q2 and 0.1 to 2017 Q1 then the result will come out to be 93 ((61×0.1)+(63×0.2)+(73×0.3)+(131×0.4)).

It is important to remember that the sum of all our weights in this example was 1. We can multiply prices using weights like 4, 3, 2, and 1, and then divide the result by the sum of all the weights, i.e.

= ((61×1)+(63×2)+(73×3)+(131×4))/(1+2+3+4)

= (61 + 126 + 219 + 524) / 10

= 930 / 10

= 93

Deciding period

Question of how many periods are to be used for calculating the moving averages is also a concern. We have used only the last four quarters in this blog to calculate the average. However, it is possible to forecast better using three or five quarters. We use different time periods to forecast data and then calculate the error using several error measures. The time period we choose for forecasting is the one that gives us the lowest error.

This is why we use a moving weighted average for our data. We consider the last four quarters and take weights of 0.4, 0.33, 0.2, and 0.1.

Methods to Calculate Error

To forecast the weights, we use the four-quarters of the previous year. We now calculate the error. To calculate the error, we can use a variety of error measures, such as simple error, mean absolute deviation, mean squared error, and mean absolute percent error.

Simple Error: Actual- Forecast

Mean Absolute Deviation: We use the absolute value for the simple error to calculate the average of all the errors.

Mean squared error (MSE): We will first add all errors to get the average.

Mean Absolute Percent Error (MAPE): It is calculated by multiplying the absolute error by the actual and then multiplying by 100 to obtain the percentage.

Below we have calculated various error measures based on the forecasted values based on the four most recent quarters. The following results can be obtained if we forecast using only the last five quarters.

As the error rates get lower, we can see that the results are better when we look at the past five quarters. The forecasted value for 2018 Quarter 1 is 91.9 if we take into account the five previous quarters and forecast using weights 0.35 to 0.25, 0.0.2, 0.15, and 0.05.

Deciding weights

There are a number of optimization methods that can be used to determine the weights. You can use different weight combinations, check the errors, and select the one that gives the best results (minimum error). Linear programming techniques are available because only a few manual iterations can be made. A simple function in MS Excel called “excel solver” can be used to help us determine the right weight combination.

Although Average Models can be very useful because they are simple to understand and apply, they are less robust than the Exponential Smoothing Techniques or Time Series Decomposition discussed in the next blog.

Leave a Reply