You are on page 1of 20

Chapter 3

Time Series
Decomposition
Based on Material and Data from Forecasting
Methods and Applications by Makridakis et al, 3 rd
Edition, Wiley

Dr. Sunil D. Lakdawala

1
Contents
Principles of decomposition
Additive Decomposition an example using STL Method
Classical Decomposition Examples
Additive Decomposition

Multiplicative

Classical Decomposition Variations


Other Methods of Decomposition
Forecasting and Decomposition

2
Principles of Decomposition
Data = Pattern + Error
= f(seasonality, trend, error)
Normally, first remove trend-cycle then isolate seasonal
component. Any residue left is supposed to be random
Yt = f(St, Tt, Et)
Additive: Yt = St + Tt + Et
Multiplicative: Yt = St * Tt * Et
St : Seasonal
Tt : Trend / Cycle

3
Principles of Decomposition
(Cont)
Additive: appropriate if magnitude of seasonal
fluctuations does not vary with level of series
Multiplicative: appropriate if magnitude increases or
decreases with level of series
Multiplicative Decomposition can be converted in
Additive Decomposition by taking log
Pseudo-additive Decomposition: Partly additive, partly
multiplicative

4
Additive Decomposition Example
Fig 3.1
STL Method
Additive Decomposition
Show See Fig 3.1 Sales of new one-family house, USA
along with GIF image
Additive composition is shown in corresponding GIF file
(using STL Method)
Seasonal pattern at beginning and at end is similar, and
hence additive composition is appropriate
Trend Cycle Component
Simple MA / Centered MA / Double moving Average / (See Table
3.1 Sales of Shampoo)
Weighted MA
Local / Global Regression Smoothening
Exponential Smoothening

6
Moving Average
Simple MA / Centered MA / Double moving Average
(See Table 3.1 Sales of Shampoo)
What will you do for early and late data?
Weighted MA (Spencer 15, 21 MA, Henderson 5,9,13,23
MA, Weight Function)
Other Weighted MA (See Eq 3.11, Eq 3.12)

Tt = ajYt+j (summation of j from m to m; m needs to


be decided)
Q(j,m) = (1 (j/m)2)2 for m < j < m
= 0 otherwise
aj = Q(j,m) / Q(i,m) (summation of I from m to m)

7
Moving Average (Cont)
Local / Global Regression Smoothening
Local / Global Regression Smoothening (See Eq 3.15)

Take weights as mentioned in Eq 3.12, for example


Show GIF file
Tt = a + b*t
No problem with end of series data
Using Local Regression, forecast sales for Jan 94 to

Dec 94
Exponential Smoothening

8
Local Linear Regression
Classical Additive
Decomposition
Show See Fig 3.1 Sales of new one-family house, USA
Since seasonal variations do not increase, we use
additive decomposition
Tt = 2X12 MA (centered Moving Average)
De-trended Data =Yt - Tt
Calculate Seasonal Index
Irregular Component =De-trended Data Seasonal
Index

10
Original Data Fig 3.1

House sales in '000


100

90

80

70

House sales in '000


60
Linear (House sales in '000)

50

40

30

20
73 73 74 75 76 77 78 78 79 80 81 82 83 83 84 85 86 87 88 88 89 90 91 92 93 93 94 95
an- ov- ep- ul- ay- ar- an- ov- ep- ul- ay- ar- an- ov- ep- ul- ay- ar- an- ov- ep- ul- ay- ar- an- ov- ep- ul-
J N S J M M J N S J M M J N S J M M J N S J M M J N S J

11
Trend using 2x12 MA Fig
3.1
Trend
2x12 MA
80.00

70.00

60.00

Trend
50.00 2x12 MA

40.00

30.00

20.00
3 3 4 5 6 6 7 8 9 9 0 1 2 2 3 4 5 5 6 7 8 8 9 0 1 1 2 3 4 4 5
n-7 t-7 l-7 r-7 n-7 t-7 l-7 r-7 n-7 t-7 l-8 r-8 n-8 t-8 l-8 r-8 n-8 t-8 l-8 r-8 n-8 t-8 l-8 r-9 n-9 t-9 l-9 r-9 n-9 t-9 l-9
c u p c u p c u p c u p c u p c u p c u p c u
J a O J A J a O J A Ja O J A Ja O J A Ja O J A Ja O J A J a O J A Ja O J

12
Yt Tt Fig 3.1

Detrended
Data
30.00

25.00

20.00

15.00
Detrended
10.00 Data

5.00

0.00
3 3 4 5 6 6 7 8 9 9 0 1 2 2 3 4 5 5 6 7 8 8 9 0 1 1 2 3 4 4 5
n-7 t-7 l-7 r-7 n-7 t-7 l-7 r-7 n-7 t-7 l-8 r-8 n-8 t-8 l-8 r-8 n-8 t-8 l-8 r-8 n-8 t-8 l-8 r-9 n-9 t-9 l-9 r-9 n-9 t-9 l-9
-5.00 c u p c u p c u p c u p c u p c u p c u p c u
J a O J A Ja O J A J a O J A J a O J A Ja O J A J a O J A J a O J A Ja O J

-10.00

-15.00

-20.00

13
Seasonal Index Fig 3.1

Seasonal
Index
15.00

10.00

5.00
Seasonal
Index

0.00
73 73 74 75 76 76 77 78 79 79 80 81 82 82 83 84 85 85 86 87 88 88 89 90 91 91 92 93 94 94 95
an- ct- ul- pr- an- ct- ul- pr- an- ct- ul- pr- an- ct- ul- pr- an- ct- ul- pr- an- ct- ul- pr- an- ct- ul- pr- an- ct- ul-
J O J A J O J A J O J A J O J A J O J A J O J A J O J A J O J
-5.00

-10.00

-15.00

14
Yt Tt St Fig 3.1

Irregular Component
20.00

15.00

10.00

5.00

Irregular Component
0.00
73 73 74 75 76 77 78 78 79 80 81 82 83 83 84 85 86 87 88 88 89 90 91 92 93 93 94 95
an- ov- ep- ul- ay- ar- an- ov- ep- ul- ay- ar- an- ov- ep- ul- ay- ar- an- ov- ep- ul- ay- ar- an- ov- ep- ul-
J N S
-5.00 J M M J N S J M M J N S J M M J N S J M M J N S J

-10.00

-15.00

-20.00

-25.00

15
Classical Multiplicative
Decomposition - Example
Show Table 3-5 Monthly Airline Passenger Traffic
Since seasonal variations increase, we use
multiplicative decomposition
Tt = 2X12 MA (centered Moving Average)
De-trended Data =Yt / Tt
Calculate Seasonal Index
Irregular Component =De-trended Data / Seasonal Index

16
Variations - Classical
Decomposition
For seasonal index, simple average is replaced by
medial average (i.e. remove maximum and minimum)
For seasonal index, simple average is replaced by

median value
First two method reduces effect of extreme values
For seasonal index, take moving average of de-trended

data for that season (i.e. take all January data)


Above method reduces effect of changing seasonal value

17
Other Methods of Decomposition

Census II : used by U.S Bureau of the census


X-11
X-11-Arima
X-12-Arima
STL

18
Forecasting and Decomposition
Individual components are projected in future and
recombined to form a forecast
Decomposition is hardly used for forecasting
Trend Cycle is most difficult component to forecast.

(Typically simple function like straight line is used for


projection)
Seasonal component is easy to forecast, unless

magnitude changes with every season


Irregular component is assumed to be 0 (for additive)

or 1 (for multiplicative), but that is not correct as it is


correlated with the last irregular component
Problem about last data

19
Forecasting and Decomposition
(Cont)
Some other methods are used in conjunction for
forecasting (namely Holts method for de-seasonalized
data)
Time series is used as a tool for understanding time
series data

20

You might also like