Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

3/5/2020

• UNIVERSITY OF GHANA
• DEPARTMENT OF ECONOMICS

• ECON 316
Applied Statistics for Economists

• Time Series Analysis 2


• Lecturer: Prof. Daniel K. Twerefou,
• Contact Information: dktwerefou@ug.edu.gh

Slide 1

Session Outline
The key topics to be covered in the session are as
follows:
• Fitting the Trend Line
-Method of Least Squares
• Explanation of seasonal variation
• Calculation of seasonal indices
• Deseasonalization of time series data

Slide 2

1
3/5/2020

Method of Least Squares


• Aim: fit a trend line such that the sum of the
deviations of the actual observations from the trend
value is the least.
• If observations appear to follow a linear trend, then
according to the method of least squares the trend
equation is
Where a is the intercept and b is the slope or gradient
and

Slide 3

Example 4
• The table below shows the unemployment data of
graduates from 2004-2009 in a certain country.
Year (X) Unemployment (Y)
2004 1005
2005 1120
2006 980
2007 1030
2008 1040
2009 1000

i. Determine the least squares trend equation


ii. Estimate unemployment for 2015. Slide 4

2
3/5/2020

Solution to Example 4
• Table
X Y XY X2
1 1005 1005 1
2 1010 2020 4
3 975 2925 9
4 950 3800 16
5 955 4775 25
6 940 5640 36
21 5835 20165 91
Slide 5

Solution to Example 4 Cont’d


n=6

Slide 6

3
3/5/2020

Solution to Example 4 Cont’d


• Thus, the least squares equation is
• Estimating unemployment for 2015, the code will
be 12

Slide 7

Activity 2
1. The following data shows the number of road accidents from 1998
to 2008.
199
Year 8 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008

No. of
accidents 220 224 235 242 255 258 285 291 292 297 300

i. Obtain the trend equation using the method of least squares


ii. Estimate the number of road accidents in 2016

Slide 8

4
3/5/2020

What is Seasonal Variation?


• Seasonal variation refers to the systematic intra-year
movements of a time series which repeats itself year
after year.
• - Takes the same pattern each year and repeat
themselves year after year.
• Example 1: Rise and fall in agricultural output caused
by the weather,
• Example 2: Increase in sales during Christmas, etc
• Importance: Ability of a manager to predict demand
cycles can help him plan his finances, human
Slide 9
resources and other needs etc.

Practical example of data with Seasonal


Variation
• Consider table below on agriculture output of a
certain farmer.
• Output fluctuates in different quaters
• With this the farmer can plan the number of
employees, tractors that he/she will need at any time
etc. Year I II III IV
2003 70 300 90 150
2004 80 350 100 165
2005 85 380 110 170
Slide 10

5
3/5/2020

Deseasonalization of Time Series


• Deseasonalization: The process of adjusting time
series data to eliminate fluctuations due to
seasonal variations so that trend and cycle can be
studied.
• After deseasonalization, the resulting figures are
then said to be seasonally adjusted.
• Deseasonalising first involve the calculation the
seasonal index.

Slide 11

Calculating Seasonal indices using the


multiplicative model
• We decompose series value using the multiplicative
model:
• Four main steps are used in calculating the seasonal
index
1. Estimate T and C components using moving averages
2. Obtain the s S×I components by dividing the actual
value by the T and C component i.e.
3. Average the S×I term for each remove the I
component.
4. Normalize the estimated S component
Slide 12

6
3/5/2020

Example 1
The table below shows labour turnover on quarterly
bases for three years. Calculate the seasonal index
under the multiplicative model using the method of
moving averages.
Interpret the Seasonal Index for the first and fourth
quarters Year/Quarter 1 2 3 4
1985 68 62 61 63
1986 65 58 66 61
1987 68 63 63 67
Slide 13

Solution to Example 1
• Consider table on next slide
• Step 1: estimate the trend using the method of
moving averages.
• We have 4 quarters in a year and therefore we use 4-
quarterly moving average (4QMA) and center it
(Column 4 and 5)
Step 2: Obtain the s S×I components by dividing the
actual value by the T and C component i.e. (column 6)
• For example, the value 0.966 was obtained by dividing
61 by 63.125.

Slide 14

7
3/5/2020

Solution to Example 1 Cont’d


Year Quarter Y 4QMA Centered Yi
4MA (T)  S  I
T  C
1985 I 68
II 62
63.5
III 61 63.125 0.96635
62.75
IV 63 62.25 1.01205
61.75
1986 I 65 62.375 1.04208
63
II 58 62.75 0.92430
62.5
III 66 63 1.04762
63.5
IV 61 64 0.95313
64.5
1987 I 68 64.125 1.06043
63.75
II 63 64.5 0.97674
65.25
III 63
IV 67
Slide 15

Solution to Example 1 Cont’d


• Step 3: Average the S and I term for each quarter.
• Consider table on next slide. We have rearranged the
S and I term by years and quarters.
• The averages have been provided as the fifth row of
the table below.

Slide 16

8
3/5/2020

Solution to Example 1 Cont’d


Year I II III IV Total
1985 0.966 1.012
1986 1.042 0.924 1.048 0.953
1987 1.060 0.977
Seasonal average 1.051 0.951 1.007 0.983 3.991

Adjusted Seasonal 1.054 0.953 1.009 0.985 4.000


index

The 4th step-normalizing the estimated seasonal component


is necessary where the sum of the averages of the seasonal
indices is not equal to the number of seasons.
Slide 17

Solution to Example 1 Cont’d


Step 4: normalizing S.
• 1. Find the sum of the seasonal average - 3.9914 and later
the Seasonal index correction factor (SICF)

• 2. Multiplied SICF by the average seasonal indices to


obtain the Adjusted Seasonal Index (ASI).
• The ASI are presented in row 6 .
Slide 18

9
3/5/2020

Solution to Example 1 Cont’d


• The seasonal index for the first quarter – 1.054. This
means a typical 1st quarter turnover is 105.4 percent
of the average quarter
• The seasonal index for the fourth quarter - 0.985 .
This means a typical fourth quarter turnover is
98.50% of those of the average quarter.

Slide 19

Deseasonalising time series values


• The formula for deseasonalisingd time series values
is given as:

• The adjusted seasonal index is season-specific


• Lets deseasonalized the ffigure.

Slide 20

10
3/5/2020

Deseasonalising time series values


cont’d
• Consider the actual values in our recent example for the year
1985. The table below shows the actual values and the ASI.
We can compute the deseasonalized using the formula
(column 4).
• Interpretation: 1st quarter of 1985, the turnover should have
been 64.5 without the seasonal effects. However, it is 68 due
to seasonal influences.
198 Actual Values Adjusted seasonal Deseasonalized
5 Index figures
I 68 1.05353 64.5
II 62 0.95257 65.09
III 61 1.00917
Slide 21
60.45
IV 63 0.98471 63.98

Activity 1
1. The table below shows the number of people who attend morning,
afternoon and evening school for a week.
Monday Tuesday Wednesday Thursday Friday

Morning 122 128 129 123 133


Afternoon 111 112 143 109 103
Evening 116 140 141 125 125

a. Using the method of moving averages and the multiplicative model,


Determine the seasonal indices for morning, afternoon and evening.
b. Deseasonalize the data.

Slide 22

11
3/5/2020

Activity 2
1. The table below shows the sales of a supermarket in Ghana in
billion cedis.
Quarter
Year First Second Third Fourth
2003 18 80 30 522
2004 24 105 54 527
2005 33 141 48 538
2006 40 150 75 545
2007 35 180 55 550
2008 48 205 70 557

i. Calculate the trend using the method of moving averages


ii. Calculate the average seasonal Index under the multiplicative
model
iii. Deseasonalize the data. Slide 23

12

You might also like