270 likes | 388 Views
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:
E N D
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
Optimize something (maximize profit, minimize cost, etc.) By varying some decision variables (“changing cells”) Keeping in mind any restrictions (“constraints”) on the decision variables What’s This Solver Thing? • In Excel: Tools Solver, to bring up:
Pg. 33 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 smaller than one (f. ex.: 0.99, 0.95) Something a bit bigger than zero (f. ex.: 0.01, 0.05) ≤ ≤ Let’s try it out …
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
Pg. 34 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
multiplicative seasonality additive trend TES vs SLRwSI • TES Ft+k = (Lt + k Tt) St+k-p • SLRwSI Ft+k = (intercept+ (t + k) slope) SI
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
Patterns in the Data? • Trend: • Yes, but it is not constant • Zero, then positive, then zero again • Seasonality? • Yes, cycle of length four
TES: SE = 24.7 TES trend is adaptive SLRwSI: SE = 32.6 SLR uses constant trend Comparison
Pg. 38 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)
Approximate with Normal Distribution “Standard Error” of the forecast errors Average Error = .3 Standard Error = 127
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
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)
Pg. 39 Steps in a Forecasting Project -1: Collect data 0: 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 models 3: Compare and select (one or more) 4: Generate forecast and range (prediction interval) More on selection
Pg. 41 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
Appropriate model... Nonlinear (ex. power) linear S-curve (ex. any CDF)
TES vs. SLR w/ SI Which method would you choose?
Holdout Strategy • Ignore part of the data (the “holdout data”) • Build models using the rest of the data • Optimize parameters • Forecast for the holdout data • Calculate perf. measures for holdout data • Choose model that performs best on holdout data • Refit parameters of best model, using all data
holdoutperiod TES vs. SLR w/ SI…in holdout period
TES vs. SLR w/ SI…in holdout period Now which method would you choose?
Calgary EMS Data Number of calls / month Trend? Seasonality?
Checking for (Yearly) Seasonality Number of calls / month
Weekly Seasonality Avg. # of calls / hr., 2004