Solved – Is moving average(sliding window) a smoothing technique or forecasting technique

machine learningmathematical-statisticsmoving windowrtime series

The rolling average method is mostly used to produce a smoothed series by removing noise. For ex- 3 window moving average, in general practice, the output for the fourth period is the 3 window moving average of first 3 periods. So in this process we forecast one step ahead by taking average of 3 points.
But in moving average, ma function in R basically produces a smoothed series of the original series. So if if have data points from Jan to Dec 2019, then my moving average series has data points from Feb 2019 to Nov 2019.
So In this case, how do I forecast for Dec 2019.
By using forecast function, it produces ets model, which I don't want.

Best Answer

A weighted average is what an ARIMA model is Seeking certain type of ARIMA explanation . It is the answer to ...the double question ...1) how many values should I include AND 2) how do I weight/leverage them in order to get a "representative value".

Thus it is BOTH a smoother and a forecaster ..

When you specify a 3 period equally-weighted average for either smoothing or forecasting ...you are specifying an arima model (3,0,0)(0,0,0) with coefficients = 1/3 , 1/3 and 1/3 WITHOUT a constant. Obviously one might specify a 3 period weighted aveage where the weights are optimized ... as is often the case.

What you may be looking for is a way for your software to determine both "how many" and "how important" the previous values are and not just assume some form of a model like ets.

Also see Identifying Early Indicators Time Series Analysis for an example of a 3 period autoregressive ( really 3 period moving average in common parlance ) in practice.

One final distinction is that smoothing "centers" the result by using the value 1 period before , the current value and the value 1 period in the future period after the current period whereas forecasting uses the value 3 periods before , 2 periods before and 1 period before to predict the next value.

Related Question