Classical DecompositionClassical Decomposition
Boise State UniversityBoise State University
By: Kurt FolkeBy: Kurt Folke
Spring 2003Spring 2003
Overview:Overview:
• Time series models & classical Time series models & classical decompositiondecomposition
• Brainstorming exerciseBrainstorming exercise• Classical decomposition explainedClassical decomposition explained• Classical decomposition illustrationClassical decomposition illustration• Exercise Exercise • SummarySummary• Bibliography & readings listBibliography & readings list• Appendix A: exercise templatesAppendix A: exercise templates
Time Series Models & Time Series Models & Classical DecompositionClassical Decomposition
• Time series modelsTime series models are sequences of are sequences of data that follow non-random ordersdata that follow non-random orders
• Examples of time series data:Examples of time series data:SalesSalesCostsCosts
• Time series models are composed of Time series models are composed of trend, seasonal, cyclical, and random trend, seasonal, cyclical, and random influencesinfluences
Time Series Models & Time Series Models & Classical DecompositionClassical Decomposition
• Decomposition time series models:Decomposition time series models:
• Multiplicative:Multiplicative: Y = T x C x S x eY = T x C x S x e• Additive:Additive: Y = T + C + S + eY = T + C + S + e
• T = Trend componentT = Trend component• C = Cyclical componentC = Cyclical component• S = Seasonal componentS = Seasonal component• e = Error or random componente = Error or random component
Time Series Models & Time Series Models & Classical DecompositionClassical Decomposition
• Classical decompositionClassical decomposition is used to is used to isolate trend, seasonal, and other isolate trend, seasonal, and other variability components from a time variability components from a time series modelseries model
• Benefits:Benefits:Shows fluctuations in trendShows fluctuations in trendProvides insight to underlying factors Provides insight to underlying factors
affecting the time seriesaffecting the time series
Brainstorming ExerciseBrainstorming Exercise
• Identify how this tool can be used in Identify how this tool can be used in your organization…your organization…
Classical Decomposition Classical Decomposition ExplainedExplained
Basic Steps:Basic Steps:1.1. Determine seasonal indexes using the Determine seasonal indexes using the
ratio to moving average methodratio to moving average method
2.2. Deseasonalize the dataDeseasonalize the data
3.3. Develop the trend-cyclical regression Develop the trend-cyclical regression equation using deseasonalized dataequation using deseasonalized data
4.4. Multiply the forecasted trend values by Multiply the forecasted trend values by their seasonal indexes to create a more their seasonal indexes to create a more accurate forecastaccurate forecast
Classical Decomposition Classical Decomposition Explained: Step 1Explained: Step 1
• Determine seasonal indexesDetermine seasonal indexes
• Start with multiplicative model…Start with multiplicative model…
Y = TCSeY = TCSe
• Equate…Equate…
Se = (Y/TC)Se = (Y/TC)
Classical Decomposition Classical Decomposition Explained: Step 1Explained: Step 1
• To find seasonal indexes, first estimate To find seasonal indexes, first estimate trend-cyclical componentstrend-cyclical components
Se = (Y/Se = (Y/TCTC))
• Use centered moving average Use centered moving average Called Called ratio to moving average methodratio to moving average method
• For quarterly data, use four-quarter For quarterly data, use four-quarter moving average moving average
Averages seasonal influencesAverages seasonal influencesExample
Classical Decomposition Classical Decomposition Explained: Step 1Explained: Step 1
• Four-quarter moving average will Four-quarter moving average will position average at…position average at…
end of second period and end of second period and beginning of third periodbeginning of third period
• Use centered moving average to Use centered moving average to position data in middle of the periodposition data in middle of the period
Example
Classical Decomposition Classical Decomposition Explained: Step 1Explained: Step 1
• Find seasonal-error components by Find seasonal-error components by dividing original data by trend-cyclical dividing original data by trend-cyclical componentscomponents
Se = (Se = (Y/TCY/TC))
• Se = Seasonal-error componentsSe = Seasonal-error components• Y = Original data valueY = Original data value• TC = Trend-cyclical components TC = Trend-cyclical components
(centered moving average value)(centered moving average value)
Example
Classical Decomposition Classical Decomposition Explained: Step 1Explained: Step 1
• Unadjusted seasonal indexes (USI) are found by Unadjusted seasonal indexes (USI) are found by averagingaveraging seasonal-error components by periodseasonal-error components by period
• Develop adjusting factor (AF) so USIs are adjusted so Develop adjusting factor (AF) so USIs are adjusted so their sum equals the number of quarters (4)their sum equals the number of quarters (4)
Reduces errorReduces error
ExampleExample
ExampleExample
Classical Decomposition Classical Decomposition Explained: Step 1Explained: Step 1
• Adjusted seasonal indexes (ASI) are Adjusted seasonal indexes (ASI) are derived by multiplying the unadjusted derived by multiplying the unadjusted seasonal index by the adjusting factorseasonal index by the adjusting factor
ASI = USI x AFASI = USI x AF
• ASI = Adjusted seasonal indexASI = Adjusted seasonal index• USI = Unadjusted seasonal indexUSI = Unadjusted seasonal index• AF = Adjusting factorAF = Adjusting factor
ExampleExample
Classical Decomposition Classical Decomposition Explained: Step 2Explained: Step 2
• Deseasonalized data is produced by Deseasonalized data is produced by dividing the original data values by their dividing the original data values by their seasonal indexesseasonal indexes
((Y/SY/S) = TCe) = TCe
• Y/S = Deseasonalized dataY/S = Deseasonalized data• TCe = Trend-cyclical-error TCe = Trend-cyclical-error
componentcomponent
ExampleExample
Classical Decomposition Classical Decomposition Explained: Step 3Explained: Step 3
• Develop the trend-cyclical regression Develop the trend-cyclical regression equation using deseasonalized dataequation using deseasonalized data
TTt t = a + bt= a + bt
• TTtt = Trend value at period = Trend value at period tt
• a = Intercept valuea = Intercept value
• b = Slope of trend lineb = Slope of trend line
ExampleExample
Classical Decomposition Classical Decomposition Explained: Step 4Explained: Step 4
• Use trend-cyclical regression equation Use trend-cyclical regression equation to develop trend datato develop trend data
• Create forecasted data by multiplying Create forecasted data by multiplying the trend data values by their seasonal the trend data values by their seasonal indexesindexes
More accurate forecastMore accurate forecast
ExampleExample
ExampleExample
Classical Decomposition Classical Decomposition Explained: Step SummaryExplained: Step Summary
Summarized Steps:Summarized Steps:
1.1. Determine seasonal indexesDetermine seasonal indexes
2.2. Deseasonalize the dataDeseasonalize the data
3.3. Develop the trend-cyclical regression Develop the trend-cyclical regression equationequation
4.4. Create forecast using trend data and Create forecast using trend data and seasonal indexesseasonal indexes
Classical Decomposition:Classical Decomposition:IllustrationIllustration
• Gem Company’s operations Gem Company’s operations department has been asked to department has been asked to deseasonalize and forecast deseasonalize and forecast sales for the next four quarters sales for the next four quarters of the coming yearof the coming year
• The Company has compiled its The Company has compiled its past sales data in Table 1past sales data in Table 1
• An illustration using classical An illustration using classical decomposition will followdecomposition will follow
Table 1: Gem Company's Sales DataOriginal Forecasted
Year Quarter Period Sales Salest Y TS
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 - ?
Classical Decomposition Classical Decomposition Illustration: Illustration: Step 1Step 1
• (a) Compute the (a) Compute the four-quarter simple four-quarter simple moving averagemoving average
Ex: simple MA at Ex: simple MA at end of Qtr 2 and end of Qtr 2 and beginning of Qtr 3beginning of Qtr 3
(55+47+65+70)/4 (55+47+65+70)/4 = 59.25= 59.25
Table 2: Four-Quarter Moving AverageSimple Centered Percent Moving Moving Moving
Year Quarter Period Sales Average Average Averaget Y TC Se=Y/(TC)
1 1 1 552 2 47 59.253 3 65 61.75 60.500 1.0744 4 70 64.50 63.125 1.109
2 1 5 65 67.00 65.750 0.9892 6 58 69.50 68.250 0.8503 7 75 69.50 69.500 1.0794 8 80 70.50 70.000 1.143
3 1 9 65 71.75 71.125 0.9142 10 62 73.00 72.375 0.8573 11 80 74.25 73.625 1.0874 12 85 75.00 74.625 1.139
4 1 13 70 76.25 75.625 0.9262 14 65 77.50 76.875 0.8463 15 854 16 90Explain
Classical DecompositionClassical DecompositionIllustration: Illustration: Step 1Step 1
• (b) Compute the (b) Compute the two-quarter two-quarter centered moving centered moving averageaverage
Ex: centered MA at Ex: centered MA at middle of Qtr 3middle of Qtr 3
(59.25+61.25)/2 (59.25+61.25)/2
= 60.500= 60.500
Table 2: Four-Quarter Moving AverageSimple Centered Percent Moving Moving Moving
Year Quarter Period Sales Average Average Averaget Y TC Se=Y/(TC)
1 1 1 552 2 47 59.253 3 65 61.75 60.500 1.0744 4 70 64.50 63.125 1.109
2 1 5 65 67.00 65.750 0.9892 6 58 69.50 68.250 0.8503 7 75 69.50 69.500 1.0794 8 80 70.50 70.000 1.143
3 1 9 65 71.75 71.125 0.9142 10 62 73.00 72.375 0.8573 11 80 74.25 73.625 1.0874 12 85 75.00 74.625 1.139
4 1 13 70 76.25 75.625 0.9262 14 65 77.50 76.875 0.8463 15 854 16 90Explain
Classical Decomposition Classical Decomposition Illustration: Illustration: Step 1Step 1
• (c) Compute the (c) Compute the seasonal-error seasonal-error component component (percent MA)(percent MA)
Ex: percent MA at Ex: percent MA at Qtr 3Qtr 3
(65/60.500) (65/60.500)
= 1.074= 1.074
Table 2: Four-Quarter Moving AverageSimple Centered Percent Moving Moving Moving
Year Quarter Period Sales Average Average Averaget Y TC Se=Y/(TC)
1 1 1 552 2 47 59.253 3 65 61.75 60.500 1.0744 4 70 64.50 63.125 1.109
2 1 5 65 67.00 65.750 0.9892 6 58 69.50 68.250 0.8503 7 75 69.50 69.500 1.0794 8 80 70.50 70.000 1.143
3 1 9 65 71.75 71.125 0.9142 10 62 73.00 72.375 0.8573 11 80 74.25 73.625 1.0874 12 85 75.00 74.625 1.139
4 1 13 70 76.25 75.625 0.9262 14 65 77.50 76.875 0.8463 15 854 16 90ExplainExplain
Classical DecompositionClassical DecompositionIllustration: Illustration: Step 1Step 1
• (d) Compute the unadjusted seasonal index using the (d) Compute the unadjusted seasonal index using the seasonal-error components seasonal-error components from Table 2from Table 2
Ex (Qtr 1): [(Yr 2, Qtr 1) + (Yr 3, Qtr 1) + (Yr 4, Qtr 1)]/3Ex (Qtr 1): [(Yr 2, Qtr 1) + (Yr 3, Qtr 1) + (Yr 4, Qtr 1)]/3
= [0.989+0.914+0.926]/3 = 0.943 = [0.989+0.914+0.926]/3 = 0.943
Table 3: Seasonal Index ComputationUnadjusted AdjustedSeasonal Adjusting Seasonal
Quarter Average Index Factor Index1 (0.989+0.914+0.926)/3 = 0.943 x (4.000/4.004) = 0.9422 (0.850+0.857+0.846)/3 = 0.851 x (4.000/4.004) = 0.8503 (1.074+1.079+1.087)/3 = 1.080 x (4.000/4.004) = 1.0794 (1.109+1.143+1.139)/3 = 1.130 x (4.000/4.004) = 1.129
4.004 4.000
ExplainExplain
Classical DecompositionClassical DecompositionIllustration: Illustration: Step 1Step 1
• (e) Compute the adjusting factor by dividing the number (e) Compute the adjusting factor by dividing the number of quarters (4) by the sum of all calculated unadjusted of quarters (4) by the sum of all calculated unadjusted seasonal indexesseasonal indexes
= 4.000/(0.943+0.851+1.080+1.130) = (4.000/4.004) = 4.000/(0.943+0.851+1.080+1.130) = (4.000/4.004)
Table 3: Seasonal Index ComputationUnadjusted AdjustedSeasonal Adjusting Seasonal
Quarter Average Index Factor Index1 (0.989+0.914+0.926)/3 = 0.943 x (4.000/4.004) = 0.9422 (0.850+0.857+0.846)/3 = 0.851 x (4.000/4.004) = 0.8503 (1.074+1.079+1.087)/3 = 1.080 x (4.000/4.004) = 1.0794 (1.109+1.143+1.139)/3 = 1.130 x (4.000/4.004) = 1.129
4.004 4.000
ExplainExplain
Classical DecompositionClassical DecompositionIllustration: Illustration: Step 1Step 1
• (f) Compute the adjusted seasonal index by multiplying (f) Compute the adjusted seasonal index by multiplying the unadjusted seasonal index by the adjusting factor the unadjusted seasonal index by the adjusting factor
Ex (Qtr 1): 0.943 x (4.000/4.004) = 0.942Ex (Qtr 1): 0.943 x (4.000/4.004) = 0.942
Table 3: Seasonal Index ComputationUnadjusted AdjustedSeasonal Adjusting Seasonal
Quarter Average Index Factor Index1 (0.989+0.914+0.926)/3 = 0.943 x (4.000/4.004) = 0.9422 (0.850+0.857+0.846)/3 = 0.851 x (4.000/4.004) = 0.8503 (1.074+1.079+1.087)/3 = 1.080 x (4.000/4.004) = 1.0794 (1.109+1.143+1.139)/3 = 1.130 x (4.000/4.004) = 1.129
4.004 4.000
ExplainExplain
Classical DecompositionClassical DecompositionIllustration: Illustration: Step 2Step 2
• Compute the Compute the deseasonalized deseasonalized sales by dividing sales by dividing original sales by original sales by the adjusted the adjusted seasonal indexseasonal index
Ex (Yr 1, Qtr 1):Ex (Yr 1, Qtr 1):
(55 / 0.942) (55 / 0.942)
= 58.386= 58.386
Table 4: Deseasonalizing Sales Adjusted
Original Seasonal DeseasonalizedYear Quarter Period Sales Index Sales
t Y S TCe1 1 1 55 0.942 58.386
2 2 47 0.850 55.2943 3 65 1.079 60.2414 4 70 1.129 62.002
2 1 5 65 0.942 69.0022 6 58 0.850 68.2353 7 75 1.079 69.5094 8 80 1.129 70.859
3 1 9 65 0.942 69.0022 10 62 0.850 72.9413 11 80 1.079 74.1434 12 85 1.129 75.288
4 1 13 70 0.942 74.3102 14 65 0.850 76.4713 15 85 1.079 78.7774 16 90 1.129 79.717ExplainExplain
Classical DecompositionClassical DecompositionIllustration: Illustration: Step 3Step 3
• Compute the trend-Compute the trend-cyclical regression cyclical regression equation using equation using simple linear simple linear regressionregression
TTt t = a + bt= a + bt
t-bar = 8.5t-bar = 8.5T-bar = 69.6T-bar = 69.6bb = 1.465 = 1.465a a = 57.180 = 57.180
TTtt = 57.180 + 1.465t = 57.180 + 1.465t
Table 5: Regression Equation ValuesDeseasonalized
Year Quarter Period Sales
t TCe = (Y/S) t(Y/S) t 2
1 1 1 58.386 58.386 12 2 55.294 110.588 43 3 60.241 180.723 94 4 62.002 248.007 16
2 1 5 69.002 345.011 252 6 68.235 409.412 363 7 69.509 486.562 494 8 70.859 566.873 64
3 1 9 69.002 621.019 812 10 72.941 729.412 1003 11 74.143 815.570 1214 12 75.288 903.454 144
4 1 13 74.310 966.030 1692 14 76.471 1070.588 1963 15 78.777 1181.650 2254 16 79.717 1275.465 256
136 1114.176 9968.750 1496ExplainExplain
Classical DecompositionClassical DecompositionIllustration: Illustration: Step 4Step 4
• (a) Develop trend (a) Develop trend sales sales
TTtt = 57.180 + 1.465t = 57.180 + 1.465t
Ex (Yr 1, Qtr 1):Ex (Yr 1, Qtr 1):
TT11 = 57.180 + = 57.180 + 1.465(1) = 58.6451.465(1) = 58.645
Table 6: Trend SalesOriginal Deseasonalized Trend
Year Quarter Period Sales Sales Salest Y TCe = (Y/S) T
1 1 1 55 58.386 58.6452 2 47 55.294 60.1103 3 65 60.241 61.5754 4 70 62.002 63.040
2 1 5 65 69.002 64.5052 6 58 68.235 65.9703 7 75 69.509 67.4354 8 80 70.859 68.900
3 1 9 65 69.002 70.3652 10 62 72.941 71.8303 11 80 74.143 73.2954 12 85 75.288 74.760
4 1 13 70 74.310 76.2252 14 65 76.471 77.6903 15 85 78.777 79.1554 16 90 79.717 80.620
5 1 17 82.0852 18 83.5503 19 85.0154 20 86.480ExplainExplain
Classical DecompositionClassical DecompositionIllustration: Illustration: Step 4Step 4
• (b) Forecast sales for (b) Forecast sales for each of the four each of the four quarters of the quarters of the coming yearcoming year
Ex (Yr 5, Qtr 1):Ex (Yr 5, Qtr 1):
0.942 x 82.085 0.942 x 82.085
= 77.324= 77.324
ExplainExplain
Table 7: Forecasted SalesSeasonal Trend Forecasted
Year Quarter Period Index Sales Salest S T TS
1 1 1 0.942 58.6452 2 0.850 60.1103 3 1.079 61.5754 4 1.129 63.040
2 1 5 0.942 64.5052 6 0.850 65.9703 7 1.079 67.4354 8 1.129 68.900
3 1 9 0.942 70.3652 10 0.850 71.8303 11 1.079 73.2954 12 1.129 74.760
4 1 13 0.942 76.2252 14 0.850 77.6903 15 1.079 79.1554 16 1.129 80.620
5 1 17 0.942 82.085 77.3242 18 0.850 83.550 71.0183 19 1.079 85.015 91.7314 20 1.129 86.480 97.636
Graph 1: Comparison of Original, Deseasonalized, and Forecasted Sales
40.000
45.000
50.000
55.000
60.000
65.000
70.000
75.000
80.000
85.000
90.000
0 2 4 6 8 10 12 14 16 18 20
Quarter
Sal
es (
$)
Classical DecompositionClassical DecompositionIllustration: Graphical LookIllustration: Graphical Look
Graph 1: Comparison of Trend, Original, and Deseasonalized Sales
40
50
60
70
80
90
100
0 2 4 6 8 10 12 14 16 18
Quarter
Sal
es (
$)
(Y/S) = TCeDeseasonalized
YOriginal
TTrend
Classical Decomposition:Classical Decomposition:ExerciseExercise
• Assume you have been asked by Assume you have been asked by your boss to deseasonalize and your boss to deseasonalize and forecast for the next four forecast for the next four quarters of the coming year (Yr quarters of the coming year (Yr 5) this data pertaining to your 5) this data pertaining to your company’s salescompany’s sales
• Use the steps and examples Use the steps and examples shown in the explanation and shown in the explanation and illustration as a reference illustration as a reference
Basic StepsBasic StepsExplanationExplanationIllustrationIllustrationTemplatesTemplates
Table 8: Your Company's Sales DataOriginal Forecasted
Year Quarter Period Sales Salest Y TS
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 - ?
SummarySummary
• Time series modelsTime series models are sequences of are sequences of data that follow non-arbitrary ordersdata that follow non-arbitrary orders
• Classical decompositionClassical decomposition isolates the isolates the components of a time series modelcomponents of a time series model
• Benefits:Benefits:Insight to fluctuations in trendInsight to fluctuations in trendDecomposes the underlying factors Decomposes the underlying factors
affecting the time seriesaffecting the time series
Bibliography &Bibliography &Readings ListReadings 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:Appendix A:Exercise TemplatesExercise Templates
Table 9: Four-Quarter Moving AverageSimple Centered Percent Moving Moving Moving
Year Quarter Period Sales Average Average Averaget Y TC Se=Y/(TC)
1 1 1 52 2 2.33 3 8.34 4 10
2 1 5 8.32 6 63 7 11.74 8 13.3
3 1 9 8.32 10 7.33 11 13.34 12 15
4 1 13 102 14 8.33 15 154 16 16.7
Appendix A:Appendix A:Exercise TemplatesExercise Templates
Table 10: Seasonal Index ComputationUnadjusted AdjustedSeasonal Adjusting Seasonal
Quarter Average Index Factor Index1 = x =2 = x =3 = x =4 = x =
Appendix A:Appendix A:Exercise TemplatesExercise Templates
Table 11: Deseasonalizing Sales Adjusted
Original Seasonal DeseasonalizedYear Quarter Period Sales Index Sales
t Y S TCe1 1 1 5
2 2 2.33 3 8.34 4 10
2 1 5 8.32 6 63 7 11.74 8 13.3
3 1 9 8.32 10 7.33 11 13.34 12 15
4 1 13 102 14 8.33 15 154 16 16.7
Appendix A:Appendix A:Exercise TemplatesExercise Templates
Table 12: Trend SalesOriginal Deseasonalized Trend
Year Quarter Period Sales Sales Salest Y TCe = (Y/S) T
1 1 1 52 2 2.33 3 8.34 4 10
2 1 5 8.32 6 63 7 11.74 8 13.3
3 1 9 8.32 10 7.33 11 13.34 12 15
4 1 13 102 14 8.33 15 154 16 16.7
5 1 172 183 194 20
Appendix A:Appendix A:Exercise TemplatesExercise Templates
Table 13: Forecasted SalesSeasonal Trend Forecasted
Year Quarter Period Index Sales Salest S T TS
1 1 12 23 34 4
2 1 52 63 74 8
3 1 92 103 114 12
4 1 132 143 154 16
5 1 172 183 194 20
Graph 1: Comparison of Original, Deseasonalized, and Forecasted Sales
40.000
45.000
50.000
55.000
60.000
65.000
70.000
75.000
80.000
0 2 4 6 8 10 12 14 16 18 20
Quarter
Sal
es (
$)