Moving Average in Forecasting

Moving Average in Forecasting

Moving Average in Forecasting

Description

  • The Moving Average is also known as Naïve Forecasting or moving/rolling mean.
  • It is an indicator that creates a series of averages of several subsets of a complete dataset

Why to use

The Moving Average is used with time-series for forecasting.

When to use

To analyze trends in linear or non-linear time-series data

When not to use

  • When the data is not time-series based
  • On textual and categorical data

Prerequisites

A time-series data should not contain null or missing values.

Input

Any dataset that contains time-series data

Output

  • Root mean Square Error (RMSE)
  • Baseline and Prediction Plot
  • Predicted Values of the selected Variable

Statistical Methods Used

  • Average
  • Root Mean Square Error

Limitations

Cannot identify the time series components


Consider a time-series data containing the following annual sales figures. We calculate the Moving Average over three years, for years 2015-2016-2017, 2016-2017-2018, and 2017-2018-2019. These values are given in the table below. 

Year

Sales (In Millions)

Moving Average (Three Year Average)

2015

5.0

NA

2016

5.4

NA

2017

5.7

(5.0 + 5.4 + 5.7) / 3 = 5.366

2018

6.1

(5.4 + 5.7 + 6.1) / 3 = 5.733

2019

6.4

(5.7 + 6.1 + 6.4) / 3= 6.066

    • Related Articles

    • ARIMA

      ARIMA Description ARIMA stands for Auto-Regressive Integrated Moving Average. It is used for forecasting on stationary data. Why to use ARIMA captures both autoregressive and moving average components, which provides a systematic way to deal with ...
    • SARIMA

      SARIMA Description SARIMA is an abbreviation for Seasonal Autoregressive Integrated Moving Average. It is an extension of ARIMA used to model seasonal time series. SARIMA considers the events occurring at regular intervals and impacting the target ...
    • Train Test Split in Forecasting

      Train Test Split in Forecasting Description The data is split randomly into train data and test data. Ideally, the split is in the ratio of 70:30 or 80:20 for Train and test. Why to use To evaluate the accuracy of the model with an unknown dataset. ...
    • Auto ARIMA

      Auto ARIMA Description Auto ARIMA (Auto-Regressive Integrated Moving Average) is a statistical algorithm that uses time series data to forecast future values. It automatically determines the best parameters for an ARIMA model. Why to use Auto ARIMA ...
    • Time-series Data Preparation Tests in Forecasting

      The different tests available in Time-series Data Preparation under Forecasting are given below. Accumulation Missing Value Transformation Differencing Data Preparation Description The time-series data may contain missing values that need to be ...