Forecasting
Forecasting
Forecasting
Forecasting
2
Operations and Supply Chain Management
Forecasting—Famous Quotations 1
Predicted
demand
looking
Time back six
Jan Feb Mar Apr May Jun Jul Aug months
Actual demand (past sales)
Predicted demand
Operations and Supply Chain Management
Uses of Forecasts
Accounting Cost/profit estimates
8
Operations and Supply Chain Management
REMARKS
• Assume a causal system
• Future resembles the past
• Forecasts rarely perfect because of randomness
• Forecasts more accurate for groups vs. individuals.
• Forecasting errors among items in a group usually have a canceling
effect.
• Extremes in a group cancel each other
• Ex. I can forecast the class average from the midterm better than
Mrs. X’s individual grade.
• Sample variance of {-1,1,-1,1} is 1.
• Sample variance of {(-1+1)/2, {(-1+1)/2} is 0.
• Forecast accuracy decreases as time horizon for forecasts increases
• Ex. I can forecast this year’s class average better than next year’s
class average
9
Operations and Supply Chain Management
Timely
Reliable Accurate
Written
10
Operations and Supply Chain Management
“The forecast”
11
Operations and Supply Chain Management
Key issues in forecasting
• Trends
• Seasonality
• Cyclical elements
• Autocorrelation
• Random variation
Operations and Supply Chain Management
25 27 Average
28 30 Other factors
27 27 Average of last 3
Forecasting Models
Forecasting
Techniques
Delphi
Naive
Method
Moving
Jury of Executive
Average
Opinion
Weighted
Sales Force
Moving Average
Composite
Exponential
Consumer Market
Smoothing
Survey
Trend Analysis
Causal
Methods
Seasonality
Simple Analysis
Regression
Analysis Multiplicative
Decomposition
Multiple
Regression
Analysis
Time Series: Naïve
– Naïve
• Whatever happened
Ft Yt 1
recently will happen again
this time (same time
period)
• The model is simple and
flexible
• Provides a baseline to Ft Yt 4 : Quarterly data
measure other models
• Attempts to capture Ft Yt 12 : Monthly data
seasonal factors at the
expense of ignoring trend
Some notation: Forecast at time t is F(t)
Actual observation at time t is A(t)
Today is temperature is 98 F, A(Today)=98
F(Tomorrow)=98
F(Day after)=98
Time Series: Moving average
At + At-1 + … + At-n
Ft+1 =
n
Month Bottles
Jan 1,325
Feb 1,353
Mar 1,305 What will
the sales be
Apr 1,275
for July?
May 1,210
Jun 1,195
Jul ?
What if we use a 3-month simple moving average?
What do we observe?
24
Time Series: Weighted Moving Average
We may want to give more importance to some of the data…
wt + wt-1 + … + wt-n = 1
For a 6-month
SMA, attributing
equal weights to all
past data we miss
Time the downward trend
Jan Feb Mar Apr May Jun Jul Aug
Example: Kroger sales of bottled water
Month Bottles
Jan 1,325
Feb 1,353
What will
Mar 1,305
be the sales
Apr 1,275 for July?
May 1,210
Jun 1,195
Jul ?
6-month simple moving average…
Make the weights for the last three months more than the first
three months…
July
1,277 1,267 1,257 1,247
Forecast
Smoothing
constant Denotes the importance
alpha α of the past error
Why use exponential smoothing?
Ft Ft 1 ( At 1 Ft 1 )
Forecast today=Forecast yesterday+(alpha)*(Forecast error yesterday)
Each new forecast is equal to the previous forecast plus a percentage
of the previous error.
Today’s forecast
Depends on yesterday’s (time-wise dependence, strong memory)
But it has to be corrected by forecast error
Therefore, we should give more weight to the more recent time
periods when forecasting.
• Alpha = smoothing constant = percentage of the forecast error.
33
Exponential smoothing: the method
Ft
At 1 (1 ) Ft 1
35
Example: bottled water at Kroger
Jun ? 1,309
Example: bottled water at Kroger
Jun ? 1,225
Impact of the smoothing constant
1380
1360
1340
1320 Actual
1300
a = 0.2
1280
1260 a = 0.8
1240
1220
1200
0 1 2 3 4 5 6 7
Example of Exponential Smoothing
Forecasts made in a period and the period has the same color
39 Ft At 1 (1 ) Ft 1
Picking a Smoothing Constant:
Responsiveness vs. Smoothing
• The quickness of forecast adjustment to error is determined by the smoothing
constant.
• The closer the alpha is to zero, the slower the forecast will be to adjust to forecast
errors.
• Conversely, the closer the value of alpha is to 1.00, the greater the
responsiveness to the actual observations and the less the smoothing
• Select a smoothing constant that balances the benefits of responding to real
changes if and when they occur.
Ft Ft 1 ( At 1 Ft 1 ) At 1 (1 ) Ft 1
= 2/ ( N + 1)
40
Picking a Smoothing Constant
Sensitivity of Forecasts
Actual
50
Demand
45 0.1
40
0.4
35
1 2 3 4 5 6 7 8 9 10 11 12
Period
Excel example
41
exponential-smoothing.xls
Operations and Supply Chain Management
Holt’s Model
Ft+1 = at+bt
at is the level which represents the smoothed
value to and including the last data
The slope of the line is given by bt
The forecast for the next period Ft+1 =at+bt
The values of at and bt are updated using
at = αDt + (1-α) (at-1 + bt-1) and
bt =β (at – at-1) +(1-β) bt-1
Operations and Supply Chain Management
Example
at bt Ft
Period t Dt
1 26 26 1.8
2 28 27.84 1.812 27.8
3 29 29.5216 1.773 29.652
4 31 31.2352 1.756 31.294
5 32 32.792 1.696 32.99
6 35 34.592 1.7272 34.49
7 36.32
Operations and Supply Chain Management
Seasonality- Basic Model
Data Year 1 2 3 4
Q1 53 58 62 ?
Q2 22 25 27 ?
Q3 37 40 44 ?
Q4 45 50 56 ?
157 173 189 ?
Y=141 + 16 t
T=4, y=205
Operations and Supply Chain Management
Year 1 2 3 Avg F
Year 1 2 3 Avg F
Winters Model
Year 1 2 3 4
Q1 53 58 62 ?
Q2 22 25 27 ?
Q3 37 40 44 ?
Q4 45 50 56 ?
157 173 189 ?
1. Simple Average
Level or Constant
2. Moving Average Model
3. Exponential Smoothing
1. Linear Regression
Level + Trend
2. Holts Model
1. Basic Model
Level+ Trend +
2. Winter Seasonality
Measuring Accuracy
We need a way to compare different time series techniques for a given data set.
Four common techniques are the:
100 n Yi Ŷi
Mean Square Error, MAPE =
n i 1 Yi
Root Mean Square Error.
MSE =
n
Yi Yi 2
i 1 n
RMSE MSE
• We will focus on MSE.
Operations and Supply Chain Management
Given the data 91, 90, 96, 92, 96, 93, 98, 97,
find the forecast for the eighth period using a simple average 94.12
find the forecast for the eighth period using the weighted average (weight of 1
for the first four periods and 2 for the remaining four). 94.75
find the forecast for the ninth period using a 3-period moving average? 96
Given the data 90, 91, 92, 96, 93, 98, 97,
Find the forecast for the eighth period using simple exponential smoothing.
(Use α
= 0.3 and initial forecast using simple average)
94.435
Given the data 61, 62, 66, 65, 69, 68, 71, 66
Find the forecast for the ninth period using a simple average
Find the forecast for the ninth period using 4 period moving average.
Operations and Supply Chain Management
Given the data 60, 61, 63, 65, 67, 68, 70, 71
Find the forecast for the ninth period using simple exponential smoothing. Use α
= 0.2 and initial forecast using simple average. Answer------
Given the data 60, 61, 63, 65, 67, 68, 70, 71 find the forecast for the ninth period using
linear regression.
Given the data 63, 64, 66, 67, 67, 68, 71, 72. Use Holt’s model. Use α=β=0.2
.
The initial slope is -------