Upload
verity-flynn
View
218
Download
4
Embed Size (px)
Citation preview
Chapter 2Chapter 2
ForecastingForecasting
McGraw-Hill/Irwin Copyright © 2005 by The McGraw-Hill Companies, Inc. All rights reserved.
1-2
Introduction to ForecastingIntroduction to Forecasting
What is forecasting?What is forecasting?– Primary Function is to Predict the FuturePrimary Function is to Predict the Future
Why are we interested?Why are we interested?– Affects the decisions we make todayAffects the decisions we make today
Examples: who uses forecasting in their jobs?Examples: who uses forecasting in their jobs?– forecast demand for products and servicesforecast demand for products and services– forecast availability of manpowerforecast availability of manpower– forecast inventory and materiel needs dailyforecast inventory and materiel needs daily
1-3
Characteristics of ForecastsCharacteristics of Forecasts
They are usually wrong!They are usually wrong! A good forecast is more than a single numberA good forecast is more than a single number
– mean and standard deviationmean and standard deviation– range (high and low)range (high and low)
Aggregate forecasts are usually more accurateAggregate forecasts are usually more accurate Accuracy erodes as we go further into the future. Accuracy erodes as we go further into the future. Forecasts should not be used to the exclusion of Forecasts should not be used to the exclusion of
known informationknown information
1-4
What Makes a Good ForecastWhat Makes a Good Forecast
It should be timelyIt should be timely It should be as accurate as possibleIt should be as accurate as possible It should be reliableIt should be reliable It should be in meaningful unitsIt should be in meaningful units It should be presented in writingIt should be presented in writing The method should be easy to use and understand The method should be easy to use and understand
in most cases.in most cases.– Ease of updating as new data becomes available. Ease of updating as new data becomes available.
1-5
Forecast Horizons in Operation Planning Figure 2.1
1-6
Forecasting MethodsForecasting Methods
Subjective Forecasting MethodsSubjective Forecasting Methods– Measures individual or group opinionMeasures individual or group opinion
Objective Forecasting MethodsObjective Forecasting Methods– Forecasts made based on past history and a Forecasts made based on past history and a
model. model. – Time Series Models: use only past history.Time Series Models: use only past history.
» Easy to incorporate into computer models.Easy to incorporate into computer models.
– Regression: Causal Model to predictRegression: Causal Model to predict
1-7
Subjective Forecasting MethodsSubjective Forecasting Methods
Sales Force Composites Sales Force Composites – Aggregation of sales personnel estimatesAggregation of sales personnel estimates
Customer SurveysCustomer Surveys» To understand future trends, change in customer viewTo understand future trends, change in customer view
Jury of Executive OpinionJury of Executive Opinion» Maybe there is a new product etc.Maybe there is a new product etc.
The Delphi MethodThe Delphi Method– Individual opinions are compiled and reconsidered. Individual opinions are compiled and reconsidered.
Repeat until and overall group consensus is (hopefully) Repeat until and overall group consensus is (hopefully) reached.reached.
1-8
Objective Forecasting MethodsObjective Forecasting Methods
Two primary methods: Two primary methods: causal modelscausal models and and time series methodstime series methods
Causal ModelsCausal Models Let Y be the quantity to be forecasted and (XLet Y be the quantity to be forecasted and (X11, X, X22, . . . , X, . . . , Xnn))
be n variables that have predictive power for Y. be n variables that have predictive power for Y.
A causal model is Y = f (XA causal model is Y = f (X11, X, X22, . . . , X, . . . , Xnn). ).
““YY depends on depends on XX11, X, X22, . . . , X, . . . , Xnn””
A typical relationship is a linear one. That is,A typical relationship is a linear one. That is,
Y = aY = a00 + a + a11XX11 + . . . + a + . . . + ann X Xnn..
1-9
Time Series MethodsTime Series Methods
A time series is just collection of past values of the A time series is just collection of past values of the variable being predicted. Also known as variable being predicted. Also known as naïvenaïve methods. Goal is to methods. Goal is to isolate patternsisolate patterns in past data.in past data. (See Figures on following pages)(See Figures on following pages)
TrendTrend SeasonalitySeasonality CyclesCycles RandomnessRandomness
1-10
1-11
Notation ConventionsNotation Conventions
Let Let DD11, D, D22, . . . D, . . . Dnn, . . ., . . . be the past values of the series to be be the past values of the series to be
predicted (demand). If we are making a forecast in period t, predicted (demand). If we are making a forecast in period t, assume we have observed Dassume we have observed Dtt , D , Dt-1t-1 etc. etc.
Let FLet Ft, t + t, t + forecast made in period t for the demand in forecast made in period t for the demand in
period t + period t + where where = 1, 2, 3, …= 1, 2, 3, …
Then FThen Ft -1, t t -1, t is the forecast made in t-1 for t and F is the forecast made in t-1 for t and Ft, t+1t, t+1 is the is the
forecast made in t for t+1. (one step ahead) Use shorthand forecast made in t for t+1. (one step ahead) Use shorthand notation Fnotation Ftt = F = Ft - 1, tt - 1, t . .
1-12
Evaluation of ForecastsEvaluation of Forecasts
The forecast error in period The forecast error in period t, et, ett, is the difference between , is the difference between the forecast for demand in period t and the actual value of the forecast for demand in period t and the actual value of demand in t. demand in t.
For a multiple step ahead forecast: For a multiple step ahead forecast: eett = F = Ft -t -, t, t - D - Dtt..
For one step ahead forecast: eFor one step ahead forecast: ett = F = Ftt - D - Dtt. . ee11, e, e22, .. , e, .. , enn forecast errors over n periods forecast errors over n periods
D = (1/n) D = (1/n) | e| e i i | | MAPE = [ MAPE = [(1/n) (1/n) | e| e i i /Di/Di| | ]*100]*100
MSE = (1/n) MSE = (1/n) eei i 22
Mean Absolute Deviation
Mean Square Error
Mean Absolute Percentage Error
1-13
Biases in ForecastsBiases in Forecasts
A A biasbias occurs when the occurs when the averageaverage value of a value of a forecast error tends to be positive or forecast error tends to be positive or negativenegative (ie, deviation from truth) (ie, deviation from truth). .
Mathematically an unbiased forecast is one Mathematically an unbiased forecast is one in which E (ein which E (e i i ) = 0. See Figure 2.3 (next ) = 0. See Figure 2.3 (next slide).slide).
ee i i = 0= 0
1-14Forecast Errors Over TimeForecast Errors Over Time Figure 2.3 Figure 2.3
1-15
Ex. 2.1Ex. 2.1
weekweek F1F1 D1D1 | | E1E1 ||||E1/D1E1/D1|| F2F2 D2D2 | | E2E2 ||
||E2/D2E2/D2||
11 9292 8888 44 0.04550.0455 9696 9191 55 0.05490.0549
22 8787 8888 11 0.01140.0114 8989 8989 00 0.00000.0000
33 9595 9797 22 0.02060.0206 9292 9090 22 0.02220.0222
44 9090 8383 77 0.08430.0843 9393 9090 33 0.03330.0333
55 8888 9191 33 0.03300.0330 9090 8686 44 0.04650.0465
66 9393 9393 00 0.00000.0000 8585 8989 44 0.04490.0449
1-16
Evaluating ForecastsEvaluating Forecasts
MAD1 = 17/6 = 2.83 MAD1 = 17/6 = 2.83 betterbetter MAD2 = 18/6 = 3.00MAD2 = 18/6 = 3.00 MSE1 = 79/6 = 13.17MSE1 = 79/6 = 13.17 MSE2 = 70/6 = 11.67 MSE2 = 70/6 = 11.67 betterbetter MAPE1 = 0.0325 MAPE1 = 0.0325 betterbetter MAPE2 = 0.0333MAPE2 = 0.0333
No one measure can be true by itself!
1-17
Forecasting for Stationary SeriesForecasting for Stationary Series
A stationary time series has the form:A stationary time series has the form:
DDtt = = + + t t where where is a constant is a constant (mean of (mean of the series) the series) and and t t is a random variable with is a random variable with mean 0 and var mean 0 and var
Two common methods for forecasting Two common methods for forecasting stationary series are stationary series are moving averagesmoving averages and and exponential smoothing.exponential smoothing.
1-18
Moving AveragesMoving Averages
In words: the arithmetic average of the In words: the arithmetic average of the NN most recent most recent observations. For a one-step-ahead forecast: observations. For a one-step-ahead forecast:
FFtt = (1/N) (D = (1/N) (Dt - 1t - 1 + D + Dt - 2 t - 2 + . . . + D + . . . + Dt - t - NN ) )
Here Here NN is the parameter, that is how many past is the parameter, that is how many past periods are we averaging over.periods are we averaging over.
What is the effect of choosing different N?What is the effect of choosing different N?
1-19Moving Average Lags a TrendMoving Average Lags a Trend Figure 2.4 Figure 2.4
1-20
Summary of Moving AveragesSummary of Moving Averages
Advantages of Moving Average MethodAdvantages of Moving Average Method– Easily understoodEasily understood– Easily computedEasily computed– Provides stable forecastsProvides stable forecasts
Disadvantages of Moving Average MethodDisadvantages of Moving Average Method– Requires saving all past N data pointsRequires saving all past N data points– Lags behind a trendLags behind a trend– Ignores complex relationships in dataIgnores complex relationships in data
1-21Simple Moving Average - Simple Moving Average - ExampleExample
Period Actual MA3 MA5
1 42
2 40
3 43
4 40 41.7
5 41 41.0 6 39 41.3 41.27 46 40.0 40.68 44 42.0 41.89 45 43.0 4210 38 45.0 4311 40 42.3 42.4
12 41.0 42.6
Consider the following Consider the following data,data,
Starting from 4Starting from 4thth period period one can start forecasting one can start forecasting by using MA3. Same is by using MA3. Same is true for MA5 after the 6true for MA5 after the 6thth period.period.
Actual versus Actual versus predicted(forecasted) predicted(forecasted) graphs are as follows;graphs are as follows;
1-22Simple Moving Average - Simple Moving Average - ExampleExample
35
37
39
41
43
45
47
1 2 3 4 5 6 7 8 9 10 11 12
Actual
MA3
MA5
1-23
Exponential Smoothing MethodExponential Smoothing Method
A type of A type of weighted moving averageweighted moving average that applies that applies declining weights to past data.declining weights to past data.
1. New Forecast =1. New Forecast = (most recent observation) (most recent observation)
+ (1 - + (1 - (last forecast)(last forecast)
oror
2. New Forecast = last forecast - 2. New Forecast = last forecast - last forecast error)last forecast error)
where 0 < where 0 < and generally is small for stability and generally is small for stability of forecasts ( around .1 to .2)of forecasts ( around .1 to .2)
1-24
Exponential Smoothing (cont.)Exponential Smoothing (cont.)
In symbols:In symbols:
FFt+1t+1 = = D Dt t + (1 - + (1 - ) F) Ft t
= = D Dt t + (1 - + (1 - ) () ( D Dt-1 t-1 + (1 - + (1 - ) F) Ft-1t-1))
= = D Dt t + (1 - + (1 - )()( )D )Dt-1 t-1 + (1 - + (1 - (( )D )Dt - 2t - 2 + . . . + . . .
Hence the method applies a set of exponentially Hence the method applies a set of exponentially declining weights to past data. It is easy to show that declining weights to past data. It is easy to show that the sum of the weights is exactly one.the sum of the weights is exactly one.
((Or FOr Ft + 1t + 1 = F = Ft t - - FFtt - D - Dtt) )) )
1-25
Weights in Exponential Smoothing Fig. 2-5
For alpha = 0.1
1-26
Comparison of ES and MAComparison of ES and MA
SimilaritiesSimilarities– Both methods are appropriate for stationary seriesBoth methods are appropriate for stationary series
– Both methods depend on a single parameterBoth methods depend on a single parameter
– Both methods lag behind a trendBoth methods lag behind a trend
– One can achieve the same distribution of forecast error by setting One can achieve the same distribution of forecast error by setting
= 2/ ( N + 1)= 2/ ( N + 1). . ((How so ?)How so ?)
DifferencesDifferences– ES carries all past history. MA eliminates “bad” data after N ES carries all past history. MA eliminates “bad” data after N
periodsperiods
– MA requires all N past data points while ES only requires last MA requires all N past data points while ES only requires last
forecast and last observationforecast and last observation..
1-27
Exponential Smoothing for Exponential Smoothing for different values of alphadifferent values of alpha
So what happens when alpha is changed?
1-28
Period Actual Alpha = 0.1 Error Alpha = 0.4 Error1 422 40 42 -2.00 42 -23 43 41.8 1.20 41.2 1.84 40 41.92 -1.92 41.92 -1.925 41 41.73 -0.73 41.15 -0.156 39 41.66 -2.66 41.09 -2.097 46 41.39 4.61 40.25 5.758 44 41.85 2.15 42.55 1.459 45 42.07 2.93 43.13 1.87
Example of Exponential Smoothing
1-29
Picking a Smoothing ConstantPicking a Smoothing Constant
35
40
45
50
1 2 3 4 5 6 7 8 9 10 11 12
Period
Demand
.1
.4
Actual
Lower values of are preferred when the underlying trend is stable and higher values of are preferred when it is susceptible to change. Note that if is low your next forecast highly depends on your previous ones and feedback is less effective.
1-30
Using Regression for Times Series ForecastingUsing Regression for Times Series Forecasting
Regression Methods Can be Used When Trend is Present. Regression Methods Can be Used When Trend is Present.
–Model: DModel: Dtt = a + bt. = a + bt.
If t is scaled to 1, 2, 3, . . . , then the least squares estimates for a If t is scaled to 1, 2, 3, . . . , then the least squares estimates for a and b can be computed as follows:and b can be computed as follows:
Set Set SSxx xx = n= n2 2 (n+1)(2n+1)/6 - [n(n+1)/2](n+1)(2n+1)/6 - [n(n+1)/2]22
Set Set SSxyxy = n = n i D i Dii - [n(n + 1)/2] - [n(n + 1)/2] D Dii
–Let Let b = Sb = Sxyxy / S / Sxxxx and a = D - b (n+1)/2and a = D - b (n+1)/2
These values of These values of aa andand b provide the “best” fit of the data in a b provide the “best” fit of the data in a least squares sense.least squares sense.
A little bit calculus, take the partial derivatives and set it equal to 0 and solve for a and b!
1-31An Example An Example of a Regression Lineof a Regression Line
1-32
Other Methods When Trend is PresentOther Methods When Trend is Present
Double exponential smoothingDouble exponential smoothing, of which Holt’s , of which Holt’s method is only one example, can also be used to method is only one example, can also be used to forecast when there is a linear trend present in forecast when there is a linear trend present in the data. The method requires separate the data. The method requires separate smoothing constants for slope and intercept. smoothing constants for slope and intercept.
Composed of 2 separate exponential smoothing Composed of 2 separate exponential smoothing equations; one for the average, one for the slope equations; one for the average, one for the slope of the trend.of the trend.
1-33Holt’s Double Exponential Holt’s Double Exponential SmoothingSmoothing
SStt==ααDDtt + (1- + (1- αα)(S)(St-1t-1 + G + Gt-1t-1))– New value of intercept at time t calculated as a New value of intercept at time t calculated as a
weighted avg. between last demand observation and weighted avg. between last demand observation and last demand forecastlast demand forecast
GGtt==ββ(S(St t – S– St-1t-1) + (1- ) + (1- ββ)G)Gt-1t-1
– Value of slope at time t is calculated as a weighted Value of slope at time t is calculated as a weighted average of last slope observation and last slope forecastaverage of last slope observation and last slope forecast
– ττ step ahead forecast is then F step ahead forecast is then Ft, t+t, t+ττ= S= Stt + + ττ G Gtt
1-34
Forecasting For Seasonal SeriesForecasting For Seasonal Series
Seasonality corresponds to a pattern in the data that repeats at Seasonality corresponds to a pattern in the data that repeats at regular intervals. (See figure next slide)regular intervals. (See figure next slide)
Multiplicative seasonal factors: cMultiplicative seasonal factors: c11 , c , c22 , . . . , c , . . . , cNN where i = 1 is where i = 1 is first period of season, i = 2 is second period of the season, first period of season, i = 2 is second period of the season, etc..etc..
cci i = N. = N.
ccii = 1.25 implies 25% higher than the baseline on avg. = 1.25 implies 25% higher than the baseline on avg.
ccii = 0.75 implies 25% lower than the baseline on avg. = 0.75 implies 25% lower than the baseline on avg.
A Seasonal Demand SeriesA Seasonal Demand Series
1-36
Quick and Dirty Method of Estimating Quick and Dirty Method of Estimating Seasonal FactorsSeasonal Factors
Compute the sample mean of the entire data set Compute the sample mean of the entire data set (should be at least several seasons of data).(should be at least several seasons of data).
Divide each observation by the sample mean. Divide each observation by the sample mean. (This gives a factor for each observation.)(This gives a factor for each observation.)
Average the factors for like periods in a season.Average the factors for like periods in a season.
The resulting N numbers will exactly add The resulting N numbers will exactly add to N and correspond to the N seasonal to N and correspond to the N seasonal factors.factors.
1-37
Deseasonalizing a SeriesDeseasonalizing a Series
To remove seasonality from a series, simply To remove seasonality from a series, simply divide each observation in the series by the divide each observation in the series by the appropriate seasonal factor. The resulting appropriate seasonal factor. The resulting series will have no seasonality and may then series will have no seasonality and may then be predicted using an appropriate method. be predicted using an appropriate method. Once a forecast is made on the Once a forecast is made on the deseasonalized series, one then multiplies deseasonalized series, one then multiplies that forecast by the appropriate seasonal that forecast by the appropriate seasonal factor to obtain a forecast for the original factor to obtain a forecast for the original series.series.
1-38Seasonal series with Seasonal series with increasing trend Fig 2-10increasing trend Fig 2-10
1-39Winter’s Method for Seasonal Winter’s Method for Seasonal ProblemsProblems
A triple exponential smoothingA triple exponential smoothing– 3 exponential smoothing equations3 exponential smoothing equations– For the base signal (intercept) or the series, For the base signal (intercept) or the series, αα– For the trend, For the trend, ββ– For the seasonal series, For the seasonal series, γγ
SSt t = = αα(D(Dtt/c/ct-N) t-N) + (1-+ (1- αα)(S)(St-1t-1+G+Gt-1t-1)) GGt t = = ββ[S[Stt-S-St-1t-1] + (1- ] + (1- ββ)G)Gt-1t-1
cct t = = γγ(D(Dtt/S/Stt) + (1- ) + (1- γγ)c)ct-Nt-N
1-40Initialization Initialization for Winters’s Methodfor Winters’s Method
1-41
Practical ConsiderationsPractical Considerations
Overly sophisticated forecasting methods can be Overly sophisticated forecasting methods can be problematic, especially for long term forecasting. (Refer problematic, especially for long term forecasting. (Refer to Figure on the next slide.)to Figure on the next slide.)
Tracking signals may be useful for indicating forecast Tracking signals may be useful for indicating forecast bias.bias.
Box-Jenkins methods require substantial data history, Box-Jenkins methods require substantial data history, use the correlation structure of the data, and can provide use the correlation structure of the data, and can provide significantly improved forecasts under some significantly improved forecasts under some circumstances.circumstances.
The Difficulty with The Difficulty with Long-Term ForecastsLong-Term Forecasts
1-43Tracking the Mean When Tracking the Mean When Lost Sales are PresentLost Sales are Present Fig. 2-13Fig. 2-13
1-44Tracking the Standard Deviation Tracking the Standard Deviation When Lost Sales are PresentWhen Lost Sales are Present Fig. 2-14Fig. 2-14
1-45
Case Study: Sport Obermeyer Saves Money Case Study: Sport Obermeyer Saves Money Using Sophisticated Forecasting MethodsUsing Sophisticated Forecasting Methods
Problem: Company had to commit at least half of production Problem: Company had to commit at least half of production based on forecasts, which were often very wrong. Standard based on forecasts, which were often very wrong. Standard jury of executive opinion method of forecasting was jury of executive opinion method of forecasting was replaced by a type of Delphi Method which could itself replaced by a type of Delphi Method which could itself predict forecast accuracy by the dispersion in the forecasts predict forecast accuracy by the dispersion in the forecasts received. Firm could commit early to items that had received. Firm could commit early to items that had forecasts more likely to be accurate and hold off on items forecasts more likely to be accurate and hold off on items in which forecasts were probably off. Use of early in which forecasts were probably off. Use of early information from retailers improved forecasting on difficult information from retailers improved forecasting on difficult items.items.
Consensus forecasting in this case was not the best method.Consensus forecasting in this case was not the best method.