Classical Decomposition

advertisement
Classical Decomposition
Boise State University
By: Kurt Folke
Spring 2003
Overview:
• Time series models & classical
decomposition
• Brainstorming exercise
• Classical decomposition explained
• Classical decomposition illustration
• Exercise
• Summary
• Bibliography & readings list
• Appendix A: exercise templates
Time Series Models &
Classical Decomposition
• Time series models are sequences of
data that follow non-random orders
• Examples of time series data:
 Sales
 Costs
• Time series models are composed of
trend, seasonal, cyclical, and random
influences
Time Series Models &
Classical Decomposition
• Decomposition time series models:
• Multiplicative:
• Additive:
•
•
•
•
Y=TxCxSxe
Y=T+C+S+e
T = Trend component
C = Cyclical component
S = Seasonal component
e = Error or random component
Time Series Models &
Classical Decomposition
• Classical decomposition is used to
isolate trend, seasonal, and other
variability components from a time
series model
• Benefits:
 Shows fluctuations in trend
 Provides insight to underlying factors
affecting the time series
Brainstorming Exercise
• Identify how this tool can be used in
your organization…
Classical Decomposition
Explained
Basic Steps:
1. Determine seasonal indexes using
the ratio to moving average method
2. Deseasonalize the data
3. Develop the trend-cyclical regression
equation using deseasonalized data
4. Multiply the forecasted trend values
by their seasonal indexes to create a
more accurate forecast
Classical Decomposition
Explained: Step 1
•
Determine seasonal indexes
•
Start with multiplicative model…
Y = TCSe
•
Equate…
Se = (Y/TC)
Classical Decomposition
Explained: Step 1
•
To find seasonal indexes, first
estimate trend-cyclical components
Se = (Y/TC)
•
Use centered moving average
 Called ratio to moving average method
•
For quarterly data, use four-quarter
moving average
 Averages seasonal influences
Example
Classical Decomposition
Explained: Step 1
•
Four-quarter moving average will
position average at…
 end of second period and
 beginning of third period
•
Use centered moving average to
position data in middle of the period
Example
Classical Decomposition
Explained: Step 1
•
Find seasonal-error components by
dividing original data by trendcyclical components
Se = (Y/TC)
•
•
•
Se = Seasonal-error components
Y = Original data value
TC = Trend-cyclical components
(centered moving average value)
Example
Classical Decomposition
Explained: Step 1
•
Unadjusted seasonal indexes (USI)
are found by averaging seasonalerror components by period
Example
•
Develop adjusting factor (AF) so USIs
are adjusted so their sum equals the
number of quarters (4)
 Reduces error
Example
Classical Decomposition
Explained: Step 1
•
Adjusted seasonal indexes (ASI) are
derived by multiplying the
unadjusted seasonal index by the
adjusting factor
ASI = USI x AF
•
•
•
ASI = Adjusted seasonal index
USI = Unadjusted seasonal index
AF = Adjusting factor
Example
Classical Decomposition
Explained: Step 2
•
Deseasonalized data is produced by
dividing the original data values by
their seasonal indexes
(Y/S) = TCe
•
•
Y/S = Deseasonalized data
TCe = Trend-cyclical-error
component
Example
Classical Decomposition
Explained: Step 3
•
Develop the trend-cyclical regression
equation using deseasonalized data
Tt = a + bt
•
•
Tt = Trend value at period t
a = Intercept value
•
b = Slope of trend line
Example
Classical Decomposition
Explained: Step 4
•
Use trend-cyclical regression
equation to develop trend data
Example
•
Create forecasted data by
multiplying the trend data values by
their seasonal indexes
 More accurate forecast
Example
Classical Decomposition
Explained: Step Summary
Summarized Steps:
1. Determine seasonal indexes
2. Deseasonalize the data
3. Develop the trend-cyclical regression
equation
4. Create forecast using trend data and
seasonal indexes
Classical Decomposition:
Illustration
• Gem Company’s operations
department has been asked
to deseasonalize and
forecast sales for the next
four quarters of the coming
year
• The Company has compiled
its past sales data in Table 1
• An illustration using classical
decomposition will follow
Table 1: Gem Company's Sales Data
Original
Year Quarter Period Sales
t
Y
1
1
1
55
2
2
47
3
3
65
4
4
70
2
1
5
65
2
6
58
3
7
75
4
8
80
3
1
9
65
2
10
62
3
11
80
4
12
85
4
1
13
70
2
14
65
3
15
85
4
16
90
5
1
17
2
18
3
19
4
20
-
Forecasted
Sales
TS
?
?
?
?
Classical Decomposition
Illustration: Step 1
• (a) Compute the
four-quarter
simple moving
average
Ex: simple MA at
end of Qtr 2 and
beginning of Qtr 3
(55+47+65+70)/4
= 59.25
Explain
Table 2: Four-Quarter Moving Average
Simple Centered
Moving Moving
Year Quarter Period Sales Average Average
t
Y
TC
1
1
1
55
2
2
47
59.25
3
3
65
61.75
60.500
4
4
70
64.50
63.125
2
1
5
65
67.00
65.750
2
6
58
69.50
68.250
3
7
75
69.50
69.500
4
8
80
70.50
70.000
3
1
9
65
71.75
71.125
2
10
62
73.00
72.375
3
11
80
74.25
73.625
4
12
85
75.00
74.625
4
1
13
70
76.25
75.625
2
14
65
77.50
76.875
3
15
85
4
16
90
Percent
Moving
Average
Se=Y/(TC)
1.074
1.109
0.989
0.850
1.079
1.143
0.914
0.857
1.087
1.139
0.926
0.846
Classical Decomposition
Illustration: Step 1
• (b) Compute the
two-quarter
centered moving
average
Ex: centered MA
at middle of Qtr 3
(59.25+61.25)/2
= 60.500
Explain
Table 2: Four-Quarter Moving Average
Simple Centered
Moving Moving
Year Quarter Period Sales Average Average
t
Y
TC
1
1
1
55
2
2
47
59.25
3
3
65
61.75
60.500
4
4
70
64.50
63.125
2
1
5
65
67.00
65.750
2
6
58
69.50
68.250
3
7
75
69.50
69.500
4
8
80
70.50
70.000
3
1
9
65
71.75
71.125
2
10
62
73.00
72.375
3
11
80
74.25
73.625
4
12
85
75.00
74.625
4
1
13
70
76.25
75.625
2
14
65
77.50
76.875
3
15
85
4
16
90
Percent
Moving
Average
Se=Y/(TC)
1.074
1.109
0.989
0.850
1.079
1.143
0.914
0.857
1.087
1.139
0.926
0.846
Classical Decomposition
Illustration: Step 1
Table 2: Four-Quarter Moving Average
• (c) Compute the
seasonal-error
component
(percent MA)
Ex: percent MA at
Qtr 3
(65/60.500)
= 1.074
Explain
Simple Centered
Moving Moving
Year Quarter Period Sales Average Average
t
Y
TC
1
1
1
55
2
2
47
59.25
3
3
65
61.75
60.500
4
4
70
64.50
63.125
2
1
5
65
67.00
65.750
2
6
58
69.50
68.250
3
7
75
69.50
69.500
4
8
80
70.50
70.000
3
1
9
65
71.75
71.125
2
10
62
73.00
72.375
3
11
80
74.25
73.625
4
12
85
75.00
74.625
4
1
13
70
76.25
75.625
2
14
65
77.50
76.875
3
15
85
4
16
90
Percent
Moving
Average
Se=Y/(TC)
1.074
1.109
0.989
0.850
1.079
1.143
0.914
0.857
1.087
1.139
0.926
0.846
Classical Decomposition
Illustration: Step 1
• (d) Compute the unadjusted seasonal index using
the seasonal-error components from Table 2
Ex (Qtr 1): [(Yr 2, Qtr 1) + (Yr 3, Qtr 1) + (Yr 4, Qtr 1)]/3
= [0.989+0.914+0.926]/3 = 0.943
Table 3: Seasonal Index Computation
Quarter
1
2
3
4
Explain
Average
(0.989+0.914+0.926)/3
(0.850+0.857+0.846)/3
(1.074+1.079+1.087)/3
(1.109+1.143+1.139)/3
=
=
=
=
Unadjusted
Seasonal
Index
0.943
0.851
1.080
1.130
4.004
x
x
x
x
Adjusting
Factor
(4.000/4.004)
(4.000/4.004)
(4.000/4.004)
(4.000/4.004)
=
=
=
=
Adjusted
Seasonal
Index
0.942
0.850
1.079
1.129
4.000
Classical Decomposition
Illustration: Step 1
• (e) Compute the adjusting factor by dividing the
number of quarters (4) by the sum of all calculated
unadjusted seasonal indexes
= 4.000/(0.943+0.851+1.080+1.130) = (4.000/4.004)
Table 3: Seasonal Index Computation
Quarter
1
2
3
4
Explain
Average
(0.989+0.914+0.926)/3
(0.850+0.857+0.846)/3
(1.074+1.079+1.087)/3
(1.109+1.143+1.139)/3
=
=
=
=
Unadjusted
Seasonal
Index
0.943
0.851
1.080
1.130
4.004
x
x
x
x
Adjusting
Factor
(4.000/4.004)
(4.000/4.004)
(4.000/4.004)
(4.000/4.004)
=
=
=
=
Adjusted
Seasonal
Index
0.942
0.850
1.079
1.129
4.000
Classical Decomposition
Illustration: Step 1
• (f) Compute the adjusted seasonal index by
multiplying the unadjusted seasonal index by the
adjusting factor
Ex (Qtr 1): 0.943 x (4.000/4.004) = 0.942
Table 3: Seasonal Index Computation
Quarter
1
2
3
4
Explain
Average
(0.989+0.914+0.926)/3
(0.850+0.857+0.846)/3
(1.074+1.079+1.087)/3
(1.109+1.143+1.139)/3
=
=
=
=
Unadjusted
Seasonal
Index
0.943
0.851
1.080
1.130
4.004
x
x
x
x
Adjusting
Factor
(4.000/4.004)
(4.000/4.004)
(4.000/4.004)
(4.000/4.004)
=
=
=
=
Adjusted
Seasonal
Index
0.942
0.850
1.079
1.129
4.000
Classical Decomposition
Illustration: Step 2
• Compute the
deseasonalized
sales by dividing
original sales by
the adjusted
seasonal index
Ex (Yr 1, Qtr 1):
(55 / 0.942)
= 58.386
Explain
Table 4: Deseasonalizing Sales
Adjusted
Original Seasonal Deseasonalized
Year Quarter Period Sales
Index
Sales
t
Y
S
TCe
1
1
1
55
0.942
58.386
2
2
47
0.850
55.294
3
3
65
1.079
60.241
4
4
70
1.129
62.002
2
1
5
65
0.942
69.002
2
6
58
0.850
68.235
3
7
75
1.079
69.509
4
8
80
1.129
70.859
3
1
9
65
0.942
69.002
2
10
62
0.850
72.941
3
11
80
1.079
74.143
4
12
85
1.129
75.288
4
1
13
70
0.942
74.310
2
14
65
0.850
76.471
3
15
85
1.079
78.777
4
16
90
1.129
79.717
Classical Decomposition
Illustration: Step 3
• Compute the trendcyclical regression
equation using
simple linear
regression
Tt = a + bt
t-bar = 8.5
T-bar = 69.6
b
= 1.465
a
= 57.180
Tt = 57.180 + 1.465t
Explain
Table 5: Regression Equation Values
Deseasonalized
Year Quarter Period
Sales
t
TCe = (Y/S)
1
1
1
58.386
2
2
55.294
3
3
60.241
4
4
62.002
2
1
5
69.002
2
6
68.235
3
7
69.509
4
8
70.859
3
1
9
69.002
2
10
72.941
3
11
74.143
4
12
75.288
4
1
13
74.310
2
14
76.471
3
15
78.777
4
16
79.717
136
1114.176
t( Y/S)
58.386
110.588
180.723
248.007
345.011
409.412
486.562
566.873
621.019
729.412
815.570
903.454
966.030
1070.588
1181.650
1275.465
9968.750
t2
1
4
9
16
25
36
49
64
81
100
121
144
169
196
225
256
1496
Classical Decomposition
Illustration: Step 4
• (a) Develop trend
sales
Tt = 57.180 + 1.465t
Ex (Yr 1, Qtr 1):
T1 = 57.180 +
1.465(1) = 58.645
Explain
Table 6: Trend Sales
Year Quarter Period
t
1
1
1
2
2
3
3
4
4
2
1
5
2
6
3
7
4
8
3
1
9
2
10
3
11
4
12
4
1
13
2
14
3
15
4
16
5
1
17
2
18
3
19
4
20
Original Deseasonalized
Sales
Sales
Y
TCe = (Y/S)
55
58.386
47
55.294
65
60.241
70
62.002
65
69.002
58
68.235
75
69.509
80
70.859
65
69.002
62
72.941
80
74.143
85
75.288
70
74.310
65
76.471
85
78.777
90
79.717
Trend
Sales
T
58.645
60.110
61.575
63.040
64.505
65.970
67.435
68.900
70.365
71.830
73.295
74.760
76.225
77.690
79.155
80.620
82.085
83.550
85.015
86.480
Classical Decomposition
Illustration: Step 4
• (b) Forecast sales
for each of the four
quarters of the
coming year
Ex (Yr 5, Qtr 1):
0.942 x 82.085
= 77.324
Explain
Table 7: Forecasted Sales
Year Quarter Period
t
1
1
1
2
2
3
3
4
4
2
1
5
2
6
3
7
4
8
3
1
9
2
10
3
11
4
12
4
1
13
2
14
3
15
4
16
5
1
17
2
18
3
19
4
20
Seasonal
Index
S
0.942
0.850
1.079
1.129
0.942
0.850
1.079
1.129
0.942
0.850
1.079
1.129
0.942
0.850
1.079
1.129
0.942
0.850
1.079
1.129
Trend
Sales
T
58.645
60.110
61.575
63.040
64.505
65.970
67.435
68.900
70.365
71.830
73.295
74.760
76.225
77.690
79.155
80.620
82.085
83.550
85.015
86.480
Forecasted
Sales
TS
77.324
71.018
91.731
97.636
Classical Decomposition
Illustration: Graphical
Look
Graph 1: Comparison of Trend, Original, and Deseasonalized Sales
100
90
Sales ($)
80
(Y/S) = TCe
Deseasonalized
70
Y
Original
T
Trend
60
50
40
0
2
4
6
8
10
Quarter
12
14
16
18
Classical Decomposition:
Exercise
• Assume you have been asked
by your boss to deseasonalize
and forecast for the next four
quarters of the coming year
(Yr 5) this data pertaining to
your company’s sales
• Use the steps and examples
shown in the explanation and
illustration as a reference
Basic Steps
Explanation
Illustration
Templates
Table 8: Your Company's Sales Data
Original
Year Quarter Period Sales
t
Y
1
1
1
5.0
2
2
2.3
3
3
8.3
4
4
10.0
2
1
5
8.3
2
6
6.0
3
7
11.7
4
8
13.3
3
1
9
8.3
2
10
7.3
3
11
13.3
4
12
15.0
4
1
13
10.0
2
14
8.3
3
15
15.0
4
16
16.7
5
1
17
2
18
3
19
4
20
-
Forecasted
Sales
TS
?
?
?
?
Summary
• Time series models are sequences
of data that follow non-arbitrary
orders
• Classical decomposition isolates the
components of a time series model
• Benefits:
Insight to fluctuations in trend
Decomposes the underlying
factors affecting the time series
Bibliography &
Readings List
DeLurgio, Stephen, and Bhame, Carl. Forecasting
Systems for Operations Management. Homewood:
Business One Irwin, 1991.
Shim, Jae K. Strategic Business Forecasting. New
York: St Lucie, 2000.
StatSoft Inc. (2003). Time Series Analysis. Retrieved
April 21, 2003, from
http://www.statsoft.com/textbook/sttimser.html
Appendix A:
Exercise Templates
Table 9: Four-Quarter Moving Average
Simple Centered
Moving Moving
Year Quarter Period Sales Average Average
t
Y
TC
1
1
1
5
2
2
2.3
3
3
8.3
4
4
10
2
1
5
8.3
2
6
6
3
7
11.7
4
8
13.3
3
1
9
8.3
2
10
7.3
3
11
13.3
4
12
15
4
1
13
10
2
14
8.3
3
15
15
4
16
16.7
Percent
Moving
Average
Se=Y/(TC)
Appendix A:
Exercise Templates
Table 10: Seasonal Index Computation
Quarter
1
2
3
4
Unadjusted
Seasonal
Index
Average
=
=
=
=
Adjusted
Seasonal
Index
Adjusting
Factor
x
x
x
x
=
=
=
=
Appendix A:
Exercise Templates
Table 11: Deseasonalizing Sales
Adjusted
Original Seasonal Deseasonalized
Year Quarter Period Sales
Index
Sales
t
Y
S
TCe
1
1
1
5
2
2
2.3
3
3
8.3
4
4
10
2
1
5
8.3
2
6
6
3
7
11.7
4
8
13.3
3
1
9
8.3
2
10
7.3
3
11
13.3
4
12
15
4
1
13
10
2
14
8.3
3
15
15
4
16
16.7
Appendix A:
Exercise Templates
Table 12: Trend Sales
Year Quarter Period
t
1
1
1
2
2
3
3
4
4
2
1
5
2
6
3
7
4
8
3
1
9
2
10
3
11
4
12
4
1
13
2
14
3
15
4
16
5
1
17
2
18
3
19
4
20
Original Deseasonalized
Sales
Sales
Y
TCe = (Y/S)
5
2.3
8.3
10
8.3
6
11.7
13.3
8.3
7.3
13.3
15
10
8.3
15
16.7
Trend
Sales
T
Appendix A:
Exercise Templates
Table 13: Forecasted Sales
Year Quarter Period
t
1
1
1
2
2
3
3
4
4
2
1
5
2
6
3
7
4
8
3
1
9
2
10
3
11
4
12
4
1
13
2
14
3
15
4
16
5
1
17
2
18
3
19
4
20
Seasonal
Index
S
Trend
Sales
T
Forecasted
Sales
TS
80.000
75.000
70.000
65.000
Download