The document discusses various quantitative time series forecasting models including causal models and time series models. It describes stationary time series models including the naïve model, moving average models, and exponential smoothing. It explains that moving average models reduce random variation by averaging past data, and that exponential smoothing requires less data storage than moving averages as it applies a smoothing constant to weight the most recent period.
4. Quantitative Forecasts
Quantitative forecasting models possess
two important and attractive features:
They are expressed in mathematical
notation. Thus, they establish an
unambiguous record of how the forecast is
made.
With the use of spreadsheets and
computers, quantitative models can be
based on an amazing quantity of data.
6. Quantitative Forecasts
- Forecasting based on data and models
Causal Models:
Time Series Models:
Price
Population
Advertising
……
Causal
Model
Year 2000
Sales
Sales1999
Sales1998
Sales1997
…………………
Time Series
Model
Year 2000
Sales
9. Time Series Forecasting Models
Time-series forecasting models produce
forecasts by extrapolating the historical
behavior of the values of a particular
single variable of interest.
Time-series data are historical data in
chronological order, with only one value
per time period.
12. 12
Time Series Forecasting Process
Look at the data
(Scatter Plot)
Forecast using one or
more techniques
Evaluate the technique
and pick the best one.
Observations from the scatter
Plot
Techniques to try Ways to evaluate
Data is reasonably stationary
(no trend or seasonality)
Heuristics - Averaging methods
Naive
Moving Averages
Simple Exponential Smoothing
MAD
MAPE
Standard Error
BIAS
Data shows a consistent trend
Regression
Linear
Non-linear Regressions (not covered
in this course)
MAD
MAPE
Standard Error
BIAS
R-Squared
Data shows both a trend and a
seasonal pattern
Classical decomposition
Find Seasonal Index
Use regression analyses to find the
trend component
MAD
MAPE
Standard Error
BIAS
R-Squared
13. 13
BIAS
The arithmetic mean of the errors
n is the number of forecast errors
Mean Absolute Deviation - MAD
Average of the absolute errors
Evaluation of Forecasting Model
n
Error
n
Forecast)
-
(Actual
BIAS
n
|
Error
|
n
Forecast
-
Actual
|
MAD
|
14. 14
Mean Square Error - MSE
Standard error
Square Root of MSE
Mean Absolute Percentage Error - MAPE
Calculate the % error using the absolute error, then average the
results
n
(Error)
n
Forecast)
-
(Actual
MSE
2
2
n
Actual
|
Forecast
-
Actual
|
MAPE
%
100
*
Evaluation of Forecasting Model
15. Time Series: Stationary Models
Stationary Model Assumptions
Assumes item forecasted will stay steady over time
(constant mean; random variation only)
Techniques will smooth out short-term irregularities
The forecast is revised only when new data becomes
available.
Stationary Model Types
Naïve Forecast
Moving Average/Weighted Moving Average
Exponential Smoothing
16. 16
Stationary data forecasting
Naïve
I sold 10 units yesterday, so I think I will sell 10
units today.
n-period Moving Average
For the past n days, I sold 12 units on average.
Therefore, I think I will sell 12 units today.
Exponential smoothing
I predicted to sell 10 units at the beginning of
yesterday; At the end of yesterday, I found out I
sold in fact 8 units. So, I will adjust the forecast of
10 (yesterday’s forecast) by adding adjusted error
(α * error). This will compensate over (under)
forecast of yesterday.
17. 17
Naïve Model
The simplest time series forecasting model
Idea: “what happened last time period (last
year, last month, yesterday) will happen
again this time”
Naïve Model:
Algebraic: Ft = Yt-1
Yt-1 : actual value in period t-1
Ft : forecast for period t
Spreadsheet: B3: = A2; Copy down
18. Naïve Forecast
Wallace Garden Supply
Forecasting
Period
Actual
Value
Naïve
Forecast Error
Absolute
Error
Percent
Error
Squared
Error
January 10 N/A
February 12 10 2 2 16.67% 4.0
March 16 12 4 4 25.00% 16.0
April 13 16 -3 3 23.08% 9.0
May 17 13 4 4 23.53% 16.0
June 19 17 2 2 10.53% 4.0
July 15 19 -4 4 26.67% 16.0
August 20 15 5 5 25.00% 25.0
September 22 20 2 2 9.09% 4.0
October 19 22 -3 3 15.79% 9.0
November 21 19 2 2 9.52% 4.0
December 19 21 -2 2 10.53% 4.0
0.818 3 17.76% 10.091
BIAS MAD MAPE MSE
Standard Error (Square Root of MSE) = 3.176619
Storage Shed Sales
19. Wallace Garden - Naive Forecast
0
5
10
15
20
25
February March April May June July August September October November December
Period
Sheds
Actual Value
Naïve Forecast
Naïve Forecast
20. 20
Moving Average Model
Simple n-Period Moving Average
Issues of MA Model
Naïve model is a special case of MA with n = 1
Idea is to reduce random variation or smooth data
All previous n observations are treated equally (equal
weights)
Suitable for relatively stable time series with no trend or
seasonal pattern
n
Y
Y
n
T
T
i
t
t
1
n
n
t
Y
2
t
Y
1
t
Y
ˆ
=
t
F
n
periods
n
previous
in
values
actual
of
Sum
ˆ
t
F
21. Moving Averages
Wallace Garden Supply
Forecasting
Period
Actual
Value Three-Month Moving Averages
January 10
February 12
March 16
April 13 10 + 12 + 16 / 3 = 12.67
May 17 12 + 16 + 13 / 3 = 13.67
June 19 16 + 13 + 17 / 3 = 15.33
July 15 13 + 17 + 19 / 3 = 16.33
August 20 17 + 19 + 15 / 3 = 17.00
September 22 19 + 15 + 20 / 3 = 18.00
October 19 15 + 20 + 22 / 3 = 19.00
November 21 20 + 22 + 19 / 3 = 20.33
December 19 22 + 19 + 21 / 3 = 20.67
Storage Shed Sales
23. Moving Average Forecast
Three Period Moving Average
0
5
10
15
20
25
1 2 3 4 5 6 7 8 9 10 11 12
Time
Value
Actual Value
Forecast
24. Stability vs. Responsiveness
Should I use a 3-period moving average or a
5-period moving average?
The larger the “n” the more stable the forecast.
A 3-period model will be more responsive to
change.
We don’t want to chase outliers.
But we don’t want to take forever to correct for a
real change.
We must balance stability with responsiveness.
25. 25
Smoothing Effect of MA Model
Longer-period moving averages (larger n)
react to actual changes more slowly
26. Weighted Moving Average Model
Assumes data from some periods are more important than
data from other periods (e.g. earlier periods).
Uses weights to place more emphasis on some periods and
less on others
Historical values of the time series are assigned different
weights when performing the forecast
27. 27
Weighted Moving Average Model
Weighted n-Period Moving Average
Typically weights are decreasing:
w1>w2>…>wn
Sum of the weights = wi = 1
Flexible weights reflect relative importance
of each previous observation in forecasting
1
n
t
Y
n
w
2
t
Y
2
w
1
t
Y
1
w
=
t
F
i
w
28. 28
Weighted MA: An Illustration
Month Weight Data
August 17% 130
September 33% 110
October 50% 90
November forecast:
FNov = (0.50)(90)+(0.33)(110)+(0.17)(130)
= 103.4
29. Weighted Moving Average
Wallace Garden Supply
Forecasting
Period
Actual
Value Weights Three-Month Weighted Moving Averages
January 10 0.222
February 12 0.593
March 16 0.185
April 13 2.2 + 7.1 + 3 / 1 = 12.298
May 17 2.7 + 9.5 + 2.4 / 1 = 14.556
June 19 3.5 + 7.7 + 3.2 / 1 = 14.407
July 15 2.9 + 10 + 3.5 / 1 = 16.484
August 20 3.8 + 11 + 2.8 / 1 = 17.814
September 22 4.2 + 8.9 + 3.7 / 1 = 16.815
October 19 3.3 + 12 + 4.1 / 1 = 19.262
November 21 4.4 + 13 + 3.5 / 1 = 21.000
December 19 4.9 + 11 + 3.9 / 1 = 20.036
Next period 20.185
Sum of weights = 1.000
Storage Shed Sales
31. Operational Problems With Moving
Averages
The operational shortcoming of simple moving
average models is that if n observations are to be
included in the moving average, then (n-1) pieces of
past data must be brought forward to be combined
with the current (the nth) observation
All this data must be stored in some way, in order to
calculate the forecast.
This may become a problem when a company needs
to forecast the demand for thousands of individual
products on an item-by-item basis.
The next weighting scheme addresses this problem.
32. Exponential Smoothing
• Moving average technique that requires little record keeping of
past data.
• Uses a smoothing constant α with a value between 0 and 1.
(Usual range 0.1 to 0.3)
• Applies alpha to most recent period, and applies one minus
alpha distributed to previous values
• α = The weight assigned to the latest period (smoothing constant)
• Forecast = α(Actual value in period t-1) + (1- α)(Forecast in period t-1)
• Can also be forecast for period t-1 plus α times the difference between the
actual value and forecast in period t-1:
)
Ŷ
)(
-
(1
)
(Y
Ŷ
=
t
F 1
-
T
1
-
T
T
)
Ŷ
-
(Y
Ŷ
Ŷ
=
t
F 1
-
T
1
-
T
1
-
T
T
value
actual
period
Last
:
Y
forecast
period
Last
:
ˆ
F
T
period
for
Forecast
:
ˆ
F
Constant
Smoothing
:
1
-
T
1
1
-
T
T
T
T
Y
Y
33. Exponential Smoothing Data
Period
Actual
Value(Yt) Ŷt-1 α Yt-1 Ŷt-1 Ŷt
January 10 = 10 0.1
February 12 10 + 0.1 *( 10 - 10 ) = 10.000
March 16 10 + 0.1 *( 12 - 10 ) = 10.200
April 13 10.2 + 0.1 *( 16 - 10.2 ) = 10.780
May 17 10.78 + 0.1 *( 13 - 10.78 ) = 11.002
June 19 11.002 + 0.1 *( 17 - 11.002 ) = 11.602
July 15 11.602 + 0.1 *( 19 - 11.602 ) = 12.342
August 20 12.342 + 0.1 *( 15 - 12.342 ) = 12.607
September 22 12.607 + 0.1 *( 20 - 12.607 ) = 13.347
October 19 13.347 + 0.1 *( 22 - 13.347 ) = 14.212
November 21 14.212 + 0.1 *( 19 - 14.212 ) = 14.691
December 19 14.691 + 0.1 *( 21 - 14.691 ) = 15.322
Storage Shed Sales
Class Exercise: What is the forecast for January of the following
year? How about March? Find the Bias, Mad & MAPE. (Note: α
equals 0.1.)
36. 36
Simple Exponential Smoothing
Properties of Simple Exponential Smoothing
Widely used and successful model
Requires very little data
Larger , more responsive forecast
Smaller , smoother forecast
Suitable for relatively stable time series
37. Evaluating the Performance
of Forecasting Techniques
Several forecasting methods have
been presented.
Which one of these forecasting
methods gives the “best” forecast?
38. Performance Measures –
Sample Example
• Find the forecasts and the errors for each forecasting
technique applied to the following stationary time series.
3-Period Moving Average 3-Period Weighted Moving Avg. (.5,.3,.2)
Period Sales Forecast Error A. Error P. Error Forecast Error A. Error P. Error
1 100
2 110
3 90
4 80 100.00 -20.00 20.00 25.00 98.00 -18.00 18.00 22.50
5 105 93.33 11.67 11.67 11.11 89.00 16.00 16.00 15.24
6 115 91.67 23.33 23.33 20.29 94.50 20.50 20.50 17.83
18.33 18.80 18.17 18.52
BIAS MAD MAPE BIAS MAD MAPE
39. MAD for the moving average technique:
MAD for the weighted moving average technique:
Performance Measures –
MAD for the Sample Example
33
.
18
3
33
.
23
67
.
11
20
n
|
Error
|
n
|
Forecast
-
Actual
|
MAD
17
.
18
3
50
.
20
16
18
n
|
Error
|
n
|
Forecast
-
Actual
|
MAD
40. MAPE for the moving average technique:
MAPE for the weighted moving average technique:
Performance Measures –
MAPE for the Sample Example
80
.
18
115
33
.
23
105
67
.
11
80
20
%
100
*
3
n
Actual
|
Forecast
-
Actual
|
MAPE
52
.
18
115
50
.
20
105
16
80
18
%
100
*
3
n
Actual
|
Forecast
-
Actual
|
MAPE
41. Use the performance measures to select a
good set of values for each model parameter.
For the moving average:
the number of periods (n).
For the weighted moving average:
The number of periods (n),
The weights (wi).
For the exponential smoothing:
The exponential smoothing factor ().
Excel Solver can be used to determine the
values of the model parameters.
Performance Measures –
Selecting Model Parameters
43. Time Series Components
Trend
persistent upward or downward pattern in a time series
Seasonal
Variation dependent on the time of year
Each year shows same pattern
Cyclical
up & down movement repeating over long time frame
Each year does not show same pattern
Noise or random fluctuations
follow no specific pattern
short duration and non-repeating
45. Trend & Seasonality
Trend analysis
Technique that fits a trend equation (or curve) to a series of
historical data points
Projects the equation into the future for medium and long
term forecasts. Typically do not want to forecast into the
future more than half the number of time periods used to
generate the forecast
Seasonality analysis
Adjustment to time series data due to variations at certain
periods.
Adjust with seasonal index - ratio of average value of the
item in a season to the overall annual average value.
Examples: demand for coal in winter months; demand for
soft drinks in the summer and over major holidays
46. Linear Trend Analysis
Midwestern Manufacturing Sales
Scatter Diagram
Actual
value (or)
Y
Period
number
(or) X
74 1995
79 1996
80 1997
90 1998
105 1999
142 2000
122 2001
Sales(in units) vs. Time
0
20
40
60
80
100
120
140
160
1994 1995 1996 1997 1998 1999 2000 2001 2002
47. Least Squares for Linear Regression
Midwestern Manufacturing
Least Squares Method
Time
Values
of
Dependent
Variables
Objective: Minimize the
squared deviations!
48. Trend Analysis - Least Squares
Method For Linear Regression
Y
^
]
X
n
-
XY
[
_
_
Y
_
2
2
X
n
-
X
Curve fitting method used for time series
data (also called time series regression
model)
Useful when the time series has a clear
trend
Can not capture seasonal patterns
Linear Trend Model: Yt = a + bt
t is time index for each period, t = 1, 2, 3,…
49. bt
a
Y
^
Where
Y
^
= predicted value of the dependent variable (demand)
a = Y- intercept
b = Slope of the regression line
t = independent variable (time period = 1, 2, 3, ….)
Trend Analysis - Least Squares
Method For Linear Regression
50. 50
Curve Fitting:
Simple Linear Regression
One Independent Variable (X) is used to predict
one Dependent Variable (Y): Y = a + b X
Given n observations (Xi, Yi), we can fit a line to the
overall pattern of these data points. The Least
Squares Method in statistics can give us the best a
and b in the sense of minimizing (Yi - a - bXi)2:
n
X
b
n
Y
a
n
X
X
n
Y
X
Y
X
b
i
i
i
i
i
i
i
i
2
2
)
(
/
Regression formula is an optional learning objective
51. 51
Find the regression line with Excel
Use Excel’s Tools | Data Analysis | Regression
Curve Fitting: Multiple Regression
Two or more independent variables are used to
predict the dependent variable:
Y = b0 + b1X1 + b2X2 + … + bpXp
Use Excel’s Tools | Data Analysis | Regression
Curve Fitting:
Simple Linear Regression
52. Linear Trend Data & Error Analysis
Midwestern Manufacturing Company
Forecasting Linear trend analysis
Input Data Forecast Error Analysis
Period
Actual value
(or) Y
Period number
(or) X Forecast Error
Absolute
error
Squared
error
Absolute
% error
Year 1 74 1 67.250 6.750 6.750 45.563 9.12%
Year 2 79 2 77.786 1.214 1.214 1.474 1.54%
Year 3 80 3 88.321 -8.321 8.321 69.246 10.40%
Year 4 90 4 98.857 -8.857 8.857 78.449 9.84%
Year 5 105 5 109.393 -4.393 4.393 19.297 4.18%
Year 6 142 6 119.929 22.071 22.071 487.148 15.54%
Year 7 122 7 130.464 -8.464 8.464 71.644 6.94%
Average 8.582 110.403 8.22%
Intercept 56.714 MAD MSE MAPE
Slope 10.536
Next period 141.000 8
Enter the actual values in cells shaded YELLOW. Enter new time period at the bottom to forecast
53. Least Squares Graph
Trend Analysis
y = 10.536x + 56.714
0
20
40
60
80
100
120
140
160
1 2 3 4 5 6 7
Time
Value
Actual values Linear (Actual values)
54. 54
Pattern-based forecasting – Seasonal
The methods we have learned (Heuristic
methods and Regression) are not
suitable for data that has pronounced
fluctuations.
If data seasonalized:
Deseasonalize the data.
Make forecast based on the deseasonalized data
Reseasonalize the forecast
Good forecast should mimic reality. Therefore, it is
needed to give seasonality back.
55. 55
Pattern-based forecasting – Seasonal
Deseasonalize
Forecast
Reseasonalize
Actual data Deseasonalized data
Example (SI + Regression)
56. 56
Pattern-based forecasting – Seasonal
Deseasonalization
Deaseasonalized Data =
Reseasonalization
Reseasonalized Forecast
= (Deseasonalized Forecast )* (Seasonal Index)
Index
Seasonal
Value
Actual
57. Forecasting Seasonal Data With
Trend
1. Calculate the seasonal indices.
2. Calculate “deseasonalized” trend by divide the
actual value (Y) by the seasonal index for that
period.
3. Find the trend line, and extend the trend line
into the desired forecast period.
4. Now that we have the Seasonal Indices and
Trend line, we can reseasonalize the data and
generate the “seasonalized” forecast by
multiplying the trend line values in the forecast
period by the appropriate seasonal indices for
each time period.
58. Forecasting Seasonal Data:
Calculating Seasonal Indexes
Eichler Supplies
Year Month Demand
Average
Demand Ratio
Seasonal
Index
1 January 80 94 0.851 0.957
February 75 94 0.798 0.851
March 80 94 0.851 0.904
April 90 94 0.957 1.064
May 115 94 1.223 1.309
June 110 94 1.170 1.223
July 100 94 1.064 1.117
August 90 94 0.957 1.064
September 85 94 0.904 0.957
October 75 94 0.798 0.851
November 75 94 0.798 0.851
December 80 94 0.851 0.851
2 January 100 94 1.064 0.957
February 85 94 0.904 0.851
March 90 94 0.957 0.904
April 110 94 1.170 1.064
May 131 94 1.394 1.309
June 120 94 1.277 1.223
July 110 94 1.170 1.117
August 110 94 1.170 1.064
September 95 94 1.011 0.957
October 85 94 0.904 0.851
November 85 94 0.904 0.851
December 80 94 0.851 0.851
Seasonal Index – ratio of the
average value of the item in a
season to the overall average
annual value.
Example: average of year 1
January ratio to year 2 January
ratio.
(0.851 + 1.064)/2 = 0.957
Ratio = Demand / Average Demand
If Year 3 average monthly demand is
expected to be 100 units.
Forecast demand Year 3 January:
100 X 0.957 = 96 units
Forecast demand Year 3 May:
100 X 1.309 = 131 units
59. Forecasting Seasonal Data:
Calculating Seasonal Indexes
Eichler Supplies
Year Month Demand
Average
Demand Ratio
Seasonal
Index
1 January 80 94 0.851 0.957
February 75 94 0.798 0.851
March 80 94 0.851 0.904
April 90 94 0.957 1.064
May 115 94 1.223 1.309
June 110 94 1.170 1.223
July 100 94 1.064 1.117
August 90 94 0.957 1.064
September 85 94 0.904 0.957
October 75 94 0.798 0.851
November 75 94 0.798 0.851
December 80 94 0.851 0.851
2 January 100 94 1.064 0.957
February 85 94 0.904 0.851
March 90 94 0.957 0.904
April 110 94 1.170 1.064
May 131 94 1.394 1.309
June 120 94 1.277 1.223
July 110 94 1.170 1.117
August 110 94 1.170 1.064
September 95 94 1.011 0.957
October 85 94 0.904 0.851
November 85 94 0.904 0.851
December 80 94 0.851 0.851
1. Take average of all Demand
Values (Average Demand
Column)
2. Get Ratio of
“Actual Value: Average Value”
for each period (Ratio
Column)
3. Average the ratio for
corresponding periods to get
seasonal index
064
.
1
94
100
January
:
Y2
851
.
94
80
January
:
Y1
957
.
2
064
.
1
851
.
2
Ratio
January
:
Y2
Ratio
January
:
Y1
January
for
Index
Seasonal
61. 61
Can you…
describe general forecasting process?
compare and contrast trend, seasonality and
cyclicality?
describe the forecasting method when data is
stationary?
describe the forecasting method when data
shows trend?
describe the forecasting method when data
shows seasonality?