Www.izmirekonomi.edu.tr 1-1 Chapter 2 Forecasting.
-
Upload
amy-morton -
Category
Documents
-
view
229 -
download
2
Transcript of Www.izmirekonomi.edu.tr 1-1 Chapter 2 Forecasting.
www.izmirekonomi.edu.tr
1-1
Chapter 2
Forecasting
www.izmirekonomi.edu.tr
1-2
Introduction to Forecasting What is forecasting?
Primary Function is to Predict the Future
Why are we interested? Affects the decisions we make today
Examples: who uses forecasting in their jobs? forecast demand for products and services forecast availability of manpower for manufacturing or
services. forecast inventory and materiel needs daily for mfg or
services
www.izmirekonomi.edu.tr
1-3
Characteristics of Forecasts They are usually wrong!
A good forecast is more than a single number mean and standard deviation range (high and low)
Aggregate forecasts are usually more accurate Accuracy erodes as we go further into the future. Forecasts should not be used to the exclusion of
known information
www.izmirekonomi.edu.tr
1-4
What Makes a Good Forecast
It should be timely It should be as accurate as possible It should be reliable It should be in meaningful units It should be presented in writing The method should be easy to use and
understand in most cases.
www.izmirekonomi.edu.tr
1-5
Forecast Horizons in Operation Planning Figure 2.1
www.izmirekonomi.edu.tr
1-6Subjective Forecasting Methods Sales Force Composites
Aggregation of sales personnel estimates Customer Surveys Jury of Executive Opinion The Delphi Method
Individual opinions are compiled and reconsidered. Repeat until and overall group consensus is (hopefully) reached.
www.izmirekonomi.edu.tr
1-7
Judgmental Forecasts There may not be enough time to gather data and analyze
quantitative data or no data at all. Expert Judgment – managers(marketing,operations,finance,etc.)
Be careful about who you call an “expert” Sales force composite
Recent experience may influence their perceptions Consumer surveys
Requires considerable amount of knowledge and skill Opinions of managers and staff
Delphi method: a series of questionnaire, responses are kept anonymous, new questionnaires are developed based on earlier results – Rand corporation (1948)
www.izmirekonomi.edu.tr
1-8Objective Forecasting Methods
Two primary methods: causal models and time series methods
Causal Models Let Y be the quantity to be forecasted and (X1, X2, . .
. , Xn) be n variables that have predictive power for Y.
A causal model is Y = f (X1, X2, . . . , Xn).
A typical relationship is a linear one. That is,
Y = a0 + a1X1 + . . . + an Xn. What might be such variables for average income for Turkey for 2007?
www.izmirekonomi.edu.tr
1-9
Time Series MethodsA time series is just collection of past values of
the variable being predicted. Also known as naïve methods. Goal is to isolate patterns in past data. (See Figures on following pages)
Trend Seasonality Cycles Randomness
www.izmirekonomi.edu.tr
1-10
Time Series Model Building
A time-series is a time ordered sequence of observations taken at regular intervals over a period of time.
The data may be demand, earnings, profit, accidents, consumer price index,etc.
The assumption is future values of the series can be estimated from past values
One need to identify the underlying behavior of the series - pattern of the data
www.izmirekonomi.edu.tr
1-11Some Behaviors Typically Observed
Trend E.g., population shifts, change in income. Usually a long-term
movement in data Seasonality
Fairly regular variations, e.g., Friday nights in restaurants, new year in shopping malls, rush hour traffic., etc.
Cycles Wavelike variations lasting more than a year, e.g. economic recessions,
etc. Irregular variations
Caused by unusual circumstances, e.g., strikes, weather conditions, etc.
Random variations Residual variations after all other behaviors are accounted for.
Caused by chance
www.izmirekonomi.edu.tr
1-12
Forecast Variations
Trend
Irregular variation
Seasonal variations
908988
Cycles
Trend with seasonal pattern
www.izmirekonomi.edu.tr
1-13
Types of Time Series ModelsWe will cover the following techniques in this section; Naïve Techniques for averaging
Moving average Weighted moving average Exponential smoothing
Techniques for trend Linear equations Trend adjusted exponential smoothing
Techniques for seasonality Techniques for Cycles
www.izmirekonomi.edu.tr
1-14
www.izmirekonomi.edu.tr
1-15
Notation Conventions Let D1, D2, . . . Dn, . . . be the past values of the series
to be predicted (demand). If we are making a forecast in period t, assume we have observed Dt , Dt-1 etc.
Let Ft, t + forecast made in period t for the demand in period t + where = 1, 2, 3, …
Then Ft -1, t is the forecast made in t-1 for t and Ft,
t+1 is the forecast made in t for t+1. (one step ahead) Use shorthand notation Ft = Ft - 1, t .
www.izmirekonomi.edu.tr
1-16
Evaluation of Forecasts The forecast error in period t, et, is the difference between the
forecast for demand in period t and the actual value of demand in t.
For a multiple step ahead forecast: et = Ft -, t - Dt.
For one step ahead forecast: et = Ft - Dt. e1, e2, .. , en forecast errors over n periods
Mean Absolute Deviation D = (1/n) | e i |
Mean Absolute Percentage Error MAPE = [(1/n) | e i /Di| ]*100
Mean Square Error MSE = (1/n) ei 2
www.izmirekonomi.edu.tr
1-17Measures of Forecast Accuracy
Error - difference between actual value and predicted value
Mean absolute deviation (MAD) Average absolute error
Mean squared error (MSE) Average of squared error
Tracking signal Ratio of cumulative error and MAD
www.izmirekonomi.edu.tr
1-18
MAD & MSE
MAD = Actual forecast
n
MSE = Actual forecast)
-1
2
n
(
www.izmirekonomi.edu.tr
1-19
Tracking Signal
Tracking signal = (Actual-forecast)
MAD
Tracking signal = (Actual-forecast)Actual-forecast
n
www.izmirekonomi.edu.tr
1-20
Biases in Forecasts A bias occurs when the average value of a
forecast error tends to be positive or negative (ie, deviation from truth).
Mathematically an unbiased forecast is one in which E (e i ) = 0. See Figure 2.3 (next slide).
e i = 0
www.izmirekonomi.edu.tr
1-21
Forecast Errors Over Time Figure 2.3
www.izmirekonomi.edu.tr
1-22
Ex. 2.1week F1 D1 | E1 |
|E1/D1| F2 D2 | E2 ||E2/D2|
1 92 88 4 0.0455 96 91 5 0.0549
2 87 88 1 0.0114 89 89 0 0.0000
3 95 97 2 0.0206 92 90 2 0.0222
4 90 83 7 0.0843 93 90 3 0.0333
5 88 91 3 0.0330 90 86 4 0.0465
6 93 93 0 0.0000 85 89 4 0.0449
Which forecast is a better forecast? MAD, MAPE and MSE
www.izmirekonomi.edu.tr
1-23
MAD1 = 17/6 = 2.83 better MAD2 = 18/6 = 3.00 MSE1 = 79/6 = 13.17 MSE2 = 70/6 = 11.67 better MAPE1 = 0.0325 better MAPE2 = 0.0333
www.izmirekonomi.edu.tr
1-24Forecasting for Stationary Series
A stationary time series has the form:
Dt = + t where is a constant (mean of the series) and t is a random variable with mean 0 and var
Two common methods for forecasting stationary series are moving averages and exponential smoothing.
www.izmirekonomi.edu.tr
1-25
Moving Averages
In words: the arithmetic average of the N most recent observations. For a one-step-ahead forecast:
Ft = (1/N) (Dt - 1 + Dt - 2 + . . . + Dt - N )
www.izmirekonomi.edu.tr
1-26Summary of Moving Averages Advantages of Moving Average Method
Easily understood Easily computed Provides stable forecasts
Disadvantages of Moving Average Method Requires saving all past N data points Lags behind a trend Ignores complex relationships in data
www.izmirekonomi.edu.tr
1-27
Moving Average Lags a Trend Figure 2.4
www.izmirekonomi.edu.tr
1-28Exponential Smoothing Method
A type of weighted moving average that applies declining weights to past data.
Based on the idea: More recent data is more relevant
1. New Forecast = (most recent observation)
+ (1 - (last forecast)
or
2. New Forecast = last forecast - last forecast error)
where 0 < and generally is small for stability of forecasts ( around .1 to .2)
www.izmirekonomi.edu.tr
1-29Exponential Smoothing (cont.)
In symbols:
Ft+1 = Dt + (1 - ) Ft
= Dt + (1 - ) ( Dt-1 + (1 - ) Ft-1)
= Dt + (1 - )( )Dt-1 + (1 - ( )Dt - 2 + . . .
Hence the method applies a set of exponentially declining weights to past data. It is easy to show that the sum of the weights is exactly one.
(Or Ft + 1 = Ft - Ft - Dt) )
www.izmirekonomi.edu.tr
1-30
Weights in Exponential Smoothing Fig. 2-5
www.izmirekonomi.edu.tr
1-31
Comparison of ES and MA
Similarities Both methods are appropriate for stationary series Both methods depend on a single parameter Both methods lag behind a trend One can achieve the same distribution of forecast error by
setting = 2/ ( N + 1). Differences
ES carries all past history. MA eliminates “bad” data after N periods
MA requires all N past data points while ES only requires last forecast and last observation.
www.izmirekonomi.edu.tr
1-32
Exponential Smoothing for different values of alpha
So how does alpha effect forecast?
www.izmirekonomi.edu.tr
1-33
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
www.izmirekonomi.edu.tr
1-34Picking a Smoothing Constant
35
40
45
50
1 2 3 4 5 6 7 8 9 10 11 12
Period
De
ma
nd
.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.
www.izmirekonomi.edu.tr
1-35
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.
www.izmirekonomi.edu.tr
1-36
An Example of a Regression Line
www.izmirekonomi.edu.tr
1-37Linear Trend Equation - Notation
b is similar to the slope. However, since it is calculated with the variability of the data in mind, its formulation is not as straight-forward as our usual notion of slope.
A linear trend equation has the form;
Yt = a + bt
0 1 2 3 4 5 t
Y
yt =Forecast for period t,
a= value of yt at t=0 and b is the slope of the line.
www.izmirekonomi.edu.tr
1-38Insights For Calculating a and b
b = n (ty) - t y
n t 2 - ( t) 2
a = y - b t
n
Y = 28.011X - 11.598
100110120
130140150160
170180190
4.00 4.50 5.00 5.50 6.00 6.50 7.00
Height
Wei
gh
t
For further information refer tohttp://www.stat.psu.edu/~bart/0515.docor any statistics book!
Suppose that you think that there is a linear relation between the height (ft.) and weight (pounds) of humans. You collected data and want to fit a linear line to this data.
Weight= a + b Height
How do you estimate a and b?
www.izmirekonomi.edu.tr
1-39
More Insights For Calculating a and bDemand observed for
the past 11 weeks are given.
We want to fit a linear line (D=a+bT) and determine a and b that minimizes the sum of the squared deviations. (Why squared?)
A little bit calculus, take the partial derivatives and set it equal to 0 and solve for a and b!
www.izmirekonomi.edu.tr
1-40Linear Trend Equation Example
t yW e e k t 2 S a l e s t y
1 1 1 5 0 1 5 02 4 1 5 7 3 1 43 9 1 6 2 4 8 64 1 6 1 6 6 6 6 45 2 5 1 7 7 8 8 5
t = 1 5 t 2 = 5 5 y = 8 1 2 t y = 2 4 9 9( t ) 2 = 2 2 5
www.izmirekonomi.edu.tr
1-41
Linear Trend Calculation
140
150
160
170
180
190
0 2 4 6 8
Series1
Question is forecasting the sales for the 6th period. What do you think it will be?
If we fit a line to the observed sales of the last five months,
www.izmirekonomi.edu.tr
1-42
Linear Trend Calculation
y = 143.5 + 6.3t
a = 812 - 6.3(15)
5 =
b = 5 (2499) - 15(812)
5(55) - 225 =
12495 -12180
275 -225 = 6.3
143.5
y = 143.5 + 6.3*6= 181.5
www.izmirekonomi.edu.tr
1-43
Other Methods When Trend is PresentOther Methods When Trend is Present
Double exponential smoothing, of which Holt’s Double exponential smoothing, 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.
www.izmirekonomi.edu.tr
1-44
Trends Adjusted Exponential Smoothing A variation of simple Exponential Smoothing can be used
when trend is observed in historical data. It is also referred as double smoothing. Note that if a series has a trend and simple smoothing is used
the forecasts will all lag the trend. If data are increasing each forecast will be low! When trend exists we may improve the model by adjusting for this trend. (C.C. Holt)
Trend Adjusted Forecasts (TAF) is composed of two elements: a smoothed error and a trend factor;
TAFt+1 = St + Tt where
St= smoothed forecast = TAFt + (At – TAFt)
Tt= current trend estimate= Tt-1 + (TAFt– TAFt-1 – Tt-1)
www.izmirekonomi.edu.tr
1-45
Insights: TAES TAFt+1 = St + Tt where
St= smoothed forecast = TAFt + (At – TAFt)
Tt= current trend estimate= Tt-1 + (TAFt– TAFt-1 – Tt-1)= (1-
Tt-1 + (TAFt– TAFt-1 ) Weighted average of last trend and
last forecast error. and are smoothing constants to be selected by the
modeler. St is same with original ES – feedback for the forecast error
is added to previous forecast with a percentage of If there is trend ES will have a lag. We must also include this
lag to our model. Hence Tt is added where
Tt is the trend and updated each period.
www.izmirekonomi.edu.tr
1-46
Forecasting For Seasonal Series
Seasonality corresponds to a pattern in the data that repeats at regular intervals. (See figure next slide)
Multiplicative seasonal factors: c1 , c2 , . . . , cN where i = 1 is first period of season, i = 2 is second period of the season, etc..
ci = N.
ci = 1.25 implies 25% higher than the baseline on avg.
ci = 0.75 implies 25% lower than the baseline on avg.
www.izmirekonomi.edu.tr
1-47
A Seasonal Demand Series
www.izmirekonomi.edu.tr
1-48
Quick and Dirty Method of Estimating Seasonal Factors Compute the sample mean of the entire data set
(should be at least several seasons of data). Divide each observation by the sample mean. (This
gives a factor for each observation.) Average the factors for like periods in a season.
The resulting N numbers will exactly add to N and correspond to the N seasonal factors.
www.izmirekonomi.edu.tr
1-49
Deseasonalizing a Series To remove seasonality from a series,
simply divide each observation in the series by the appropriate seasonal factor. The resulting series will have no seasonality and may then be predicted using an appropriate method. Once a forecast is made on the deseasonalized series, one then multiplies that forecast by the appropriate seasonal factor to obtain a forecast for the original series.
www.izmirekonomi.edu.tr
1-50
Seasonal series with increasing trend Fig 2-10
www.izmirekonomi.edu.tr
1-51
Initialization for Winters’s Method
www.izmirekonomi.edu.tr
1-52
Practical Considerations
Overly sophisticated forecasting methods can be problematic, especially for long term forecasting. (Refer to Figure on the next slide.)
Tracking signals may be useful for indicating forecast bias.
Box-Jenkins methods require substantial data history, use the correlation structure of the data, and can provide significantly improved forecasts under some circumstances.
www.izmirekonomi.edu.tr
1-53
The Difficulty with Long-Term Forecasts
www.izmirekonomi.edu.tr
1-54
Tracking the Mean When Lost Sales are PresentFig. 2-13
www.izmirekonomi.edu.tr
1-55
Tracking the Standard Deviation
When Lost Sales are Present Fig. 2-14
www.izmirekonomi.edu.tr
1-56
Case Study: Sport Obermeyer Saves Money Using Sophisticated Forecasting Methods
Problem: Company had to commit at least half of production based on forecasts, which were often very wrong. Standard jury of executive opinion method of forecasting was replaced by a type of Delphi Method which could itself predict forecast accuracy by the dispersion in the forecasts received. Firm could commit early to items that had forecasts more likely to be accurate and hold off on items in which forecasts were probably off. Use of early information from retailers improved forecasting on difficult items.
Consensus forecasting in this case was not the best method.