mgtsc 352 lecture 5: forecasting choosing ls, ts, and ss slr w si = simple linear regression with...

27
MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Upload: joleen-morris

Post on 11-Jan-2016

223 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

MGTSC 352Lecture 5: Forecasting

Choosing LS, TS, and SS

SLR w SI = Simple Linear Regression with Seasonality Indices

Range estimates

Page 2: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Choosing Weights

• Find the values for LS, TS and SS that minimize* some performance measure.

* Exception?

• Two methods:– Table – If you want to use more than one

performance measure– Solver – If you want to ‘optimize’ against one

performance measure only

Page 3: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

What’s This Solver Thing?

• In Excel: Tools Solver, to bring up:Optimize something (maximize profit, minimize cost, etc.)

By varying some decision variables (“changing cells”)

Keeping in mind any restrictions (“constraints”) on the decision variables

Page 4: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Using Solver to Choose LS, TS, SS

• What to optimize: minimize SE– Could minimize MAD or MAPE, but solver

works more reliably with SE• For the geeks: because SE is a smooth function

• Decision variables: LS, TS, SS

• Constraints:LS

TS

SS

≤≤Something a bit bigger than zero

(f. ex.: 0.01, 0.05)

Something a bit smaller than one

(f. ex.: 0.99, 0.95)

Let’s try it out …

Pg. 33

Page 5: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Why Solver Doesn’t Always Give the Same Solution

Everywhere I look is uphill! I must have reached the lowest

point.

local optimum

global optimum

Page 6: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

SLR w SI = Simple Linear Regression with Seasonality Indices

• Captures level, trend, seasonality, like TES

• Details are different• SLR Forecast

– Ft+k = (intercept + [(t + k) slope]) SI

Excel

Pg. 34

Page 7: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

TES vs SLRwSI

• TES

Ft+k = (Lt + k Tt) St+k-p

• SLRwSI

Ft+k = (intercept + (t + k) slope) SI

additive trend multiplicative seasonality

Page 8: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

TES vs SLRwSI

• Both estimate Level, Trend, Seasonality

• Data points are weighted differently

– TES: weights decline as data age

– SLR w SI: same weight for all points

• TES adapts, SLR w SI does not

Page 9: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Which Method Would Work Well for This Data?

0

50

100

150

200

250

300

350

400

450

500

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Data

Page 10: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Patterns in the Data?

• Trend:– Yes, but it is not constant– Zero, then positive, then zero again

• Seasonality?– Yes, cycle of length four

Page 11: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Comparison

• TES: SE = 24.7

• TES trend is adaptive

• SLRwSI: SE = 32.6

• SLR uses constant trend

0

50

100150

200

250

300

350400

450

500

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Data

TES

0

50

100

150

200

250300

350

400

450

500

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Data

SLR w SI

Page 12: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

How Good are the Forecasts?

• TES (optimized): Year 5, Quarter 1 sales = 1458.67– Are you willing to bet on it?

• Forecasts are always wrong– How wrong will it be?

• Put limits around a “point forecast”– “Prediction interval”– 95%* sure sales will be between low and high– How do we compute low and high?* (give or take)

Pg. 38

Page 13: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Forecast Error Distribution

Errors

0

5

10

15

20

-450

-350

-250

-150

-50 50 15

025

035

045

0M

ore

Forecast Error

Fre

qu

ency

Page 14: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Approximate with Normal Distribution

“Standard Error” of the forecast errors

Errors

02468

101214161820

Forecast Error

Freq

uenc

y

Average Error = .3

Standard Error = 127

Page 15: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

95% Prediction Interval

• 1-step Point forecast + bias 2 StdError

• 9 Jan TSX = 12654 + .3 2 127= 12654 254=[12400, 12908]=[low, high]

• Actual 12,467.99

Page 16: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Are TES and SLR w SI it?

• Certainly not– Additive seasonality models

• TES’ or SLR w SD

– Multiplicative trend models• TES’’ or Nonlinear Regression (Dt+1 = 1.1Dt)

Page 17: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Steps in a Forecasting Project

-1: Collect data0: Plot the data (helps detect patterns)1: Decide which models to use

– level – SA, SMA, WMA, ES– level + trend – SLR, DES– level + trend + seas. – TES, SLR w SI, ...

2: Use models3: Compare and select (one or more)4: Generate forecast and range (prediction interval)

More on selection

Pg. 39

Page 18: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

How to select a model?

• Look at performance measures– BIAS, MAD, MAPE, MSE

• Use holdout strategy• Example: 4 years of data• Use first 3 years to fit model(s)• Forecast for Year 4 and check the fit(s)• Select model(s)• Refit model(s) adding Year 4 data

• If you have more than one good model...

COMBINE FORECASTS

Pg. 41

Page 19: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Appropriate model...

linearNonlinear (ex. power)

S-curve (ex. any CDF)

Page 20: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

DATAB u ild in g M a t e r ia l , G a r d e n E q u ip m e n t a n d S u p p ly D e a le r s

-

5 ,0 0 0

1 0 ,0 0 0

1 5 ,0 0 0

2 0 ,0 0 0

2 5 ,0 0 0

3 0 ,0 0 0

3 5 ,0 0 0

4 0 ,0 0 0

1 9 9 2 - 2 0 0 4

Sa

les

in $

mill

ion

s

Page 21: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

TES vs. SLR w/ SI

Which method would you choose?

BIAS 127 BIAS 6MAD 628 MAD 713

MAPE 2.86% MAPE 3.32%MSE 711,039 MSE 1,002,189

TES SLR w/ SI

Page 22: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Holdout Strategy

1. Ignore part of the data (the “holdout data”)

2.Build models using the rest of the data

3.Optimize parameters

4.Forecast for the holdout data

5.Calculate perf. measures for holdout data

6.Choose model that performs best on holdout data

7.Refit parameters of best model, using all data

Page 23: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

TES vs. SLR w/ SI…in holdout period

1 5 ,0 0 0

2 0 ,0 0 0

2 5 ,0 0 0

3 0 ,0 0 0

3 5 ,0 0 0

4 0 ,0 0 0

JAN

FE

BM

AR

AP

RM

AY

JUN

JUL

AU

GS

EP

OC

TN

OV

DE

CJA

NF

EB

MA

RA

PR

MA

YJU

NJU

LA

UG

SE

PO

CT

NO

VD

EC

JAN

FE

BM

AR

AP

RM

AY

JUN

JUL

AU

GS

EP

OC

TN

OV

DE

CJA

NF

EB

MA

RA

PR

MA

YJU

NJU

LA

UG

SE

PO

CT

NO

VD

EC

2 0 0 1 2 0 0 2 2 0 0 3 2 0 0 4

S a le s T E S S L R w / S I

holdoutperiod

Page 24: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

TES vs. SLR w/ SI…in holdout period

Now which method would you choose?

BIAS 1,025 BIAS 2,995MAD 1,319 MAD 2,995

MAPE 4.29% MAPE 9.41%MSE 2,530,775 MSE 11,566,373

TES SLR w/ SI

Page 25: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Calgary EMS Data

500

600

700

800

900

1000

1100

1200

1300Ja

nF

eb

Ma

rA

pr

Ma

yJu

nJu

lA

ug

Se

pO

ctN

ov

De

cJa

nF

eb

Ma

rA

pr

Ma

yJu

nJu

lA

ug

Se

pO

ctN

ov

De

cJa

nF

eb

Ma

rA

pr

Ma

yJu

nJu

lA

ug

Se

pO

ctN

ov

De

cJa

nF

eb

Ma

rA

pr

Ma

yJu

nJu

lA

ug

Se

pO

ctN

ov

De

cJa

nF

eb

Ma

rA

pr

Ma

yJu

nJu

lA

ug

Se

pO

ctN

ov

De

c

2000 2001 2002 2003 2004

Trend?

Seasonality?

Number of calls / month

Page 26: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Checking for (Yearly) Seasonality

500

600

700

800

900

1000

1100

1200

1300Ja

n

Fe

b

Ma

r

Ap

r

Ma

y

Jun

Jul

Au

g

Se

p

Oct

No

v

De

c

2000

2001

2002

2003

2004

Number of calls / month

Page 27: MGTSC 352 Lecture 5: Forecasting Choosing LS, TS, and SS SLR w SI = Simple Linear Regression with Seasonality Indices Range estimates

Weekly Seasonality

0

20

40

60

80

100

120

140

Sun Mon Tue Wed Thu Fri Sat

Avg. # of calls / hr., 2004