IKH

Introduction to AR Models

Introduction to Auto Regressive Models

Welcome to the session on ‘Autoregressive Models’.


In the previous session, you gained an in-depth understanding of the different smoothing models for forecasting a time series. In this session, you will dive deeper into different Auto Regressive models for forecasting a time series. You will also understand what method to choose in various situations depending on the business problem.

Let’s first start off with a quick walkthrough of the intuition behind the Auto Regressive models of forecasting.

In an Auto Regressive model, the regression technique is used to formulate a time series problem. In order to implement Auto Regressive models, we forecast future observations using a linear combination of past observations of the same variable i.e. to predict ^yt which is the future forecast of a variable, we need one or more past observations of yt that is yt−1, yt−2, etc.

Why Study AR Models?

In the previous module on time series forecasting, you studied basic forecasting methods and smoothing techniques where you forecasted level, trend and seasonality by assigning weights to the previous observations. In this module, you are going to study another family of methods, i.e. the Auto Regression models of forecasting a time series data. In the Auto Regression methods, you will be using the correlation between the past values of the time-series data, just like how you used correlation while studying linear regression. In the AR set of methods, you are still using the past values of the time-series, but you are also considering the correlation of those past values with the actual/current values. 

Many a time it happens that the performance of both the smoothing methods and AR set of methods is the same (i.e. the RMSE/MAPE values will nearly be the same), but the model-building approach for forecasting in both of these paradigms of time series is quite different. In this module, we will again look at the airline-passenger example and build all the AR set of models on it. We will again compare their MAPE and RMSE values and will in-turn now compare their performance to the previously built smoothing methods as well.

Towards the end of this module, with the help of a flow chart and some specific examples, you will understand which method can be useful in a given business scenario.

In this session

Some of the topics that you will learn are:

  • Stationarity
  • Stationarity test
  • Importance of stationarity
  • Non-stationarity to stationarity
  • Autocorrelation function 
  • Partial autocorrelation function
  • Auto Regressive model
  • Moving average model

Note: 

 In this session, you are expected to work extensively on Python to forecast the time series data using different Auto Regressive techniques. You will be working on different real-world datasets. Follow the given instruction on splitting the dataset into train and test datasets as mentioned. The parameters should also be used as given in the instruction else wrong parameters can lead you to a different answer. A Jupyter notebook solution is provided with the assessments.

Dataset and Jupyter Notebook

The airline passenger traffic dataset used throughout this session is given below:

The notebook file used for modelling the Auto Regressive models on the airline passenger traffic dataset is attached below. However, we recommend that you code alongside the instructor as he teaches each method in python. This will make you practice the python coding well. 

Lecture Notes

To help you understand the concepts in this module better, for both the sessions, we have created the following lecture notes. Kindly refer to them as they will be helpful throughout your learning in both the sessions in this module.

Guidelines for in-module questions

The in-video and in-content questions for this module are not graded. Note that graded questions are given on a separate page labelled ‘Graded Questions’ at the end of this session. These questions will adhere to the following guidelines:

First Attempt MarksSecond Attempt Marks
Questions with 2 Attempts105
Questions with 1 Attempt100

Report an error