forecastmethods_techniques

Upload: venkata-nelluri-pmp

Post on 26-Feb-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    1/116

    All Rights Reserved, Indian

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    2/116

    All Rights Reserved, Indian

    Those who have knowledge dont predict.

    Those who predict dont have knowledge.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    3/116

    All Rights Reserved, Indian

    I think there is a world market for may be 5 computer

    - Thomas Watson, Chairman of IBM 19

    Computers in future weigh no more than 1.5 tons

    - Popular Mechanics, 1949

    640K ought to be enough for everybody

    - Bill Gates, 1981???

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    4/116

    All Rights Reserved, Indian

    Forecasting

    Forecasting is a process of estimation of an unknown evensuch as demand for a product.

    Forecasting is commonly used to refer time series data.

    Time series is a sequence of data points measured at sucintervals.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    5/116 All Rights Reserved, Indian

    Corporate

    Strategy

    Product and Market

    Planning

    Business

    Forecasting

    Product and Market Strate

    Aggregate Production

    Planning

    Master ProductionPlanning

    Materials

    Requirement

    Planning

    Aggregate

    Forecasting

    ItemForecasting

    Demand

    forecasting at SKU

    Level

    Resource Planning -

    Medium to Long Range

    Planning

    Production Capacity - ShoRange Planning

    Capacity Requirement

    Planning

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    6/116 All Rights Reserved, Indian

    Forecasting methods

    Qualitative Techniques.

    Expert opinion (or Astrologers)

    Quantitative Techniques.

    Time series techniques such as exponential smoothing

    Casual Models.

    Uses information about relationship between system elements

    (e.g regression).

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    7/116 All Rights Reserved, Indian

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    8/116 All Rights Reserved, Indian

    Why Time Series Analysis ?

    Time series analysis helps to identify and explain:

    Any systemic variation in the series of data which is due to

    Cyclical pattern that repeat.

    Trends in the data. Growth rates in the trends.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    9/116 All Rights Reserved, Indian

    Time Series Components

    Trend Cyclical

    Seasonal Irregular

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    10/116 All Rights Reserved, Indian

    Trend Component

    Persistent upward or downward pattern

    Due to consumer behaviour, population, economy, techno

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    11/116

    All Rights Reserved, Indian

    Cyclical Component

    Repeating up and down movements.

    Due to interaction of factors influencing economy such

    Usually 2-10 years duration.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    12/116

    All Rights Reserved, Indian

    Seasonal Component

    Regular pattern of up and down movements.

    Due to weather, customs, festivals etc.

    Occurs within one year.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    13/116

    All Rights Reserved, Indian

    Seasonal Vs Cyclical

    When a cyclical pattern in the data has a period of lesyear, it is referred as seasonal variation.

    When the cyclical pattern has a period of more than orefer to it as cyclical variation.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    14/116

    All Rights Reserved, Indian

    Irregular Component

    Erratic fluctuations

    Due to random variation or unforeseen events

    White Noise

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    15/116

    All Rights Reserved, Indian

    Time(a) Trend

    Time(d) Trend with seasonal pattern

    Time(c) Seasonal pattern

    Time(b) Cycle

    Demand

    Demand

    Dem

    and

    Demand

    Randommovement

    More

    than

    one

    year gap

    Less

    than

    one

    year gap

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    16/116

    All Rights Reserved, Indian

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    17/116

    All Rights Reserved, Indian

    Time Series DataAdditive and Multiplicati

    Random

    t

    Cyclical

    t

    ySeasonalit

    t

    Trend

    t RCST tY

    ModelgForecastinAdditive1.

    Random

    t

    Cyclical

    t

    ySeasonalit

    t

    Trend

    t RCST tY

    ModelgForecastintiveMultiplica2.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    18/116

    All Rights Reserved, Indian

    Time Series Data Decomposition

    ySeasonalit

    t

    Trend

    t ST tY

    ModelgForecastintiveMultiplica

    t

    tt

    T

    YS

    Yt / Tt is called

    deseasonalized data

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    19/116

    All Rights Reserved, Indian

    Time Series Techniques

    Moving Average.

    Exponential Smoothing.

    Auto-regression Models (AR Models).

    ARIMA (Auto-regressive Integrated Moving Averag

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    20/116

    All Rights Reserved, Indian

    Moving Average Method

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    21/116

    All Rights Reserved, Indian

    Moving Average (Rolling Average)

    Simple moving average. Used mainly to capture trend and smooth short term

    Most recent data are given equal weights.

    Weighted moving average Uses unequal weights for data

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    22/116

    All Rights Reserved, Indian

    Data

    Demand for continental breakfast at the Die Another Da

    Daily data between 1 October 201423 January 2015 (

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    23/116

    All Rights Reserved, Indian

    Simple moving average

    iperiodtimetoingcorrespondDataY

    1tperiodforForecastF

    Yn

    1F

    i

    1t

    t

    1nti

    i1t

    The forecast for period t+1 (Ft+1

    ) is given by the average of

    recent data.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    24/116

    All Rights Reserved, Indian

    Simple moving average

    iperiodtimetoingcorrespondDataY

    1tperiodforForecastF

    Yn

    1F

    i

    1t

    t

    1nti

    i1t

    The forecast for period t+1 (Ft+1

    ) is given by the average of

    recent data.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    25/116

    All Rights Reserved, Indian

    Demand for Continental Breakfast at DAD Hosp

    Moving Average

    0

    10

    20

    30

    40

    50

    60

    Actual Demand Forecast

    t

    17ti

    i1t Y7

    1F

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    26/116

    All Rights Reserved, Indian

    Measures of aggregate error

    Mean absolute error MAE

    Mean absolute percentage

    error MAPE

    Mean squared error MSE

    Root mean squared error

    RMSE

    n

    ttE

    nMAE

    1

    1

    n

    t t

    t

    Y

    E

    nMAPE

    1

    1

    n

    ttE

    nMSE

    1

    21

    n

    ttE

    nRMSE

    1

    21

    Et = Ft - Yt

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    27/116

    All Rights Reserved, Indian

    DAD ForecastingMAPE and RMS

    Mean absolute percentage

    error MAPE

    0.1068 or 10.68%

    Root mean squared error

    RMSE

    5.8199

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    28/116

    All Rights Reserved, Indian

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    29/116

    All Rights Reserved, Indian

    Exponential Smoothing

    Form of Weighted Moving Average Weights decline exponentially.

    Largest weight is given to the present observation, le

    immediately preceding observation and so on.

    Requires smoothing constant ()

    Ranges from 0 to 1

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    30/116

    All Rights Reserved, Indian

    Exponential Smoothing

    Next forecast = (present actual value) + (1-) prese

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    31/116

    All Rights Reserved, Indian

    Simple Exponential Smoothing Equati

    Smoothing Equations

    11

    1 *)1(*

    YF

    FYF ttt

    Ft+1 is the forecasted value at time t+1

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    32/116

    All Rights Reserved, Indian

    Simple Exponential Smoothing Equations

    Smoothing Equations

    ....)1()1( 32

    21 tttt YYYF

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    33/116

    All Rights Reserved, Indian

    Exponential Smoothing Forecast

    0

    10

    20

    30

    40

    50

    60

    18-09-2014 08-10-2014 28-10-2014 17-11-2014 07-12-2014 27-12-2014 16-01-2015 05-02-20

    Demand Exponential Smoothing Forecast

    ttt FYF *)8098.01(*8098.01

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    34/116

    All Rights Reserved, Indian

    DAD ForecastingMAPE and RMSE

    Exponential Smoothing

    Mean absolute percentage

    error MAPE

    0.0906 or 9.06%

    Root mean squared error

    RMSE

    5.3806

    = 0.8098

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    35/116

    All Rights Reserved, Indian

    Choice of

    Forsmooth data, try a high value of a, forecast responsiv

    current data.

    Fornoisy data try low a forecast more stableless respon

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    36/116

    All Rights Reserved, Indian

    Optimal

    11

    1

    2

    )1(

    /

    ttt

    n

    t

    tt

    FYF

    nFYMin

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    37/116

    All Rights Reserved, Indian

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    38/116

    All Rights Reserved, Indian

    Double exponential Smoothing Holts m

    Simple exponential smoothing may produce consistently biasthe presence of a trend.

    Holt's method (double exponential smoothing) is appropriate has a trend but no seasonality.

    Systematic component of demand = Level + Trend

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    39/116

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    40/116

    All Rights Reserved, Indian

    Holts Method

    Holts Equations

    Forecast Equation

    11

    11

    )1()()(

    )()1()(

    tttt

    tttt

    TLLTii

    TLYLi

    ttt TLF

    1

    Equation for

    intercept or

    level

    Equation for

    Slope (Trend)

    i i l l f d

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    41/116

    All Rights Reserved, Indian

    Initial values of Lt and Tt

    L1is in general set to Y1.

    T1can be set to any one of the following values (or use regression to ge

    )1/()(

    3/)()()()(

    11

    3423121

    121

    nYYT

    YYYYYYTYYT

    n

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    42/116

    All Rights Reserved, Indian

    0

    10

    20

    30

    40

    50

    60

    0 20 40 60 80 100 120

    Demand Forecast

    Double exponential smoothing

    = 0 8098; = 0 05

    DAD Forecasting MAPE and RMSE

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    43/116

    All Rights Reserved, Indian

    DAD ForecastingMAPE and RMSE

    Double Exponential Smoothing

    Mean absolute percentage

    error MAPE

    0.0930 or 9.3%

    Root mean squared error

    RMSE

    5.5052

    = 0.8098; = 0.05

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    44/116

    All Rights Reserved, Indian

    Forecasting Accuracy

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    45/116

    All Rights Reserved, Indian

    Forecasting Accuracy

    The forecast error is the difference between the forecast value and the a

    the corresponding period.

    tperiodfor timeForecastF

    tperiodat timevalueActualY

    tperiodaterrorForecastE

    FYE

    t

    t

    t

    ttt

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    46/116

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    47/116

    All Rights Reserved, Indian

    Forecasting Power of a Model

    Theils coefficient (U Statistic)

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    48/116

    All Rights Reserved, Indian

    Theils coefficient (U Statistic)

    n

    ttt

    n

    t tt

    YY

    FYU

    1

    21

    1

    2

    11

    )(

    )(

    The value U is the relative forecasting power of the method against nave tec

    the technique is better than nave forecast If U > 1, the technique is no bettforecast.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    49/116

    All Rights Reserved, Indian

    Theils coefficient for DAD Hos

    Method U

    Moving Average with 7 periods 1.221

    Exponential Smoothing 1.704

    Double exponential Smoothing 1.0310

    Th il C ffi i t

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    50/116

    All Rights Reserved, Indian

    Theils Coefficient

    1-n

    1t

    2

    1

    21-n

    1t

    11t

    1

    2

    1

    2

    1

    2 F

    U2,1

    t

    tt

    t

    t

    n

    t

    t

    n

    t

    t

    n

    t

    tt

    Y

    YY

    Y

    Y

    FY

    FYU

    U1 is bounded between 0 and 1, with values closure to zero indicating

    IfU 2 = 1, there is no difference between nave forecast and the foreca

    IfU 2 < 1, the technique is better than nave forecast

    IfU 2 > 1, the technique is no better than the nave forecast.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    51/116

    All Rights Reserved, Indian

    S l Eff t

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    52/116

    All Rights Reserved, Indian

    Seasonal Effect

    Seasonal effect is defined as the repetitive and predictable pbehaviour in a time-series around the trend line.

    In seasonal effect the time period must be less than one year,

    weeks, months or quarters.

    Seasonal effect

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    53/116

    All Rights Reserved, Indian

    Seasonal effect

    Identification of seasonal effect provides better understandinseries data.

    Seasonal effect can be eliminated from the time-series. This prdeseasonalization or seasonal adjusting.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    54/116

    All Rights Reserved, Indian

    Seasonal Adjusting

    tttt

    tt

    tt

    TSTY

    modeladditiveinadjustmentSeasonal

    100TT

    STeffectSeasonal

    modetivemultiplicainadjustmentSeasonal

    tt

    t

    SS

    Y

    Seasonal Index

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    55/116

    All Rights Reserved, Indian

    Seasonal Index

    Method of simple averages

    Ratio-to-moving average method

    Method of simple averages

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    56/116

    All Rights Reserved, Indian

    Method of simple averages

    Average the unadjusted data by period ( for example daily or month

    Calculate the average of daily (or monthly) averages.

    Seasonal index for day i (or month i) is the ratio of daily avera

    month i) to the average of daily (or monthly) averages times 100.

    Example: DAD Exa

    mple - Demand for Continental Bre

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    57/116

    All Rights Reserved, Indian

    Example: DAD Example - Demand for Continental Bre

    5 October1 November 2014 Data

    DAY

    Week

    (5-11 October)

    Week 2

    (12-18 October)

    Week 3

    (19-25 OCT)

    Sunday 41.00 40.00 40.00

    Monday 30.00 44.00 43.00

    Tuesday 40.00 49.00 41.00

    Wednesday 40.00 50.00 46.00

    Thursday 40.00 45.00 41.00

    Friday 40.00 40.00 40.00

    Saturday 40.00 42.00 32.00

    Seasonality Index

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    58/116

    All Rights Reserved, Indian

    Seasonality Index

    DAY

    Week1

    (5-11 October)

    Week 2

    (12-18 October)

    Week 3

    (19-25 OCT)

    Week 4

    (26 Oct-1 Nov)

    Daily

    Average

    Sunday 41.00 40.00 40.00 41.00 40.50

    Monday 30.00 44.00 43.00 41.00 39.50

    Tuesday 40.00 49.00 41.00 40.00 42.50

    Wednesday 40.00 50.00 46.00 43.00 44.75

    Thursday 40.00 45.00 41.00 46.00 43.00

    Friday 40.00 40.00 40.00 45.00 41.25

    Saturday 40.00 42.00 32.00 45.00 39.75

    41.61

    Average of daily

    averages

    Deseasonalized Data

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    59/116

    All Rights Reserved, Indian

    Deseasonalized Data

    Date Demand Seasonal Index De-seasonalized Data

    10/5/2014 41 97.34% 42.12

    10/6/2014 30 94.94% 31.60

    10/7/2014 40 102.15% 39.16

    10/8/2014 40 107.55% 37.19

    10/9/2014 40 103.34% 38.70

    10/10/2014 40 99.14% 40.3510/11/2014 40 95.54% 41.87

    Trend

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    60/116

    All Rights Reserved, Indian

    Trend

    Trend is calculated using regression on deseasonalized d

    Deseasonalized data is obtained by dividing the actual

    seasonality index.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    61/116

    All Rights Reserved, Indian

    SUMMARY OUTPUT

    Regression Statistics

    Multiple R 0.268288

    R Square 0.071978Adjusted R Square 0.036285

    Standard Error 3.715395

    Observations 28

    ANOVA

    df SS MS F Significa

    Regression 1 27.83729 27.83729 2.016587 0.1674

    Residual 26 358.9082 13.80416

    Total 27 386.7455

    Coefficients Standard Error t Stat P-value Lower 9

    Intercept 39.81731 1.442768 27.59786 8.7E-21 36.851

    Day 0.123437 0.086923 1.420066 0.167469 -0.055

    Forecast

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    62/116

    All Rights Reserved, Indian

    Ft = Tt x St

    F29 = T29 x S29

    F29 = (39.81 + 0.1234 x 29) x 0.9733 = 42.2372

    Y29 = 46

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    63/116

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    64/116

    All Rights Reserved, Indian

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    65/116

    A t l ti F ti (ACF)

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    66/116

    All Rights Reserved Indian

    Auto-correlation Function (ACF)

    A k-period plot of autocorrelations is called autofunction (ACF) or a correlogram.

    Auto-Correlation

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    67/116

    All Rights Reserved Indian

    Auto-correlation of lag k is auto-correlation between

    To test whether the autocorrelation at lag k is significa

    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 thobservations.

    ACF for Demand for Continental

    B kf t

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    68/116

    All Rights Reserved Indian

    Breakfast

    Partial Auto-correlation

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    69/116

    All Rights Reserved, Indian

    Partial auto correlation of lag k is an auto correlation betweewith linear dependence between the intermedia values (Yt-k+1, Yremoved.

    Partial Auto correlation Function

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    70/116

    All Rights Reserved, Indian

    Partial Auto-correlation Function

    A k-period plot of partial autocorrelations is caautocorrelation function (PACF).

    Partial Auto-Correlation

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    71/116

    All Rights Reserved, Indian

    Partial auto-correlation of lag k is auto-correlation between Yt aremoval of linear dependence of Yt+1 to Yt+k-1.

    To test whether the partial autocorrelation at lag k is significantlythe following hypothesis test is used:

    H0:pk = 0

    HA:pk 0

    For any k, reject H0 if |pk| > 1.96/n. Where n is the number of

    PACF Demand for Continental Breakfast at

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    72/116

    All Rights Reserved, Indian

    PACF Demand for Continental Breakfast at

    DAD hospital

    Stationarity

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    73/116

    All Rights Reserved, Indian

    A time series is stationary, if:

    Mean () is constant over time.

    Variance () is constant over time.

    The covariance between two time periods (Yt) and (only on the lag k not on the time t.

    We assume that the time series is stationary before

    applying forecasting models

    ACF Plot of non-stationary and stationary

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    74/116

    All Rights Reserved, Indian

    process

    Non-stationary Stationary

    White Noise

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    75/116

    All Rights Reserved, Indian

    White noise is a data uncorrelated across time that fodistribution with mean 0 and constant standard deviat

    In forecasting we assume that the residuals are white N

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    76/116

    All Rights Reserved, Indian

    Residual White Noise

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    77/116

    All Rights Reserved, Indian

    Auto-Regression

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    78/116

    All Rights Reserved, Indian

    Auto-regression is a regression of Y on itself observed

    time points.

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

    AR(1) Parameter Estimation

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    79/116

    All Rights Reserved, Indian

    n

    t

    t

    n

    t

    tt

    n

    t

    tt

    n

    t

    t

    ttt

    Y

    YY

    YY

    YY

    2

    21

    2

    1

    2

    21

    2

    2

    1

    OLS

    Estimate

    AR(1) Process

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    80/116

    All Rights Reserved, Indian

    Yt = Yt-1 + t

    Yt = (Yt-2 + t-1) + t

    Yt = t X0 +

    t-1 1 + t-2 2++

    1 t-1 + t

    1

    0

    0

    t

    i

    itit

    t XY

    Auto-regressive process (AR(p))

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    81/116

    All Rights Reserved, Indian

    Assume {Yt} is purely random with mean zero and consdeviation (White Noise).

    Then the autoregressive process of orderp or AR(p) proc

    tptpttt YYYY ...22110

    AR(p) process models each future observationas a function p previous observations.

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    82/116

    All Rights Reserved, Indian

    Model Identification in AR(p)Process

    Pure AR Model Identification

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    83/116

    All Rights Reserved, Indian

    Model ACF PACF

    AR(1) Exponential Decay: Positive side if 1

    > 0 and alternating in sign starting onnegative side if 1 < 0.

    Spike at lag 1, then cuts off t

    Spike positive if 1 > 0 and nside if 1 < 0.

    AR(p) Exponential decay: pattern depends onsigns of 1, 2, etc

    Spikes at lags 1 to p, then cutzero.

    tptpttt YYYY ...22110

    Partial Auto-Correlation

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    84/116

    All Rights Reserved, Indian

    Partial auto-correlation of lag k is auto-correlation between Yt anremoval of linear dependence of Yt+1 to Yt+k-1.

    To test whether the autocorrelation at lag k is significantly differfollowing 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

    PACF FunctionDAD ContinentaBreakfast

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    85/116

    All Rights Reserved, Indian

    First t

    PAC a

    differe

    from

    zero.

    ACF Function - DAD Continental

    Breakfast

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    86/116

    All Rights Reserved, Indian

    Actual Vs Fit- Continental Breakfas

    Data

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    87/116

    All Rights Reserved, Indian

    Data

    AR(2) Model

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    88/116

    All Rights Reserved, Indian

    MAPE = 8.8%

    Residual White Noise

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    89/116

    All Rights Reserved, Indian

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    90/116

    All Rights Reserved, Indian

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

    Yt = (Xt - )

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    91/116

    All Rights Reserved, Indian

    Moving Average Process

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    92/116

    All Rights Reserved, Indian

    A moving average process is a time series regression modelthe value at time t, Yt, is a linear function of past errors.

    First order moving average, MA(1), is given by:

    Yt = 0 + 1t-1 + t

    Moving Average Process MA(q)

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    93/116

    All Rights Reserved, Indian

    {Yt} is a moving average process of order q (written MA(q)) if

    constants 0, 1, . . . q

    We have.,

    tqtqtttY ...2210

    MA(q) models each future observation as a function ofq previous errors

    Pure MA Model Identification

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    94/116

    All Rights Reserved, Indian

    Model ACF PACF

    MA(1) Spike at lag 1 then cuts of to zero. Spikepositive if 1 > 0 and negative side if

    1 < 0.

    Exponential decay. On neg1> 0 on positive side i

    MA(q) Spikes at lags 1 to q, then cuts off to zero. Exponential decay or sine w

    pattern depends on signs o

    ACF Function - DAD ContinentalBreakfast

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    95/116

    All Rights Reserved, Indian

    SPSS Output

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    96/116

    All Rights Reserved, Indian

    Actual Vs Fitted Value

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    97/116

    All Rights Reserved, Indian

    Residual Plot

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    98/116

    All Rights Reserved, Indian

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    99/116

    All Rights Reserved, Indian

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    100/116

    ARMA(

    p,q) Model Identification

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    101/116

    All Rights Reserved, Indian

    ARMA(p,q) models are not easy to identify. We usually start wAR and MA process. The following thump rule may be used.

    The final ARMA model may be selected based on parameters sRMSE, MAPE, AIC and BIC.

    Process ACF PACF

    ARMA(p,q) Tails off after q lags Tails off to zero after p

    lags

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    102/116

    All Rights Reserved, Indian

    ACF PACF

    ARMA(2,1) Model Output

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    103/116

    All Rights Reserved, Indian

    AR(2) Model

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    104/116

    All Rights Reserved, Indian

    MAPE = 8.8%

    Residual White Noise

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    105/116

    All Rights Reserved, Indian

    Forecasting Model Evaluation

    Akaikes information criteria

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    106/116

    All Rights Reserved, Indian

    Akaike s information criteria

    AIC = -2LL + 2m

    Where m is the number of variables estimated in the model

    Bayesian Information Criteria

    BIC = -2LL + m ln(n)

    Where m is the number of variables estimated in the model and n is the numbeobservations

    Final Model Selection

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    107/116

    All Rights Reserved, Indian

    Model AR(2) MA(1) ARMA(2,1)

    BIC 3.295 3.301 3.343

    AR(2) has the

    least BIC

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    108/116

    All Rights Reserved, Indian

    ARIMA

    ARIMA has the following three components:

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    109/116

    All Rights Reserved, Indian

    ARIMA has the following three components:

    Auto-regressive component: Function of past values of the time

    Integration Component: Differencing the time series to make it a st

    Moving Average Component: Function of past error values.

    Integration (d)

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    110/116

    All Rights Reserved, Indian

    Used when the process is non-stationary.

    Instead of observed values, differences between observed values are

    When d=0, the observations are modelled directly. If d = 1,between consecutive observations are modelled. If d = 2, the dif

    differences are modelled.

    ARIMA (p, d, q)

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    111/116

    All Rights Reserved, Indian

    The q and p values are identified using auto-correlation

    and Partial auto-correlation function (PACF) respectivelidentifies the level of differencing.

    Usually p+q

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    112/116

    All Rights Reserved, Indian

    Differencing is a process of making a non-stationary

    stationary process.

    In differencing, we create a new process Xt, where Xt = Yt

    ARIMA(p,1,q) Process

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    113/116

    All Rights Reserved, Indian

    tqtqtt

    ptpttt

    XXXX

    ...

    ...

    22110

    22110

    Where Xt = YtYt-1

    Ljung-Box Test

    Ljung-Box is a test on the autocorrelations of residuals. The test sta

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    114/116

    All Rights Reserved, Indian

    m

    k

    k

    m kn

    rnnQ

    1

    2

    )2(

    n = number of observations in the time series.

    k = particular time lag checkedm = the number of time lags to be tested

    rk = sample autocorrelation function of the kth residual term.

    Q statistic is approximate chi-square distribution with mpq degrees of freedom are correctly specified.

    H0: The model does not exhibit lack of fit

    HA: The model exhibits lack of fit

    AR(2)

    Ljung-Box Test

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    115/116

    All Rights Reserved, Indian

    P-value is 0.740, thus the model doesnt show

    lack of fit

    Box-Jenkins Methodology

    Identification: Identify the ARIMA model using ACF & PAC

  • 7/25/2019 ForecastMETHODS_TECHNIQUES

    116/116

    All Rights Reserved, Indian

    y gwould give the values of p, q and d.

    Estimation: Estimate the model parameters (using maximum

    Diagnostics: Check the residual for any issue such as not pr

    Noise.