Time Series

advertisement
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
Subtopics
 Components of Time Series
 Time Series Models
– Additive Models
– Multiplicative Models
 Measuring of Trend - Moving Averages Method
 Measuring of Seasonal Variations
 Time Series
 Time series is a set of data that is recorded over a specific time period.

Examples:
a) Monthly sales over the last two years.
b) Output at a factory each day for the previous month.
c) Total costs per annum for the last 10 years.

A time series analysis provides information about
– how the past events had been progressed
– how events might progress in the future
 Historigram
 A graph of a time series
– X-axis represents time
– Y-axis represents the values of the data recorded
 Components of Time Series
A time series usually consists of four components:
Page 1 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
(I) Trend (or Secular Trend), T
 The trend of a time series is the underlying long-term movement or tendency of the data
(> 1 year).
 Its fluctuation is due to factors which change slowly over a long stretch of time.
 The trend does not always show a linear pattern.
 Three types of trend
i. Downward trend
ii. Upward trend
iii. Constant trend / No clear movement
Overall there appears to be an increase in the number of sales although the sales figures are
fluctuating quarter by quarter.
This overall increase indicates an upward trend.
(II) Seasonal Variations, S
 Seasonal variation is the term used to describe patterns of change in a time series that recur
over short period of time (< 1 year).
 These cycles are caused by certain factors that appear at certain times.
 Examples:
a) The increase in sales during festive occasions like Hari Raya, Chinese New Year or
Deepavali.
b) The increase in number of tourists coming to Malaysia during the period of the
Formulae One racing.
c) Sales of baseball and softball equipment from 2003 to 2005 by quarter.
Page 2 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
(III) Cyclical Variations, C
 The cyclical variations are long-term cyclic movement of the data.
 These cycles may or may not follow a similar pattern over equal interval of time
(> 1 year).
 The long-term cyclic movement is due to the effect or influence of business or economic
conditions which are irregular in length and amplitude (the boom, recession, depression
and recovery cycle of the economy of a country).
 Example:
a) The price of shares of a firm.
b) Batteries sold by National Battery Retailers from 1984 to 2004.
(IV) Irregular or Random Variations, I
 Irregular or random variations are unusual behaviour of data due to unforeseen
phenomena.
 Bad weather, illness, strikes, earthquakes, and floods are examples of random factors that
may occur at any time of the day.
 Example: The number of earthquakes occurring in a country.
 Since they are unpredicted, we assume that in the long run they will tend to cancel each
other out, and that in our analysis, we may initially ignore their impact.
Page 3 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
Example 6.1
Comment on the trend and seasonal components based on the Historigram as shown.
(a)
Number of order ('000s)
Historigram: Number of order for product A
140
130
120
110
100
90
80
1
2
3
4
1
2
1990
3
4
1
2
1991
3
4
Year
3
4
Year
1992
Product A shows upward trend and seasonal component.
(b)
Historigram: Number of order for product B
Number of order ('000s)
30
25
20
15
10
5
0
1
2
3
4
1
2
1990
3
4
1
2
1991
1992
Product B shows upward trend and no seasonal component.
(c)
Number of order ('000s)
Historigram: Number of order for product C
2.5
2.4
2.3
2.2
2.1
2
1.9
1.8
1.7
1.6
1.5
1
2
3
1990
4
1
2
3
1991
4
1
2
3
4
Year
1992
Product C shows approximate constant trend and seasonal component.
Page 4 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
 Standard Time Series Models
 The main idea of constructing time series models is to study how various factors
contribute to the ultimate formation of individual values of the time series.
 There are two time series models:
(A) the additive model,
(B) the multiplicative model.
(A) Time Series: Additive Model

The additive model assumes that the value of time series Y at a particular time point is the
algebraic sum of the trend (T), cyclic variation (C), seasonal variation (S) and irregular
variation (I).
Y=T+S+C+I


Units of T, S, C and I are the same as those of the observed value of Y.
The additive model assume that the various components of a time series are independent
of one another.
Since there will not be sufficient data to identify the cyclical component (C) and the
irregular variation (I) is unpredictable, we assume that its overall value or average value is
0.
The model is reduced to:
Y=T+S
The additive model will be most appropriate where the variations about the trend are of
similar magnitude in the same period of each section.
150
140
130
120
110
Monday
Tuesday
Wednesday
Thursday
Evening
Afternoon
Morning
Evening
Afternoon
Morning
Evening
Afternoon
Morning
Evening
Afternoon
Morning
Evening
100
Afternoon

Morning

Friday
Page 5 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
(B) Time Series: Multiplicative Model
 The multiplicative model assumes that the value of time series Y is the product of the trend
(T), the cyclic variation (C), the seasonal variation (S) and the irregular variation (I).
Y=T×S×C×I



T has the same unit as the observed values of Y, whereas the values of S, C and I are pure
ratios or percentages.
The multiplicative model implies that the 4 components of a time series are not
independent of one another.
The cyclical element cannot be identified due to lack of data and the unpredictable irregular
variation is assumed to have an average ratio of 1 for working purpose.
The model is reduced to

Y=T×S
The multiplicative model will be most appropriate for situations where the variations about
the trend are of the same proportionate size (or percentage) of the trend in the same period
of each section.
300
250
200
150
100
50
0
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16 17 18 19 20
Example 6.2
The following data shows the units of production of consumer goods for a manufacturing company
over a period of four years.
2014
2015
2016
2017
Units of production (’000)
Quarter 1 Quarter 2 Quarter 3 Quarter 4
35
48
57
84
40
62
75
100
55
85
94
120
62
97
110
125
Draw a time series to display the distribution of the data and comment on it.
Page 6 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
Solution
Quarterly Productions (000’s)
Historigram: Units of production of consumer goods
130
120
110
100
90
80
70
60
50
40
30
1
2
3
2014
1
4
1
2
3
2015
2
4
1
2
3
2016
3
4
1
2
3
4
Year
2017
4
The units of production of consumer goods for a manufacturing company shows upward trend
and seasonal component.
 Measuring the Components
 The analysis of a set of time series data consists of breaking down the data into the
components (decomposition) and trying to find an estimate for each of them.
(1) Identifying the Trend
(2) Identifying the Seasonal Factor
(3) Forecasting Using Trend and Seasonal Factor
(1) Identifying the Trend
 Trend can be isolated from time series by various methods.
 One of the most common method used to calculate trend values is moving averages
method.
– It is appropriate for curvilinear trend.
 Moving Averages Method
 Involves the calculation of a set of averages.
 The trend values may be obtained from either
(A) the moving averages – odd number of data values in a cycle.
(B) the centered moving averages – even number of data values in a cycle.
Page 7 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
(A) The Method of Moving Averages
 The moving averages method uses the average of the most recent n data values in the time
series
 (most recent n data values)
Moving average 
n
 The term ‘moving’ is used because every time a new observation becomes available for
the time series.
– It replaces the oldest observation and a new average is computed.
– As a result, the average will change or move, as new observations become available.
Example 6.3
There are three values for each year: High demand, Moderate demand and Low demand.
Year
2012
2013
2014
Values
Moderate demand
300
600
540
High demand
400
700
550
Low demand
200
200
290
Using moving averages method, calculate the trend values.
Solution
Year
Values
2012
High demand
Moderate demand
Low demand
High demand
Moderate demand
Low demand
High demand
Moderate demand
Low demand
2013
2014
Sales,
Y
400
300
200
700
600
200
550
540
290
Moving total of 3 items
--------------400 + 300 + 200 = 900
300 + 200 + 700 = 1200
200 + 700 + 600 = 1500
700 + 600 + 200 = 1500
600 + 200 + 550 = 1350
200 + 550 + 540 = 1290
550 + 540 + 290 = 1380
---------------
Moving average
(Trend, T)
--------------900 ÷ 3 = 300
1200 ÷ 3 = 400
1500 ÷ 3 = 500
1500 ÷ 3 = 500
1350 ÷ 3 = 450
1290 ÷ 3 = 430
1380 ÷ 3 = 460
---------------
Example 6.4 Odd number of data values
The daily sales of canned food in a retail shop over the past three weeks are given as follows:
Week 1
Week 2
Week 3
Mon
140
155
175
Tue
150
170
190
Daily sales (RM)
Wed
Thu
100
150
105
200
130
225
Fri
220
300
325
(a) Draw a time series.
(b) Using moving averages method, calculate the trend values.
(c) Draw the trend line on the time series.
Page 8 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
Solution
(a) & (c)
Historigram and trend line:
Daily sales of canned food in a retail shop over the past three weeks
350
Sales (RM)
300
250
200
150
100
1
2
Fri
Thu
Wed
Tue
Mon
Fri
Thu
Wed
Tue
Mon
Fri
Thu
Wed
Tue
Mon
50
Week
3
(b)
Week 1
Week 2
Week 3
Day
Sales, Y
5-day moving total
5-day moving average (Trend, T)
Mon
140
Tue
150
Wed
100
760
760 ÷ 5 = 152
Thu
150
775
775 ÷ 5 = 155
Fri
220
Mon
155
Tue
170
Wed
105
Thu
200
Fri
300
Mon
175
Tue
190
Wed
130
Thu
225
Fri
325
Page 9 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
(B) Centered moving averages: Even number of data values
 Since the number of data values is even:
– No exact median time point for each moving average.
– The mean of two moving averages (centered moving average) is computed.
Example 6.5 Even number of data values
Consider the daily sales of a retail store as follows:
Mon
30
32
35
Week 1
Week 2
Week 3
Daily sales (units)
Wed
Thu
46
52
48
55
50
60
Tue
36
44
48
Fri
74
78
82
Sat
105
112
114
(a) Draw a time series.
(b) Using moving averages method, calculate the trend values.
(c) Draw the trend line on the time series.
Solution
(a) & (c)
Historigram and trend line: Daily sales of a retail store over the
past three weeks
120
110
90
80
70
60
50
40
1
2
Sat
Fri
Thu
Wed
Tue
Mon
Sat
Fri
Thur
Wed
Tue
Mon
Sat
Fri
Thu
Wed
Tue
30
Mon
Sales (units)
100
Week
3
Page 10 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
(b)
Week 1
Day
Sales (units),
Y
Mon
30
Tue
36
Wed
46
Thu
6-day moving
total
6-day moving
average
343
57.1667
52
57.333
345
Fri
58.167
353
Week 2
Week 3
57.5000
74
Sat
105
Mon
32
Tue
44
Wed
48
Thu
55
Fri
78
Sat
112
Mon
35
Tue
48
Wed
50
Thu
60
Fri
82
Sat
114
Centered
Moving average
(Trend, T)
58.8333
Page 11 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
 Advantages of moving averages method
 It is most widely used.
 It helps to smooth out time series.
 It shows the trend as it is, either linear or nonlinear – it is representative of the data.
 Disadvantages of moving averages method
 There are no trend values at the beginning and end time points.
 When the number of items is even, further centered moving average has to be obtained so
that an appropriate time point is located.
(2) Identifying the Seasonal Factor
 The computation of trend values is the same for both additive model and multiplicative
model of time series.
 However, the technique for calculating seasonal variations differs.
 Procedure for calculating seasonal variations using the additive model
1. Obtain the trend values, T using moving averages method.
2. For each time point, find the seasonal variation using additive model (also called seasonal
deviation), S where S = Y – T.
3. Find the average seasonal deviation for each season.
4. If the sum of the average seasonal deviation is not zero, adjustment has to be made.
 Average seasonal deviation
Adjustment 
Number of seasons
5. Adjusted average seasonal deviation for each season
= Average seasonal deviation – Adjustment
Example 6.6
An export company recorded the following data concerning the export of vegetable for the various
quarters of the year in the past three years:
Quarter
1
2
3
4
Quarterly Export (RM’000)
2014
2015
2016
55
60
75
35
40
50
25
35
40
55
62.5
65
Obtain the trend values using moving averages method and thus calculate the seasonal factors
using the additive model.
Solution
Step 1: Calculate the trend values (T) using moving averages method as in the table below.
Step 2: Calculate the seasonal deviations (S) for each time point as in the table below.
S = Y – T is the difference between the original data (Y) and the trend value (T).
Page 12 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
Year
Quarter
2014
1
Quarterly
export
(RM’000), Y
55
2
35
3
25
4
55
1
60
2
40
3
35
4
62.5
1
75
2
50
3
40
4
65
2015
2016
4-quarter
moving
total
4-quarter
moving
average
Centered
moving
average, T
Step 3: Calculate the average seasonal deviation for each quarter.
Seasonal deviation (RM’000)
Q1
Q2
Q3
2014
2015
2016
Total
Average
Adjustment
Adjusted average (Sˆ )
= Average – adjustment
S=Y–T
Q4
Note:
The sum of the average seasonal deviations is not zero and it is found to be 0.62 unit in excess.
That is  Average seasonal deviation = 0.62 .
Hence adjustment has to be made so that the sum of the average deviation is zero.
0.62
Adjustment 
 0.155
4
Adjusted average seasonal deviation, Ŝ = Average seasonal deviation – 0.155
Page 13 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
 Interpretation of the seasonal factors obtained using the additive model

Using the additive model, seasonal factors (or seasonal variations) are deviations from the
trend. They may be above the trend (positive) or below the trend (negative).

A positive seasonal factor indicates a tendency to raise the underlying trend. Thus, the
seasonal factor in quarter 1 tends to inflate by 16.095 (RM’000).

A negative seasonal factor tends to lower the underlying trend. Hence, the seasonal factor
in quarter 2 shows a deflation of 7.975 (RM’000) from the trend.
 Calculate seasonal variations in percentages using the multiplicative model
1. Obtain the trend values, T using moving averages method.
2. For each time point, calculate the seasonal variation in percentage using multiplicative
Y
model (also called the seasonal index), S where: S  100
T
3. Find the average seasonal variation for each season. If the sum of the average seasonal
variation is not 100n where n is the number of seasons, adjustment has to be made.
4. Each season should have the value of 100 (%) if seasonal variations in percentages are
computed. For example, if there are 4 seasons, we expect the total seasonal variations to
be 400. Hence, if the sum of the average seasonal variation is not 100 n where n is the
number of seasons, adjustment has to be made.
Adjustment 
100  n
 Average seasonal variation
5. The adjusted seasonal variation for each season
= Average seasonal variation × Adjustment
 Calculate seasonal variations in ratios using the multiplicative model




The seasonal variations, S can be calculated in ratios using the multiplicative model.
Y
S
T
Number of seasons
Adjustment =
 Average seasonal variation
Adjusted average seasonal variation = Average seasonal variation × Adjustment
Example 6.7
Using the data in Example 6.5, we obtain the seasonal indices (seasonal variations in percentages
based on the multiplicative model) of time series.
Solution
Page 14 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
Day
Week 1
Week 2
Week 3
Mon
Tue
Wed
Thu
Fri
Sat
Mon
Tue
Wed
Thu
Fri
Sat
Mon
Tue
Wed
Thu
Fri
Sat
Sales (units),
Y
30
36
46
52
74
105
32
44
48
55
78
112
35
48
50
60
82
114
Centered Moving average
(Trend, T)
S
Y
100
T
57.333
58.167
59.000
59.417
60.000
60.917
61.750
62.333
62.833
63.417
64.167
64.667
Calculate the seasonal index as follows:
Week
1
2
3
Mon
Seasonal variation (%)
Tue
Wed
Thu
Fri
Sat
Total
Average
Adjustment
Adjusted average (Sˆ )
= Average × adjustment
Note:
Since there are 6 seasons, we expect the sum of the average seasonal variations to be 600.
It is found that  Average seasonal variation = 600.84.
Hence adjustment has to be made so that the sum of the average seasonal variation is 600.
Adjustment 
600
 0.9986
600.84
Adjusted average seasonal deviation, Ŝ = Average × adjustment
Page 15 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
 Interpretation of the seasonal factors obtained using multiplicative model
 Seasonal variations expressed in terms of percentages are also called seasonal indices.
(a) Seasonal index greater than 100, the trend is inflated.
Example: the seasonal index is 120, the trend is inflated by 20% (120 – 100).
(b) Seasonal index less than 100, the trend is deflated.
Example: the seasonal index is 79, the trend is deflated by 21% (100 – 79).
(3) Forecasting using the additive model
 Additive Model:
1. Find the average rate of change in trend.
Average rate of change in trend = (Last trend value – First trend value) ÷ (n – 1)
where n is the total number of trend values.
2. Find the projected trend.
Tˆ = Last trend value + (average rate of change in trend) × d
where d is the number of time points deviated from the last trend value.
3. Find the (adjusted) average seasonal factor, Ŝ .
4. Calculate the forecasted value, Yˆ :
Yˆ  Tˆ  Sˆ
Example 6.8
Using the data in Example 6.6, project the trend. Hence forecast the export for the first 2 quarters
of 2017 based on the additive model.
Solution
Calculate the projected trend:
Average rate of change in trend =
Tˆ 
Forecasting:
Year
Quarter
Ŝ
d
Tˆ
Forecast export (RM’000),
Yˆ  Tˆ  Sˆ
Page 16 of 17
FHMM1324
Topic 6 Time Series
Trimester: January 2020
Mathematics for Business II
-------------------------------------------------------------------------------------------------------------------------------
(3) Forecasting using the multiplicative model
 Multiplicative Model:
1. Find the average rate of change in trend.
Average rate of change in trend = (Last trend value – First trend value) ÷ (n – 1)
where n is the total number of trend values.
2. Find the projected trend.
Tˆ = Last trend value + (average rate of change in trend) × d
where d is the number of time points deviated from the last trend value.
3. Find the (adjusted) average seasonal factor, Ŝ .
4. Calculate the forecasted value, Yˆ :
Yˆ  Tˆ  Sˆ
if S is in ratio
Tˆ  Sˆ
Yˆ 
100
if S is in percentage
Example 6.9
Using the data in Example 6.7, project the trend. Hence forecast the sales for Monday and Tuesday
of week 4 based on the multiplicative model.
Solution
Calculate the projected trend:
Average rate of change in trend =
Tˆ 
Forecasting:
Week
Day
Ŝ
d
Tˆ
Forecast sales (units),
Tˆ  Sˆ
Yˆ 
100
= = = End of Topic 6 = = =
Page 17 of 17
Download