Professional Documents
Culture Documents
BAD 425Ch07 - Forecast PDF
BAD 425Ch07 - Forecast PDF
Forecasting Models
1
9.1 Introduction to Time Series Forecasting
• Forecasting is the process of predicting the future.
• Forecasting is an integral part of almost all business
enterprises.
• Examples
– Manufacturing firms forecast demand for their product, to
schedule manpower and raw material allocation.
– Service organizations forecast customer arrival patterns to
maintain adequate customer service.
2
Introduction
• More examples
– Security analysts forecast revenues, profits, and
debt ratios, to make investment recommendations.
3
Introduction
• Good forecasts can lead to
– Reduced inventory costs.
– Lower overall personnel costs.
– Increased customer satisfaction.
5
Components of a Time Series
– Cyclical variation
• An upturn or downturn not tied to seasonal variation.
• Usually results from changes in economic conditions.
– Random effects
6
Components of a Time Series
Time
series
value Linear trend and seasonality time series
Future
Linear trend time series
Time 7
Steps in the Time Series Forecasting Process
8
Steps in the Time Series Forecasting Process
9
Steps in the Time Series Forecasting Process
10
7.2 Stationary Forecasting Models
• In a stationary model the mean value of the time series is
assumed to be constant.
•The values of et
are assumed to be
• The general form of such a model is independent
• The values of et
yt = b 0 + e t are assumed to
have a mean of 0.
Where:
yt = the value of the time series at time period t.
b0 = the unchanged mean value of the time series.
et = a random error term at time period t.
11
Stationary Forecasting Models
• Checking for trend
• Use Linear Regression if et is normally distributed.
• Use a nonparametric test if et is not normally distributed.
• Checking for seasonality component
• Autocorrelation measures the relationship between the values of the time
series in different periods.
• Lag k autocorrelation measures the correlation between time series
values which are k periods apart.
– Autocorrelation between successive periods indicates a possible trend.
– Lag 7 autocorrelation indicates one week seasonality (daily data).
– Lag 12 autocorrelation indicates 12-month seasonality (monthly data).
Ft +1 = y t t t
tt+1 t+1 tt+1 t+1
13
Moving Average Methods
y t + y t −1 + ... + y t −n+1
Ft +1 =
n t-2
t-2
t-2t-2t-2t-1
t-2
t-1 t t t t t+1
t-1t-1t-1t-1 tt t+1
14
Moving Average Methods
Ft +k = y t for k = 1, 2, 3,...
This forecast is revised only when new data
becomes available.
16
YOHO BRAND YO - YOs
Moving Average Methods -
44 2 27 72 2 1 17 7 4 42 29 9 3 30 0 4 41 14 4 4 43 3 4 43 35 5
55 4 0 02 8 0 1 18 8 3 37 76 6 3 31 1 3 34 46 6 4 44 4 S e2 9r ie9 s 1
280 299
66 3 39 95 5 1 19 9 3 36 63 3 3 32 2 2 25 52 2 4 45 5 5 52 22 2
200
77 4 43 38 8 2 20 0 5 51 13 3 3 33 3 2 25 56 6 4 46 6 3 37 76 6
88 04 43 31 1 2 21 1 1 19 97 7 3 34 4 3 37 78 8 4 47 7 4 48 83 3
99 4 44 46 6 2 22 2 4 43 38 8 3 35 5 3 39 91 1 4 48 8 4 41 16 6
1
11
16
21
26
31
36
41
46
51
1 10 0 3 35 54 4 2 23 3 5 55 57 7 3 36 6 2 21 17 7 4 49 9 2 24 45 5
1 11 1 5 52 29 9 2 24 4 6 62 25 W5 e e k s 3 37 7 4 42 27 7 5 50 0 3 39 93 3
1 12 2 2 24 41 1 2 25 5 2 26 66 6 3 38 8 2 29 93 3 5 51 1 4 48 82 2
1 13 3 2 26 62 2 2 26 6 5 55 51 1 3 39 9 2 28 88 8 5 52 2 4 48 84 4
19
Is trend present?
22
The Exponential Smoothing Technique
23
The Exponential Smoothing Technique
24
The Exponential Smoothing Technique
Define:
Ft+1 = the forecast value for time t+1
yt = the value of the time series at time t
a = smoothing constant
Ft +1 = L t = ay t + (1 − a)Ft
25
The Exponential Smoothing Technique –
Generating an initial forecast
– Approach 1:
F2 = L1 = y1
Continue from t=3 with the recursive formula.
– Approach 2:
• Average the initial “ n ” values of the time series.
• Use this average as the forecast for period n + 1 (Fn+1 = y n ).
• Begin using exponential smoothing from that time period
onward [Fn+2 = ay n + (1 − a)Fn+1 = ay n + (1 − a) y n ],
and so on.
26
The Exponential Smoothing Technique –
Future Forecasts
30
The Exponential Smoothing Technique
Average age of information
• Relationship between exponential smoothing and simple moving
average
– The two techniques will generate forecasts having the same average age of
information if
2−a
k=
a
– This formula is a useful guide to the appropriate value for a.
• An exponential smoothing forecast “based on large number of periods” should
have a small a.
• A small a provides a lot of smoothing.
• A large a provides a fast response to the recent changes in the
time series and a smaller amount of smoothing.
31
7.3 Evaluating the performance
of Forecasting Techniques
• Several forecasting methods have been
presented.
32
Performance Measures
Time 1 2 3 4 5 6
Time series: 100 110 90 80 105 115
3-Period Moving average: 100 93.33 91.6
Error for the 3-Period MA: - 20 11.67 23.4
3-Period Weighted MA(.5, .3, .2) 98 89 85.5
Error for the 3-Period WMA - 18 16 29.5
34
Performance Measures
MAD =
S | t| LAD = max | t|
n
35
Performance Measures –
MSE for the Sample Example
MSE =
S (t)2 (-20) +(11.67) +(23.4)
=
2 2 2
= 361.24
n 3
MSE =
S (t)2 (-18) + (16) + (29.5)
=
2 2 2
= 483.4
n 3
36
Performance Measures –
MAD for the Sample Example
MAD =
S | t| = |-20| + |11.67| + |23.4|
= 18.35
n 3
MAD =
S | t| = |-18| + |116| + |29.5| = 21.17
n 3
37
Performance Measures –
MAPE for the Sample Example
39
Performance Measures –
YOHO BRAND YO - YOs
=B4
Drag to Cell C56
=E5/B
5
=D5^
2
=ABS(D5 Highlight
) Cells D5:G5
=B5-C5
and Drag to
Cells
D55:G55
40
Performance Measures –
YOHO BRAND YO - YOs
=AVERAGE(B4:B7)
Forecast begins at period 5. Drag to Cell C56
=E8/B
8
=D8^
2 Highlight
=ABS(D8
) Cells D8:G8
=B8-C8 and Drag to
=C56 Cells
Drag to C58 D55:G5541
Performance Measures –
Selecting Model Parameters
• 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 (a).
• Excel Solver can be used to determine the values of the
model parameters.
42
Weights for the Weighted Moving Average
Minimize MSE using Solver-
Weights
Weights Are
Nonincreasin
g
Total of Weights
Sum to 1
43
Selecting Forecasting Technique
• Forecasting methods
– Linear regression forecast.
– Holt’s Linear Exponential Smoothing Technique.
45
The Linear Regression Approach
46
Holt’s Technique –
A qualitative demonstration
Y3 F4
+ L3 − L2
L t = ay t + (1 − a)Ft
T2 T3
L 3+
++ Tt = (L t − L t −1 ) + (1 − )Tt −1
++
F3+
+T2
L+2
2 3 4
47
The Holt’s Technique
• The Holt’s Linear Exponential Smoothing Technique.
– Adjust the Level Lt , and the Trend Tt in each period:
Level: L t = ay t + (1 − a )Ft
Trend: Tt = (L t − L t −1 ) + (1 − )Tt −1
Initial values: L 2 = y 2 and T2 = y 2 − y 1
a = smoothing constant for the time series level.
= smoothing constant for the time series trend.
L t = estimate of the time series for time t as of time t.
Tt = estimate of the time series trend for time t as of time t.
yt = value of the time series at time t.
Ft = forecast of the value of the time series for time t calculated at a
period prior to time t.
48
Future Forecasts
• Forecasting k periods into the future
– By linear regression
Ft +k = b0 + b1(t + k)
Ft +k = L t + kTt
49
American Family Products Corp.
• Standard and Poor’s (S&P) is a bond rating firm.
50
American Family Products Corp.
• The company’s assets have been increasing
at a relatively constant rate over time.
• Data
Year-end current assets
Year Current Assets
1 1990 (Million)
2 2280
3 2328
4 2635
5 3249
6 3310
7 3256
8 3533
9 3826
10 4119 51
AFP -SOLUTION
Forecasting with the Linear Regression Model
A s s e ts
4500
4000
3500
3000
2500
2000
1500
1000
500
0
Y ear 1 2 3 S1
4 5 6 7 8 9
Ye ar 10
52
AFP -SOLUTION
Forecasting with the Linear Regression Model
R egression S tatistics
M ultiple R 0.980225251
R S quare 0.960841543 The Regression Equation
A djusted R S quare
0.955946736 y t = 1788.2 + 229.89 t
S tandard E rror 149.0358255
O bservations 10
ANOVA
df SS MS F S ignificance F
R egression 1 4 3 6 0 1 1 0 .9 8 2 4 3 6 0 1 1 0 .9 8 2 196.2981421 6.53249E -07
R esidual 8 177693.4182 22211.67727
T otal 9 4 5 3 7 8 0 4 .4
=$B$31+$B$32*A2
Drag to cells C3:C13
54
AFP -SOLUTION
Forecasting using the Holt’s technique
Demonstration of the calculation procedure. Year Current Assets
with a = 0.1 and = 0.2 1 1990
Year 2: y2 = 2280 2 2280
3 2328
L2 =y2 L2 = 2280.00
4 2635
T2=y2-y1 T2 = 2280 - 1990 = 290 5 3249
F3=L2+T2 F3= 2280 + 290 = 2570.00 ………………………
Year 3: y3 = 2328 ………………………
OUTPUTS
Period 11 12 13 14 15 16 17 18 19
Forecast 4593.378 4849.579 5105.779 5361.98 5618.18 5874.38 6130.581 6386.781 6642.982
58
The Classical Decomposition- Procedure (1)
59
The Classical Decomposition- Procedure (2)
62
CFA - Solution
AVERAGE
YEAR PERIOD QUARTER MEMBERSHIP
1997 1 1 7130
2 2 6940
3 3 7354
4 4 7556
1998 5 1 7673 Average Dues Paying Members (payroll deduction)
6 2 7332
7 3 7662 9000
12 4 8143
2000 13 1 8167 7500
14 2 7902
15 3 8268 7000
16 4 8436
6500
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1997 1998 P er i od
1999 2000
63
Classical Decomposition – step 1:
Isolating Trend and Cyclical Components
66
Classical Decomposition – step 4
Adjusted Seasonal Factors
• Determine the “adjusted Calculate:
seasonal factors”. [Unadjusted seasonal factor]
[Average seasonal factor]
Without seasonality the seasonal factors for each season should be equal to 1.
Thus, the sum of all seasonal factors would be equal to 4.
The adjustment of the unadjusted seasonal factors maintains the sum of 4.
Example: The average seasonal factor is
(1.0149+.9658+1.00533+1.01624)/4=1.00057.
Adjusted Seasonal
factors The adjusted seasonal factor for the 3rd quarter:
Quarter 1 1.014325 S3/Average seasonal factor = 1.00053/1.00057 = 1.00472
Quarter 2 0.965252 Excel’s exact value=1.004759).
Quareter 3 1.004759
Quarter 4 1.015663 67
Classical Decomposition – step 5
The Deseasonalized Time Series
• Determine “Deseasonalized Calculate:
data values”. yt
[Adjusted seasonal factors]t
Example:
Deseasonalized series value for the 2nd quarter, 1998 =
y6/[Adjusted S2] = 7332/0.9652 = 7595.94
68
Classical Decomposition – step 5
The Time series trend
Deseasonalized Time Series
8400
Average Membership
8200
8000
Reduced. This graph represents TtCtet.
7800
7600
7400
Average Dues Paying Members (payroll deduction)
7200
9000
7000 8500
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
8000
Period
7500
7000
6500
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
P er i od 69
Classical Decomposition – step 6
The Time series trend Component
• Determine a deseasonalized
trend forecast. Use linear regression on the
deseasonalized time series.
70
Classical Decomposition – step 7
The forecast
71
Classical Decomposition – step 7
The forecast
• Assuming cyclic effects, create a series
of the cyclic component, as follows:
• Deseasonalized time series TCe
= t t t = Ctet.
Trend component (from the regression) Tt
72
Classical Decomposition Template
73
The additive model –
The Multiple Regression Approach
For a time series with trend and seasonality:
74
Troy’s Mobil Station
• Troy owns a gas station that experience seasonal
variation in sales.
• In addition, due to a steady increase in population
Troy feels that average sales are increasing
generally.
75
Troy’s Mobil Station
• Data
Gasoline Sales Over Five Year Period
5000
4800
Gasoline Sales
Average Daily
4600
4400
(gallons)
4200
4000
3800
3600
3400
3200
3000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
F W Spg Smr P e r i od
76
Troy’s Mobil Station –
Multiple Regression input data
Trend Seasonal variables
variable
Quarterly Input Data
Sales t X1 X2 X3
3497 1 Fall
1 0 0
3484 2 0 Winter
1 0
Year 1
3553 3 0 0 Spring
1
3837 4 Not0Fall Not Winter
0 Not 0
Spring
3726 5 1 0 0
Year 2
3589 6 0 1 0
77
Troy’s Mobil Station Template
78
Troy’s Mobil Station –
Multiple regression (Excel output)
79
Troy’s Mobil Station –
Multiple regression (Graphical interpretation)
-155.00
• •
-248.27
-155.00 -322.93 •
•
•
Fall Winter Spring Summer
80
Troy’s Mobil Station –
Performing the forecast
• The forecasting additive model is:
Ft = 3610.625 + 58.33t – 155F – 323W – 248.27S
81
Copyright © 2002 John Wiley & Sons, Inc. All rights
reserved. Reproduction or translation of this work beyond
that named in Section 117 of the United States Copyright
Act without the express written consent of the copyright
owner is unlawful. Requests for further information
should be addressed to the Permissions Department, John
Wiley & Sons, Inc. Adopters of the textbook are granted
permission to make back-up copies for their own use
only, to make copies for distribution to students of the
course the textbook is used in, and to modify this material
to best suit their instructional needs. Under no
circumstances can copies be made for resale. The
Publisher assumes no responsibility for errors, omissions,
or damages, caused by the use of these programs or from
the use of the information contained herein.
82