Professional Documents
Culture Documents
Predicted
demand
looking
Time back six
Jan Feb Mar Apr May Jun Jul Aug months
Actual demand (past sales)
Predicted demand
Whats Forecasting All About?
From the March 10, 2006 WSJ:
Trends
Seasonality
Cyclical elements
Autocorrelation
Random variation
Some Important Questions
Causal Models:
Explores cause-and-effect relationships
Uses leading indicators to predict the future
E.g. housing starts and appliance sales
Simulation:
Models that can incorporate some randomness and non-
linear effects
Composition of Time Series Data
120
100
80
60
40
20
0
1 2 3 4 5 6 7 8 9 10
Nave Forecasting
At At 1 At 2 .............
Ft 1
n
Time Series: Moving average
The moving average model uses the last t periods in order to
predict demand in period t+1.
There can be two types of moving average models: simple
moving average and weighted moving average
The moving average model assumption is that the most accurate
prediction of future demand is a simple (linear) combination of
past demand.
Time series: simple moving
average
In the simple moving average models the forecast value is:
At + At-1 + + At-n
Ft+1 =
n
At At 1 ......... At N 1
Ft 1
N
Example: forecasting sales at Kroger
Kroger sells (among other stuff) bottled spring water
Month Bottles
Jan 1,325
Feb 1,353 What will the
Mar 1,305 sales be for
Apr 1,275 July?
May 1,210
Jun 1,195
Jul ?
What if we use a 3-month simple moving average?
What do we observe?
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
Mar 1,305
What will be the sales
Apr 1,275 for July?
May 1,210
Jun 1,195
Jul ?
6-month simple moving average
July
1,277 1,267 1,257 1,247
Forecast
Smoothing
Denotes the importance
constant
of the past error
alpha
Why use exponential smoothing?
Ft Ft 1 ( At 1 Ft 1 )
Ft At 1 (1 ) Ft 1
0 1
The smoothing constant expresses how much our forecast
will react to observed differences
If is low: there is little reaction to differences.
If is high: there is a lot of reaction to differences.
Example: bottled water at Kroger
Month Actual Forecasted = 0.2
Jan 1,325 1,370
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
Time Series Problem Solution
11 88 97 109 92 103 99 98
Trend..
What do you think will happen to a
moving average or exponential smoothing
model when there is a trend in the data?
Impact of trend
Sales
Actual
Regular exponential
Data smoothing will always
Forecast lag behind the trend.
Can we include trend
analysis in exponential
smoothing?
Month
Exponential smoothing with trend
FIT: Forecast including trend
: Trend smoothing constant
FITt Ft Tt (chosen by the user)
At Ft Tt FITt = 0.8
= 0.5
Jan 1325 1380 -10 1370
Feb 1353 1334 -28 1306
Mar 1305 1344 -9 1334
Apr 1275 1311 -21 1290
May 1210 1278 -27 1251
Jun 1218 -43 1175
Exponential Smoothing with Trend
1400
1350
Actual
1300
a = 0.2
1250 a = 0.8
a = 0.8, d = 0.5
1200
1150
0 1 2 3 4 5 6 7
Forecasting For Seasonal Series
Seasonality corresponds to a pattern in the data
that repeats at regular intervals. (See figure next
slide)
For instance, ice cream, air conditioners have peaks
associated with summer. Toys and gift items
experiences spikes in demand right before
Christmas.
Multiplicative seasonal factors: c1 , c2 , . . . , cN where
i = 1 is first season of cycle, i = 2 is second season
of the cycle, etc.
S ci = N
ci = 1.25 implies a demand 25% higher than the
baseline
ci = 0.75 implies 25% lower than the baseline
A Seasonal Demand Series
Quick and Dirty Method of Estimating
Seasonal Factors
Compute the sample mean of the entire data
set (should be at least several cycles of data)
Divide each observation by the sample mean
(This gives a factor for each observation)
Average the factors for like seasons
The resulting n numbers will exactly
add to N and correspond to the N
seasonal factors.
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.
Lets do one:
Season Cycle Demand Season Cycle Demand
Q1 2001 205 Q1 2002 225
Q2 2001 225 Q2 2002 248
Q3 2001 185 Q3 2002 203
Q4 2001 285 Q4 2002 310
Average Monthly
Temperature
The best line is the one that minimizes
the error
The predicted line is
Y a bX
i yi - Yi
Min i
2
What does that mean?
Alcohol Sales
So LSM tries to
minimize the distance
between the line and
the points!
Average Monthly
Temperature
Least Squares Method of Linear
Regression
Then the line is defined by
Y a bX
a y bx
b
xy nx y
x nx 2 2
How can we compare across
forecasting models?
We need a metric that provides estimation of accuracy
A F t t
M FE i 1
n
1. A more positive or negative MFE implies worse
performance; the forecast is biased.
More critical: Wecan compesate for forecaste errors through
inventory, expediting, faster delivery means, and other kind
of responses.
Measuring Accuracy: MAD
MAD = Mean Absolute Deviation
It is the average absolute error in the observations
A F t t
M AD i1
n
1. Higher MAD implies worse performance.
2. MAD also measures deviation (error) from the
expected result (the forecast).
2. If errors are normally distributed, then =1.25MAD
Key Point
Exponential
70 - 6.0
Smoothing
Forecast
33 - 2.0
Including Trend