Professional Documents
Culture Documents
Objectives.
1) Understand the purpose of classical decomposition and be aware of the four main
components of time series;
2) Be able to decompose series into the trend, seasonal and irregular components using both
the multiplicative and additive models;
3) Be able to interpret the results of a decomposition.
Classical decomposition is probably best used as a means to explore and identify the key
characteristics of time series as a prelude to forecasting, rather than as a forecasting technique
itself. The basic idea is that observations in a time series result from a combination of three or
four factors:
1. The trend (T) -this is the long term underlying movement in the time series
2. The cycle (C) -this reflects the swings in economies from booms to slumps
-Because of the difficulty of distinguishing between the trend and the cyclical component
they are often treated as a single component -the trend-cycle. For simplicity, this combined
component will be referred to as T.
3. The seasonal component (S) -this reflects the effects of factors like temperature, rainfall,
length of day, holidays etc .
4. The irregular or error component (E) -this represents movements in the time series that
cannot be explained by the other components
Example series
The quarterly sales of a product for the years 2017 to 2020 are shown on the graph overleaf.
2
160
140
Sales (units)
120
100
80
60
40
20
0
4
2
2
4
Q
Q
1
1
1
Q
Q
18
19
17
20
20
20
Moving averages can be used to "average out" the seasonal effects and smooth out random
variation in a time series in order to isolate the trend. In order to remove the seasonal pattern
we normally use a 4-period moving average when the data is quarterly and 12-period moving
average when the data is monthly.
The table on the next page shows the calculation of 4 quarterly moving averages for the
example series. Note that each average is displayed in the middle of the 4 periods that it is
3
representing. Later on, when we want to calculate seasonal variation, this will cause us a
problem because we will want to find out the extent to which each sales figure is above or
below the trend. Because the sales and trend figures are not adjacent these comparisons
cannot be made. To overcome this problem we next work out a centred average by taking the
means of adjacent pairs of moving averages. These are also described below.
Note that, if Y1 = the first sales observation in our series (i.e. sales for Q1 of 2017) and Y2
the second observation, and so on then
This means that all four quarters in the year are equally weighted in our first centred average,
but the weight for quarter 1 is split between the 2017 observation and the 2018 observation.
In the additive model the actual observations (Y) are assumed to be the sum of the
components: Y = T + S + E.
This can be used to represent a seasonal pattern like that in diagram (a) below
The multiplicative model is: Y = T x S x E. A time series pattern that can be represented by
the multiplicative model is shown in diagram (b)
4
For the additive model we calculate an Individual seasonal deviation for each observation as
follows:
Note that we cannot calculate this for first and last two observations because we do not have
centred averages adjacent to these values. The Individual seasonal deviation simply tells us
the extent to which a sales observation falls above or below the trend.
2 88
66
3 100 67 33 106.5 42.25
68
4 20 70 -50 17.5 6.25
72
2018 1 64 76 -12 67 9
80
2 104 82 22 104 0
84
3 132 87 45 126.5 30.25
90
4 36 92 -56 39.5 12.25
94
2019 1 88 95 -7 86 4
96
2 120 99 21 121 1
102
3 140
4 60 MSE
Adjusted
seasonal
deviations
2017 2018 2019 Mean
Q1 -12 -7 -9.5 -9
Q2 22 21 21.5 22
Q3 33 45 39 39.5
Q4 -50 -56 -53 -52.5
Sum -2
Adjustment = +2/4 = +0.5
5
Usually we are not interested in individual seasonal deviations. Normally, we want to know
what the typical seasonal deviation is for a given time of year. For example, typically are
quarter 3’s sales above or below the trend and by how much? Also, the individual seasonal
deviations for a given quarter will vary because they still contain an element of randomness.
To remove this and hence find the typical seasonal deviations we find the average of the
individual seasonal deviations for each quarter as we worked out in the above table (bottom
table – column entitled ‘Mean’)
The deviations of a set of observations from their mean should sum to zero. This means that,
in theory, our four averages of individual seasonal deviations should sum to 0. In practice this
seldom happens so it is usual to adjust them. In our case the deviations sum to -2 to we need
to add 0.5 (i.e 2/4.) to each deviation to make the sum 0. This should yield the following
adjusted average seasonal deviations:
Q1 Q2 Q3 Q4
-9 22 39.5 -52.5
This shows that the peak time of year for sales is quarter 3 (July-September) when on average
sales are 39.5 units above the trend. Quarter 4 (October –December) is the slackest time of
year for sales. On average sales at this time of year are 52.5 units below the trend.
Deseasonalised observation
= original observation - appropriate average seasonal deviation
i.e. the deseasonalised observation consists of the effects of trend (and cycle) and the
irregular factors.
Since Y = T + S + E
we can determine the estimated values of the signal (i.e. the observations with the noise
removed) for each time period using:
Estimated signal = Centred average + Average Seasonal deviation for that time of year
Clearly, these values can only be calculated for observations that are associated with a
centred average.
We can then compare these signal values to the actual values and hence calculate the errors
and then the mean squared error (MSE). This will tell us how closely the additive model fits
the time series. For our data the additive model has an MSE of 13.13.
7
An index greater than 1 means that sales are above the trend; if it’s below 1 then sales are
below the trend. The indices for our example series are shown below.
8
2 88
66
3 100 67 1.49 101.84 3.39
68
4 20 70 0,29 23.8 14.44
72
2018 1 64 76 0.84 67.64 13.25
80
2 104 82 1.27 102. 2.25
84 5
3 132 87 1.52 132.24 0.06
90
4 36 92 0.39 31.28 22.28
94
2019 1 88 95 0.93 84.55 11.90
96
2 120 99 1.21 123.75 14.06
102
3 140
4 60 MSE
Adjusted
seasonal
2017 2018 2019 Mean index
Q1 0.84 0.93 0.89 0.89
Q2 1.27 1.21 1.24 1.25
Q3 1.49 1.52 1.57 1.52
Q4 0.29 0.39 0.34 0.34
Sum 3.97
As before, we average out these individual seasonal indices in the above table to remove the
random component. In theory the results should have an average value of 1 so, if we have
four quarters, they should sum to 4 (for monthly data we would expect a sum of 12). This
seldom happens in practice so we adjust them by multiplying each of them by:
4
Sum of average indices
Q1 Q2 Q3 Q4
0.89 1.25 1.52 0.34
This again shows that quarter 3 is the busiest time of year for sales. On average, at this time
of year they are 52% above the trend. In contrast, in quarter 4 they are only 34% of the trend
(i.e.66% below it).
Deseasonalised observation
= original observation/appropriate average seasonal index
i.e. the deseasonalised observation again consists of the effects of trend (and cycle) and the
irregular factors.
ii) multiply the trend forecast by the appropriate average seasonal index
- thus our crude forecast = 114 x 1.25 = 142.25 units.
10
Since Y = T x S x E
we can determine the estimated values of the signal for each time period using
Estimating signal = Centred average x Average Seasonal Index for that time of year
Clearly, these values can only be calculated for observations that are associated with a
centred average.
We can then compare these signal values to the actual values and hence calculate the mean
squared error (MSE). This will tell us how closely the multiplicative model fits the time
series.
For our data the multiplicative model has an MSE of 10.20. This is smaller than the 13.13
that we obtained for the additive model which suggests that the seasonal pattern is
multiplicative.