You are on page 1of 14

Predictive Analytics : QM901.

1x
Prof U Dinesh Kumar, IIMB

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x

Auto-Regression
Prof U Dinesh Kumar, IIMB

• Auto-regression is a regression of Y on itself observed at different


time points.

• That is, we use Yt as the response variable and Yt-1, Yt-2 etc. as
explanatory variables.

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x

AR(1) Parameter Estimation


Prof U Dinesh Kumar, IIMB

Yt  Yt 1   t
n n
 t
2
  Yt  Yt 1  2
t 2 t 2
n
  Yt Yt 1
OLS
 t 2 Estimate
n
2
 t 1
Y
t 2

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x

AR(1) Process
Prof U Dinesh Kumar, IIMB

Yt = Yt-1 + t

Yt =  (Yt-2 + t-1) + t
…………………………………………………………

Yt = t X0 + t-1 1 + t-2 2 +…+ 1 t-1 + t

t 1
Yt   X 0    i  t  i
t
i 0

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x

Auto-regressive process (AR(p))


Prof U Dinesh Kumar, IIMB

• Assume {Yt} is purely random with mean zero and constant standard
deviation  (White Noise).

• Then the autoregressive process of order p or AR(p) process is

Yt  0  1Yt 1  2Yt  2  ...   pYt  p   t

AR(p) process models each future observation


as a function “p” previous observations.

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x
Prof U Dinesh Kumar, IIMB

Model Identification in AR(p)


Process

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x

Pure AR Model Identification


Prof U Dinesh Kumar, IIMB

Model ACF PACF


AR(1) Exponential Decay: Positive side if ø1 Spike at lag 1, then cuts off to zero.
> 0 and alternating in sign starting on Spike positive if ø1 > 0 and negative
negative side if ø1 < 0. side if ø1 < 0.

AR(p) Exponential decay: pattern depends on Spikes at lags 1 to p, then cuts of to


signs of ø1, ø2, etc zero.

Yt  0  1Yt 1  2Yt  2  ...   pYt  p   t

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x

Partial Auto-Correlation
Prof U Dinesh Kumar, IIMB

• Partial auto-correlation of lag k is auto-correlation between Yt and Yt+k after the


removal of linear dependence of Yt+1 to Yt+k-1.

• To test whether the autocorrelation at lag k is significantly different from 0, the


following hypothesis test is used:
H0: k = 0
HA:  k ≠ 0

• For any k, reject H0 if |  k| > 1.96/√n. Where n is the number of observations.

© All Rights Reserved, Indian Institute of Management Bangalore


PACF Function – DAD Continental Predictive Analytics : QM901.1x
Prof U Dinesh Kumar, IIMB

Breakfast

First two
PAC are
different
from
zero.

© All Rights Reserved, Indian Institute of Management Bangalore


ACF Function - DAD Continental Predictive Analytics : QM901.1x
Prof U Dinesh Kumar, IIMB

Breakfast

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x

Actual Vs Fit- Continental Breakfast


Prof U Dinesh Kumar, IIMB

Data

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x
Prof U Dinesh Kumar, IIMB
AR(2) Model

MAPE = 8.8%

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x

Residual White Noise


Prof U Dinesh Kumar, IIMB

© All Rights Reserved, Indian Institute of Management Bangalore


Predictive Analytics : QM901.1x
Prof U Dinesh Kumar, IIMB

(Yt – 41.252) = 0.663 (Yt-1 – 41.252) – 0.204 (Yt-2 – 41.252)

Yt = (Xt - )

© All Rights Reserved, Indian Institute of Management Bangalore

You might also like