100% found this document useful (5 votes)
3K views31 pages

Lecture Notes On Time Series Analysis by Dr. Ajijola

This document provides an overview of time series analysis. It defines time series as statistical data arranged chronologically over time. The key components of time series are identified as secular trend, seasonal variations, cyclical variations, and random variations. Two common models for decomposing time series are described: the additive model which sums the components, and the multiplicative model which multiplies the components. Several methods for measuring secular trend are outlined, including the graphic method of drawing a freehand curve, the method of semi-averages, and moving average methods.

Uploaded by

faith ola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
3K views31 pages

Lecture Notes On Time Series Analysis by Dr. Ajijola

This document provides an overview of time series analysis. It defines time series as statistical data arranged chronologically over time. The key components of time series are identified as secular trend, seasonal variations, cyclical variations, and random variations. Two common models for decomposing time series are described: the additive model which sums the components, and the multiplicative model which multiplies the components. Several methods for measuring secular trend are outlined, including the graphic method of drawing a freehand curve, the method of semi-averages, and moving average methods.

Uploaded by

faith ola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Lecture Notes on Time

Series Analysis
Lecturer: Dr. Ajijola, Lukman Abolaji
Learning Outcomes
This Study Note includes
• Definition
• Components of Time Series
• Models of Time Series Analysis
• Measurement of Secular Trend
• Method of Semi Averages
• Moving Average Method
• Method of Least Squares
• Exponential Smoothing
DEFINITION OF TIME SERIES
• Time series is statistical data that are arranged and presented in a chronological order
i.e., over a period of time.
• According to Spiegel, “A time series is a set of observations taken at specified times,
usually at equal intervals.”
• According to Ya-Lun-Chou, “A time series may be defined as a collection of reading
belonging to different time period of same economic variable or composite of
variables.”
• COMPONENTS OF TIME SERIES
• There are various forces that affect the values of a phenomenon in a time series;
these may be broadly divided into the following four categories, commonly known
as the components of a time series.
1) Long term movement or Secular Trend
2) Seasonal variations
3) Cyclical variations
4) Random or irregular variations
• Secular Trend or Simple trend: The general tendency of a data to increase or
decrease or stagnate over a long period of time is called secular trend or simple
trend. Most of the time series relating to Economic, Business and Commerce
might show an upward tendency in case of population, production & sales of
products, incomes, prices; or downward tendency might be noticed in time
series relating to share prices, death, birth rate etc. due to global melt down, or
improvement in medical facilities etc. All these indicate trend.
• Seasonal variations: Over a span of one year, seasonal variation takes place
due to the rhythmic forces which operate in a regular and periodic manner.
These forces have the same or almost similar pattern year after year. Seasonal
variations could be seen and calculated if the data are recorded quarterly,
monthly, weekly, daily or hourly basis. So if in a time series data only annual
figures are given, there will be no seasonal variations. The seasonal variations
may be due to various seasons or weather conditions for example sale of cold
drink would go up in summers & go down in winters. These variations may be
also due to man-made conventions & due to habits, customs or traditions. For
example sales might go up during Ileya festivals & Christmas or sales of
restaurants & eateries might go down during Ramadan fasting.
• Cyclical variations: These variations in a time series are due to ups & downs
recurring after a period from time to time. Though they are more or less regular,
they may not be uniformly periodic. These are oscillatory movements which are
present in any business activity and is termed as business cycle. It has got four
phases consisting of prosperity (boom), recession, depression and recovery. All
these phases together may last from 7 to 9 years may be less or more.
• Random or irregular variations: These fluctuations are a result of unforeseen
and unpredictably forces which operate in absolutely random or erratic manner.
They do not have any definite pattern and it cannot be predicted in advance.
These variations are due to floods, wars, famines, earthquakes, strikes, lockouts,
epidemics etc.
MODELS OF TIME SERIES ANALYSIS
• The following are the two models which are generally used for decomposition
of time series into its four components. The objective is to estimate and separate
the four types of variations and to bring out the relative impact of each on the
overall behaviour of the time series.
1. Additive model
2. Multiplicative model
• Additive Model - In additive model it is assumed that the four components are
independent of one another i.e. the pattern of occurrence and magnitude of
movements in any particular component does not affect and are not affected by
the other component. Under this assumption the four components are
arithmetically additive ie. magnitude of time series is the sum of the separate
influences of its four components i.e.
𝒀𝒕 = 𝑻 + 𝑪 + 𝑺 + 𝑰
Where
𝑌𝑡 = Time series
𝑇 = Trend variation
𝐶 = Cyclical variation
𝑆 = Seasonal variation
𝐼 = Random or irregular variation
• Multiplicative Model - In this model it is assumed that the forces that give rise
to four types of variations are interdependent, so that overall pattern of
variations in the time series is a combined result of the interaction of all the
forces operating on the time series. Accordingly, time series are the product of
its four components i.e.
𝒀𝒕 = 𝑻 × 𝑪 × 𝑺 × 𝑰
• As regards to the choice between the two models, it is generally the
multiplication model which is used more frequently. As the forces responsible
for one type of variation are also responsible for other type of variations, hence
it is multiplication model which is more suited in most business & economic
time series data for the purpose of decomposition.
MEASUREMENT OF SECULAR TREND
• The following are the methods most commonly used for studying & measuring
the trend component in a time series—
1. Graphic or a Freehand Curve method
2. Method of Semi Averages’
3. Method of Moving Averages
4. Method of Least Squares
• Graphic or Freehand Curve Method: The data of a given time series is plotted
on a graph and all the points are joined together with a straight line. This curve
would be irregular as it includes short run oscillation. These irregularities are
smoothened out by drawing a free hand curve or line along with the curve
previously drawn. This curve would eliminate the short run oscillations & would
show the long period general tendency of the data. While drawing this curve it
should be kept in mind that the curve should be smooth and the number of points
above the trend curve should be more or less equal to the number of points below
it.
Merits
▪ It is very simple and easy to construct.
▪ It does not require any mathematical calculations and hence even a layman
can understand it.
Disadvantages
▪ This is a subjective concept. Hence different persons may draw free hand
lines at different positions and with different slopes.
▪ If the length of period for which the curve is drawn is very small, it might
give totally erroneous results.

• METHOD OF SEMI AVERAGES: Under this method the whole time series
data is classified into two equal parts and the averages for each half are
calculated. If the data is for even number of years, it is easily divided into two.
If the data is for odd number of years, then the middle year of the time series is
left and the two halves are constituted with the period on each side of the
middle year. The arithmetic mean for a half is taken to be representative of the
value corresponding to the mid point of the time interval of that half. Thus we
get two points. These two points are plotted on a graph and then are joined by
straight line which is our required trend line.
MOVING AVERAGE METHOD
• A moving average is an average (Arithmetic mean) of fixed number of items
(known as periods) which moves through a series by dropping the first item of
the previously averaged group and adding the next item in each successive
average. The value so computed is considered the trend value for the unit of
time falling at the center of the period used in the calculation of the average.
• Example 1
• The wages of certain factory workers are given as below. Using 3 yearly
moving average indicate the trend in wages.
Year 2004 2005 2006 2007 2008 2009 2010 2011 2012
Wages 1200 1500 1400 1750 1800 1700 1600 1500 1750
• Solution:
Table : Calculation of Trend Values by method of 3 yearly Moving Average
Year Wages 3 yearly moving 3 yearly moving
totals average i.e. trend
2004 1200 — —
2005 1500 4100 1366.67
2006 1400 4650 1550
2007 1750 4950 1650
2008 1800 5250 1750
2009 1700 5100 1700
2010 1600 4800 1600
2011 1500 4850 1616.67
2012 1750 — —
Example 2 : Calculate 4 yearly moving average of the following data
Year 2005 2006 2007 2008 2009 2010 2011 2012
Wages 1150 1250 1320 1400 1300 1320 1500 1700
• Solution-First Method
Table : Calculation of 4 year Centered Moving Average
Year Wages 4 yearly 2 year moving total 4 yearly moving average
(1) (2) moving total of col. 3 (centered) centered (5) [col. 4/8]
(3) (4)
2005 1150 – – –
2006 1250 – – –
5,120
2007 1320 10,390 1298.75
5,270
2008 1400 10,610 1326.25
5,340
2009 1300 10,860 1,357.50
5,520
2010 1320 11,340 1,417.50
5,820
2011 1500
2012 1700
• Solution-Second Method
Table : Calculation of 4 year Centered Moving Average
Year Wages 4 yearly moving 4 yearly moving 2 year moving 4 year centered moving
total (3) average (4) total of col. 4 average (col. 5/2)
(centered) (5)
2005 1150 – – – –
2006 1250 – – – –
5,120 1,280 – –
2007 1,320 2597.75 1298.75
5,270 1317.5 – –
2008 1,400 2,652.5 1,326.25
5,340 1,335 – –
2009 1,300 2,715 1,357.50
5,520 1,380
2010 1,320 2,835 1,417.50
5,820 1,455 – –
2011 1,500
2012 1,700
• Example 3 : Calculate five yearly moving averages for the following data
Year 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012
Value 123 140 110 98 104 133 95 105 150 135

• Solution: Table : Computation of Five Yearly Moving Averages


Year Value (‘000 `) 5 yearly moving 5 yearly moving
totals (‘000 `) average (‘000 `)
2003 123 — —
2004 140 — —
2005 110 575 115
2006 98 585 117
2007 104 540 108
2008 133 535 107
2009 95 587 117.4
2010 105 618 123.6
2011 150 — —
2012 135 — —
METHOD OF LEAST SQUARES
• The method of least squares as studied in regression analysis can be used to
find the trend line of best fit to a time series data.
• The regression trend line (𝑌) is defined by the following equation—
𝑌 = 𝑎 + 𝑏𝑋
where 𝑌 = predicted value of the dependent variable
𝑎 = 𝑌 axis intercept or the height of the line above origin
(i.e. when 𝑋 = 0, 𝑌 = 𝑎)
𝑏 = 𝑠𝑙𝑜𝑝𝑒 of the regression line (it gives the rate of change in 𝑌 for a
given change in 𝑋) (when 𝑏 is positive the slope is upwards, when 𝑏 is
negative, the slope is downwards)
𝑋 = independent variable (which is time in this case)
• To estimate the constants 𝑎 and 𝑏, the following two equations have to be
solved simultaneously—
෍ 𝑌 = 𝑛𝑎 + 𝑏 ෍ 𝑋

෍ 𝑋𝑌 = 𝑎 ෍ 𝑋 + 𝑏 ෍ 𝑋 2

• Recalled that from our lecture on Regression Analysis that


𝑛 σ 𝑋𝑌 − σ 𝑋 σ 𝑌
𝑏=
𝑛 σ 𝑋2 − σ 𝑋 2
And
σ𝑌 − 𝑏σ𝑋
𝑎=
𝑛
• To simplify the calculations, if the mid point of the time series is taken as origin,
then the negative values in the first half of the series balance out the positive
values in the second half so that σ 𝑥 = 0. In this case the above two normal
equations will be as follows—
෍ 𝑌 = 𝑛𝑎 + 𝑏 ෍ 0

෍ 𝑌 = 𝑛𝑎

෍ 𝑋𝑌 = 𝑎 ෍ 0 + 𝑏 ෍ 𝑋 2

෍ 𝑋𝑌 = 𝑏 ෍ 𝑋 2
• In such a case the values of 𝑎 and 𝑏 can be calculated as under the following—
• Since σ 𝑌 = 𝑛𝑎, then
σ𝑌
𝑎 =
𝑛
• Also since σ 𝑋𝑌 = 𝑏 σ 𝑋 2 , then
σ 𝑋𝑌
𝑏 =
σ 𝑋2
• Example 4: Fit a straight line trend to the following data by Least Square
Method and estimate the sale for the year 2012 :
Year 2005 2006 2007 2008 2009 2010
Sale 70 80 96 100 95 114
(in’000s)
• Solution : Table : Calculation of trend line
Year Sales 𝑌 Deviations 𝑿𝟐 𝑋𝑌
(𝑋)
2005 70 -5 25 -350
2006 80 -3 9 -240
2007 96 -1 1 -96
2008 100 +1 1 100
2009 95 +3 9 285
2010 114 +5 25 570

෍ 𝑌 = 555 ෍ 𝑋 2 = 70 ෍ 𝑋𝑌 = 269

•𝑁=6
• Equation of the straight line trend is 𝑌𝑐 = 𝑎 + 𝑏𝑋
σ 𝑌 555
𝑎 = = = 92.5
𝑛 6

σ 𝑋𝑌 269
𝑏 = 2
= = 3.483
σ𝑋 70
∴ 𝑇𝑟𝑒𝑛𝑑 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑌𝑐 = 92.5 + 3.843𝑋
For 2012, 𝑋 = 9
𝑌2012 = 92.5 + 3.843 × 9 = 92.5 + 34.587 = 126.59 (𝑖𝑛 ‘000 )

• Example 5: Fit a straight line trend to the following data and estimate the likely
profit for the year 2012. Also calculate the trend values.
Year 2003 2004 2005 2006 2007 2008 2009
Profit (in ‘000 60 72 75 65 80 85 95
naira)
• Solution : Table : Calculation of Trend and Trend Values
Year Profit 𝑌 Deviation 𝑋2 𝑋𝑌
from 2006
𝑋
2003 60 -3 9 -180
2004 70 -2 4 -144
2005 75 -1 1 -75
2006 65 0 0 0
2007 80 1 1 80
2008 85 2 4 170
2009 95 3 9 285

෍ 𝑌 = 532 ෍ 𝑋 2 = 28 ෍ 𝑋𝑌 = 136

•𝑁 = 7
• Equation of the straight line trend is 𝑌0 = 𝑎 + 𝑏𝑋
σ 𝑌 532
෍ 𝑥 = 0; 𝑎 = = = 76
𝑛 7

σ 𝑋𝑌 136
𝑏 = 2
= = 4.85
σ𝑋 28
∴ 𝑇𝑟𝑒𝑛𝑑 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑌𝑐 = 76 + 4.85𝑋
For 2012, 𝑋 = 6 (𝑖. 𝑒. 2010 = 4; 2011 = 5; 2012 = 6)
𝑌2012 = 76 + 4.85 × 6 = 76 + 29.10 = 105. 10(𝑖𝑛 ‘000 𝑁𝑎𝑖𝑟𝑎 )
• Solution : Table : Calculation of Trend and Trend Values
Year Profit 𝑌 Deviation 𝑋2 𝑋𝑌 Trend Values (𝑌𝑐 = 𝑎 +
from 2006 𝑏𝑋)

𝑋 [𝑌𝑐 = 76 + 4.85𝑋]
2003 60 -3 9 -180 76 + 4.85 (−3) = 61.45
2004 70 -2 4 -144 76 + 4.85 (−2) = 66.30
2005 75 -1 1 -75 76 + 4.85 (−1) = 70.15
2006 65 0 0 0 76 + 4.85 (0) = 76
2007 80 1 1 80 76 + 4.85(1) = 80.85
2008 85 2 4 170 76 + 4.85 (2) = 85.70
2009 95 3 9 285 76 + 4.85 (3) = 90.55

෍ 𝑌 = 532 ෍ 𝑋 2 = 28 ෍ 𝑋𝑌 = 136
EXPONENTINAL SMOOTHING
• In exponential smoothing, the smoothed value at time 𝑡, 𝑆𝑡 , is weighted average
of the observed value at 𝑡, 𝑦𝑡 , and all other past (historical) values in the series:
𝑦𝑡−1 , 𝑦𝑡−2 , … , 𝑎𝑛𝑑 𝑦1 . In general the smoothed value for time period 𝑡 is
𝑆𝑡 = 𝛼𝑦𝑡 + 1 − 𝛼 𝑆𝑡−1
Where 𝛼 is the smoothing constant.
Example 6: Calculate the exponential smoothing with smoothing constant 𝛼 =
0.2 and 𝛼 = 0.5 for the data in examples below.
Year 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012
𝑦𝑡 175 161 158 136 159 145 132 142 151 139
• Solution
• For 𝛼 = 0.2; Recalled that
𝑆𝑡 = 𝛼𝑦𝑡 + 1 − 𝛼 𝑆𝑡−1
⟹ 𝑆1 = 175
𝑆2 = 0.2 161 + 1 − 0.2 175 = 172.2
𝑆3 = 0.2 158 + 1 − 0.2 172.2 = 169.36
𝑆4 = 0.2 136 + 1 − 0.2 169.36 = 162.69 𝑎𝑛𝑑 𝑠𝑜 𝑜𝑛.
• For 𝛼 = 0.5; Recalled that
𝑆𝑡 = 𝛼𝑦𝑡 + 1 − 𝛼 𝑆𝑡−1
⟹ 𝑆1 = 175
𝑆2 = 0.5 161 + 1 − 0.5 175 = 168
𝑆3 = 0.5 158 + 1 − 0.5 168 = 165.10
𝑆4 = 0.5 136 + 1 − 0.5 165.10 = 152.68 𝑎𝑛𝑑 𝑠𝑜 𝑜𝑛.
Therefore complete exponential smoothing will be
Year 𝒚𝒕 𝑺𝒕 𝜶 = 𝟎. 𝟐 𝑺𝒕 𝜶 = 𝟎. 𝟓
2003 175 175 175
2004 161 172.20 168.00
2005 158 169.36 165.10
2006 136 162.69 152.68
2007 159 161.95 160.84
2008 145 158.56 153.48
2009 132 153.25 145.28
2010 142 151.00 147.62
2011 151 151.00 151.00
2012 139 148.60 145.00
EXERCISES
1. What are the different components of a time series? Describe briefly each of
these components ?
2. Briefly describe various components of time series. Give the additive &
multiplicative models of time series.
3. What is ‘secular trend ? What is the use of studying it ? List two methods of
measuring trend.
4. Fit a straight line trend to the following data by Least Squares method and
estimate exports for the year 2012.
Year 2003 2004 2005 2006 2007 2008 2009
Exports (in tons) 47 50 53 65 62 64 72
5. Fit the Straight Line Trend by method of least squares and estimate the sales
for 2012.
Year 2006 2007 2008 2009 2010 2011
Sales 12 13 14 15 22 26

6. Fit a least-square trend line to the total annual revenue (in million Naira) of
Copper Corporation for the year 2005 to 2013 and estimate the revenue for 2019.
Year 2005 2006 2007 2008 2009 2010 2011 2012 2013
Revenue 789 542 769 1093 1175 1067 1166 1426 1692
7. Calculate the exponential smoothing with smoothing constant 𝛼 = 0.3 for the
data in the table below below.
Year 2000 2001 2002 2003 2004 2005 2006 2007 2008
Sales 889 642 869 993 1075 967 866 826 992

You might also like