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

    • 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. ...
    • 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 ...
    • Data Preparation in Forecasting

      Data Preparation is the process of cleaning and transforming raw data into organized data so that it can be processed and analyzed further. In data preparation, data is reformatted, corrected, and combined to enrich the data. Data preparation is ...
    • 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 ...
    • Modeling

      Models for time series data can have many forms and represent different stochastic. When modeling variations in the level of a process, three broad classes of practical importance are the AutoRegressive (AR) models, the Integrated (I) models, and the ...