DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

28
slide 1 DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Lecture 6: Box-Jenkins Models (Ch. 9) Material based on: Bowerman-O’Connell-Koehler, Brooks/Cole

description

DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos. Lecture 6: Box-Jenkins Models (Ch. 9). Material based on: Bowerman-O’Connell-Koehler, Brooks/Cole. Homework in Textbook. Page 398 Ex 8.1, Ex 8.2 parts a and b Ex 8.6 parts a and b Ex 8.11. - PowerPoint PPT Presentation

Transcript of DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

Page 1: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 1

DSCI 5340: Predictive Modeling and Business Forecasting

Spring 2013 – Dr. Nick Evangelopoulos

Lecture 6: Box-Jenkins Models (Ch. 9)

Material based on:Bowerman-O’Connell-Koehler, Brooks/Cole

Page 2: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 2

DSCI 5340FORECASTING

Page 398Ex 8.1,Ex 8.2 parts a and bEx 8.6 parts a and bEx 8.11

Homework in Textbook

Page 3: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 3

DSCI 5340FORECASTING

Exercise 8.1 Page 398

358.238 = 0.1*317+(1-0.1)*362.82

Part a. How do we calculate this number?

Page 4: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 4

DSCI 5340FORECASTING

-61.2380 = 297 – 358.2380

Part b. How do we calculate this number?

Note that smoothed estimate at time period 3 is Forecast for time period 4.

Exercise 8.1 Page 398

Page 5: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 5

DSCI 5340FORECASTING

352.1142 = 0.1*297+(1-0.1)*358.2380

Part c. How do we calculate this number?

Exercise 8.1 Page 398

Page 6: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 6

DSCI 5340FORECASTING

46.8858 = 399 – 352.1142

Part d. How do we calculate this number?

Note that smoothed estimate at time period 3 is Forecast for time period 4.

Exercise 8.1 Page 398

Page 7: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 7

DSCI 5340FORECASTING

n alpha SSE ssquare s24 0.4 35687.689 1551.639 39.39084492

Actual Smoothed Forecast SquaredTime Cod Catch Estimate Made Last Forecast Forecast

Period y for Level Period Error Error0 360.66671 362 361.20002 360.6667 1.3333 1.7776892 381 369.12001 361.2 19.79998 392.03923 317 348.27201 369.12 -52.120012 2716.4964 297 327.7632 348.272 -51.2720072 2628.8195 399 356.25792 327.7632 71.23679568 5074.6816 402 374.55475 356.2579 45.74207741 2092.3387 375 374.73285 374.5548 0.445246445 0.198244

Exercise 8.2 parts a and b, Page 398

Page 8: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 8

DSCI 5340FORECASTING

SUMMARY OUTPUT

Regression StatisticsMultiple R 0.11177R Square 0.012492Adjusted R Square -0.02865Standard Error 25.55517Observations 26

ANOVA df SS

Regression 1 198.2785Residual 24 15673.61Total 25 15871.88

Coefficien

tsStandard

ErrorIntercept 202.6246 10.31989X Variable 1 -0.36821 0.668238

n alpha gamma SSE ssquare s52 0.1 0.1 46386.605 927.7321 30.4587

Actual Forecast SquaredTime Thermostat Growth Made Last Forecast Forecast

Period Sales (y) Level Rate Period Error Error0 202.6246 -0.36821 206 202.63076 -0.330764 202.2564 3.7436 14.0152 245 206.5699964 0.096236 202.3 42.7000 1823.2903 185 204.4996092 -0.120426 206.66623 -21.6662 469.426

Ex. 8.6 parts a and b, p. 398

Page 9: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 9

DSCI 5340FORECASTING

SUMMARY OUTPUT

Regression StatisticsMultiple R 0.32050884R Square 0.10272592Adjusted R Square 0.03863491Standard Error 14.2861402Observations 16

ANOVA

df SS MS FSignificance

FRegression 1 327.124265 327.1243 1.602813 0.22616691Residual 14 2857.31324 204.0938Total 15 3184.4375

CoefficientsStandard

Error t Stat P-value Lower 95%Upper 95%

Intercept 20.85 7.49171514 2.783074 0.01466 4.78186915 36.91813X Variable 1 0.98088 0.77477473 1.266023 0.226167 -0.68084418 2.642609

First Get Regression Estimates for initial values for l0 and b0.

Ex. 8.11, page 399

Page 10: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 10

DSCI 5340FORECASTING

Get Seasonal Estimatesn alpha gamma delta SSE ssquare s16 0.2 0.1 0.1 0.000 0 0

Actual Forecast Squared

Bike Growth SeasonalMade Last Forecast Forecast

Sales (y) Level Rate Factor Period Error Error-3 -14.2163-2 6.5528-1 18.5719 Regression0 20.85 0.9809 -10.909 Estimates Detrended Average1 10 21.8309 -11.8309 -14.21632 31 22.8118 8.1882 6.55283 43 23.7927 19.2073 18.57194 16 24.7736 -8.7736 -10.9095 11 25.7545 -14.75456 33 26.7354 6.26467 45 27.7163 17.28378 17 28.6972 -11.69729 14 29.6781 -15.6781

10 36 30.659 5.341011 50 31.6399 18.360112 21 32.6208 -11.620813 19 33.6017 -14.601714 41 34.5826 6.417415 55 35.5635 19.436516 25 36.5444 -11.5444

Ex. 8.11, page 399

Page 11: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 11

DSCI 5340FORECASTING

Get Smoothed Estimates & ForecastsNote: to get ssquare, subtract 3 degrees of freedom!

Ex. 8.11, page 399

Page 12: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 12

DSCI 5340FORECASTING

Drag Formulas for complete table

Ex. 8.11, page 399

Page 13: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 13

DSCI 5340FORECASTING

Chapter 9 Box-Jenkins Methodology

This is a method for estimating ARIMA models, based on the ACF and PACF as a means of determining the stationarity of the variable in question and the lag lengths of the ARIMA model.

Although the ACF and PACF methods for determining the lag length in an ARIMA model are commonly used, there are other methods termed information criteria which can also be used (covered later)

Page 14: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 14

DSCI 5340FORECASTING

Box-Jenkins

The Box-Jenkins approach typically comprises four parts:

Identification of the model

Estimation, usually OLS

Diagnostic checking (mostly for autocorrelation)

Forecasting

Page 15: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 15

DSCI 5340FORECASTING

Elements of Box-Jenkins models

Box-Jenkins models are non-seasonal

Classical Box-Jenkins models describe stationary time series data

Nonstationary time series data can be transformed to stationary through differencing

ACF and PACF (SAC and SPAC) plots can be used to tentatively determine stationarity

Page 16: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 16

DSCI 5340FORECASTING

Parsimonious Model

The aim of this type of modeling is to produce a model that is parsimonious, or as small as possible, while passing the diagnostic checks.

A parsimonious model is desirable because including irrelevant lags in the model increases the coefficient standard errors and therefore reduces the t-statistics.

Models that incorporate large numbers of lags, tend not to forecast well, as they fit data specific features, explaining much of the noise or random features in the data.

Page 17: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 17

DSCI 5340FORECASTING

ARIMA (Box-Jenkins) Models

AutoRegressive Integrative Moving Average

Autoregressive – future values depend on previous values of the data

Moving average – future values depend on previous values of the errors

Integrated – refers to differencing the data

Page 18: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 18

DSCI 5340FORECASTING

Stationary Models

Stationarity is defined as the property of a time series to have statistical properties (mean, variance) that are constant over time.

Non-stationary time series can (often) be transformed to stationary by taking the first (or second) differences.

This is the “integration” (the “I”) part in ARIMA

Page 19: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 19

DSCI 5340FORECASTING

Stationary Models

Page 20: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 20

DSCI 5340FORECASTING

A first differencing example

Non-stationary (notice the mean change)

Stationary (the mean is now constant)

Page 21: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 21

DSCI 5340FORECASTING

How to Determine if a Time Series is Stationary?

SAC = Sample Auto-Correlation function (aka ACF)

Page 22: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 22

DSCI 5340FORECASTING

Printout of Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF)

ACF and PACF

Page 23: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 23

DSCI 5340FORECASTING

Sample Autocorrelation Function of Lag K

Page 24: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 24

DSCI 5340FORECASTING

Standard Error of Sample Autocorrelation

Page 25: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 25

DSCI 5340FORECASTING

Partial Autocorrelation Function

Page 26: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 26

DSCI 5340FORECASTING

Example of Calculation with Sample Partial Autocorrelation

Page 27: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 27

DSCI 5340FORECASTING

Next lecture: AR and MA models

ttt εYφθY 110

110 ttt εθεθY

Nonseasonal autoregressive model of order 1:

Nonseasonal moving average model of order 1:

Page 28: DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

slide 28

DSCI 5340FORECASTING

Page 438Ex 9.2,Ex 9.3,Ex 9.4

Homework in Textbook