25
SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boni ng Copyright 2003 © Duane S. Boning.

SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Embed Size (px)

Citation preview

Page 1: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

SMA 6304 / MIT 2.853 / MIT 2.854Manufacturing Systems

Lecture 11: Forecasting

Lecturer: Prof. Duane S. Boning

Copyright 2003 © Duane S. Boning. 1

Page 2: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Agenda1.Regression • Polynomial regression • Example (using Excel)

2.Time Series Data & Regression • Autocorrelation –ACF • Example: white noise sequences • Example: autoregressive sequences • Example: moving average • ARIMA modeling and regression

3.Forecasting Examples

Copyright 2003 © Duane S. Boning. 2

Page 3: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 3

Regression –Review&Extensions

•Single Model Coefficient: Linear Dependence

•Slope and Intercept (or Offset):

•Polynomial and Higher Order Models:

•Multiple Parameters

•Key point: “linear” regression can be used as long as the model is linear in the coefficients (doesn’t matter the dependence in theindependent variable)

Page 4: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 4

Polynomial Regression Example•

• Replicate data provides opportunity to check for lack of fit

Page 5: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 5

Growth Rate –First Order Model

• Mean significant, but linear term not

• Clear evidence of lack of fit

Page 6: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 6

Growth Rate –Second Order Model

• No evidence of lack of fit

• Quadratic term significant

Page 7: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 7

Polynomial Regression In Excel

• Create additional input columns for each input

• Use “Data Analysis” and “Regression” tool

Page 8: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 8

Polynomial Regression

Page 9: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 9

Agenda 1.Regression

• Polynomial regression

• Example (using Excel)

2.Time Series Data & Time Series Regression

• Autocorrelation –ACF

• Example: white noise sequences

• Example: autoregressive sequences

• Example: moving average

• ARIMA modeling and regression

3.Forecasting Examples

Page 10: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 10

Time Series –Time as an Implicit Parameter

• Data is often collected with a time-order•

• An underlying dynamic process (e.g. due to physics of a manufacturing process) may create autocorrelation in the data

Page 11: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 11

Intuition: Where Does Autocorrelation Come From?

• Consider a chamber with volume V, and with gas flow in and gas flow out at rate f. We are interested in the concentration x at the output, in relation to a known input concentration w.

Page 12: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 12

Key Tool: Autocorrelation Function (ACF)

•Time series data: time index i

• CCF: cross-correlation function

• ACF: auto-correlation function

Page 13: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 13

Stationary vs. Non-Stationary

Stationary series:

Process has a fixed mean

Page 14: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 14

White Noise –An Uncorrelated Series• Data drawn from IID gaussian

• ACF: We also plot the 3σlimits –values within these not significant

• Note that r(0) = 1 always (a signal is always equal to itself with zero lag –perfectly autocorrelated at k = 0)

• Sample mean

• Sample variance

Page 15: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 15

Autoregressive Disturbances •Generated by:

•Mean

•Variance

Page 16: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 16

Another Autoregressive Series

•Generated by:

High negativeautocorrelation

Slow drop in ACF with large αBut now ACF alternates in sign•

Page 17: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 17

Random Walk Disturbances

•Generated by:

•Mean

•Variance

Page 18: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 18

Moving Average Sequence •Generated by:

•Mean

•Variance

Page 19: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 19

ARMA Sequence

•Generated by:

•Both AR & MA behavior

Page 20: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 20

ARIMA Sequence

•Start with ARMA sequence

•Add Integrated (I) behavior

Page 21: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 21

Periodic Signal with Autoregressive NoiseOriginal Signal After Differencing

Page 22: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 22

Agenda

1. Regression

• Polynomial regression

• Example (using Excel)

2. Time Series Data & Regression

• Autocorrelation –ACF

• Example: white noise sequences

• Example: autoregressive sequences

• Example: moving average

• ARIMA modeling and regression

3. Forecasting Examples

Page 23: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 23

Cross-Correlation: A Leading Indicator •Now we have two series:

–An “input” or explanatory

variable x

–An “output” variable y

•CCF indicates both AR and lag:

Page 24: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 24

Regression & Time Series Modeling

• The ACF or CCF are helpful tools in selecting an appropriate model structure

– Autoregressive terms?

• xi= αxi-1

– Lag terms?

• yi= γxi-k

• One can structure data and perform regressions

– Estimate model coefficientvalues, significance, and confidence intervals

– Determine confidence intervals on output

– Check residuals

Page 25: SMA 6304 / MIT 2.853 / MIT 2.854 Manufacturing Systems Lecture 11: Forecasting Lecturer: Prof. Duane S. Boning Copyright 2003 © Duane S. Boning. 1

Copyright 2003 © Duane S. Boning. 25

Statistical Modeling Summary

1. Statistical Fundamentals

• Sampling distributions

• Point and interval estimation

• Hypothesis testing

2. Regression

• ANOVA

• Nominal data: modeling of treatment effects (mean differences)

• Continuous data: least square regression

3. Time Series Data & Forecasting

• Autoregressive, moving average, and integrative behavior

• Auto-and Cross-correlation functions

• Regression and time-series modeling