0% found this document useful (0 votes)
129 views9 pages

BSC Honours in Statistics: HSTS 203: Time Series Analysis University of Zimbabwe

The document is about time series analysis and summarizing time series data. It discusses the components of a time series, including trend, cyclical variation, seasonal variation, and irregular variation. It also describes methods for decomposing a time series into these components and analyzing trends, including using a moving average method to smooth out fluctuations and isolate the trend. The moving average method is demonstrated through an example of calculating 3-point and 4-point moving averages on quarterly income data from a company over four years.
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
0% found this document useful (0 votes)
129 views9 pages

BSC Honours in Statistics: HSTS 203: Time Series Analysis University of Zimbabwe

The document is about time series analysis and summarizing time series data. It discusses the components of a time series, including trend, cyclical variation, seasonal variation, and irregular variation. It also describes methods for decomposing a time series into these components and analyzing trends, including using a moving average method to smooth out fluctuations and isolate the trend. The moving average method is demonstrated through an example of calculating 3-point and 4-point moving averages on quarterly income data from a company over four years.
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/ 9

BSC HONOURS IN STATISTICS

HSTS 203 : Time Series Analysis


University Of Zimbabwe

L Dhliwayo
Department of Statistics
University of Zimbabwe
Contents
1 Review of Elementary Time Series 1
1.1 What this Unit is all About . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Introduction to Time Series . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Time Series Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.4 Components of a Time Series . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5 Decomposition of a Time Series . . . . . . . . . . . . . . . . . . . . . . . 3
1.6 Trend Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.6.1 Methods of Trend Isolation . . . . . . . . . . . . . . . . . . . . . 3
1.6.2 Methods of Moving Average . . . . . . . . . . . . . . . . . . . . . 3
1.7 Trend Line Using Regression Analysis . . . . . . . . . . . . . . . . . . . 7

i
Unit 1
Review of Elementary Time
Series

1.1 What this Unit is all About

1.2 Introduction to Time Series

Time Series is defind as any variable measured over time in sequential order.

The objective of time series is to analyse how observed data changes over time, inorder
to detect recurring patterns that enable us to forecast the future behaviour of the data.

The assumption underlying time series is that those factors that have influenced pat-
terns of economic or environmental activity in the past and present will to do so in
more or less the same manner in the future. Thus time series analysis helps us to cope
with uncertainty about the future.

Time series analysis attempts to isolate and quantify the influence of different envi-
ronmental/economic factors operating on the time series into a number of different
components. This is achieved by a process called decompositionof the time series.

Once identified and quantified, those components are used to estimate future values of
the time series.

1.3 Time Series Plot

Before we can venture to understand and analyse a time series we need to appreciate
how it looks like over time. There may be patterns in the time series that we can
visually see and thus, we are guided in our analysis.

A time series plot gives us a visual impression of the time series. This is usually a plot
of the response or variable of interest (Z) against time (t), denoted Zt

1
2 Review of Elementary Time Series

1.4 Components of a Time Series


Time series analysis assumes that four underlying forces, individually or collectively
determines the random variable’s value in a time series in any time period. They are:

Trend (T),

Cyclical Variation (C),

Seasonal Variation (S) and

Irregular or Random Variation (I) or (R).

Trend (T)

This is the general increase or decrease in the time series over an extended period of
time caused by long-term trends, for example, population growth.

in other words, it is the long-term smooth underlying movement in a time series. it


describes the effect that long-term factors hae on the series.

Cyclical Variarion (C)

The cyclical component of a time series describes alternating periods of relative expan-
sion and contraction of more than one year duration. These periods are known as cycles.

Cyclical variations occur because of upward and downward swings in the general cy-
cle of prosperity, recession, depression and recovery. This wavelike patterns, with the
periods of expansion and contraction not of equal length, describes a long term trend
that is generally apparent over a number of years.

Note: This component is not predictable.

Seasonal Variation (S)

Seasonal variation occurs over short repetitive calender periods and have a duration of
less than a year and represent predictive deviation from the trend, for example, anual
agricultural crop yield.

Irregular (Random) Variation (I)

Random variations occur over short intervals and are unpredictable, with no patterns
to their behaviour. They tend to link the existence of the other more predictable
components. Examples of what causes these movements are unexpected changes in the
weather, political unrest, theft and war.
Review of Elementary Time Series 3

1.5 Decomposition of a Time Series


The main aim of time series analysis is to isolate the influence of each of the four
components on the actual time series.

Multiplication Model

Z =T ×C ×S×I

where

Z=actual value of a time series


T=trend component [measured in the actual units]
C=cyclical index [expressed relative to the trend]
S=seasonal index [expressed relative to C and T]
I=Irregular component

We can use statistical analysis to isolate the trend and the seasonal components.

Additive Model

Z =T +C +S+I

1.6 Trend Analysis


We can identify the trend in a time series by averaging out the short term fluctuations
in the series. this will result in either a smooth curve or a straight line.

1.6.1 Methods of Trend Isolation

1. The moving average method which produces a smooth curve.


2. Regression analysis which involves fitting a straight line.

1.6.2 Methods of Moving Average

The moving average method smoothies out peaks and valleys in a set of observations.
The objective is to bring out the trend by eliminating any obscuring seasonal, cyclical
or random fluctuations. One of its drawbacks is that value for some years are lost at
the beginning and end of the series.

The method is explained by way of an example.


The quarterly income (in $million) of a soft drink company has been recorded for 4years
The data is listed in chronologically time period.
4 Review of Elementary Time Series

2012 2013 2014 2015


Quarter 1[Jan-Mar] 52 57 60 66
Quarter 2[Apr-Jun] 67 75 77 84
Quarter 3[Jul-Sept] 85 90 94 98
Quarter 4[Oct-Dec] 54 61 63 67

1. Calculate a 3 point moving average.

2. Calculate a 4 point moving average.

Steps in calculating a 3-point moving average

Step 1. Sum the 1st three values and record the total against the middle value of the 3
in the 3-point moving average total column.

2012Q1 + 2012Q2 + 2012Q3 = 52 + 67 + 85 = 204

Step 2. Average this total value and record in the 3-point moving average column

204
= 68
3
Step 3. Move one point down and sum the next 3 values and record the total against the
middle value of the 3 in the 3-point moving average total column.

2012Q2 + 2012Q3 + 2012Q4 = 67 + 85 + 54 = 206

Step 4. Average this total value and record in the 3-point moving average column

206
= 68.7
3
Step 5. Continue calculating 3-point averages by moving down 1 point at a time.

Note: There will be no values against the 1st and the last quarters in the series,
because the values are entered against the middle value of 3-point.
Calculating a 4-point moving average.

Steps in calculating the 4-point moving average.

The principle is the same for that of the 3-point moving average.

Step 1. Sum the 1st four values and record the total half-way between 2nd and 3rd values
of the 4 in the 4-point moving average total column.

2012Q1 + 2012Q2 + 2012Q3 + 2012Q4 = 52 + 67 + 85 + 54 = 258


Review of Elementary Time Series 5

Step 2. Average this total value and record in the 4-point moving average column
258
= 64.5
4
Step 3. Move one point down and sum the next 4 values and record the total between
the 2nd and 3rd value of this 2nd group of the 4 in the 4-point moving average
total column.

2012Q2 + 2012Q3 + 2012Q4 + 2013Q1 = 67 + 85 + 54 + 57 = 263

Step 4. Average this total value and record in the 4-point moving average column
263
= 65.75
4
Step 5. Continue calculating 4-point averages by moving down 1 point at a time.

Step 6. We now find ourselves with values in the 4-point moving average column which
don’t line up with the x-values. Inorder to rectify this, the values need to be
centred. This is achieved by averaging 2 values at a time in a moving sequence.
64.50 + 65.75
= 65.125
2

65.75 + 67.75
= 66.75
2

As you can see from the final centred column, the values have been smoothed signifi-
cantly from the original fluctuating values.
Note: A moving average removes the effect of short term fluctuations (i.e, seasonal
and irregular fluctuations) from the original observations. Thus, moving average values
can be seen to be mainly reflecting the trend and cyclical movements.
Using Mathematical symbols for ultiplicative model we have:
T ×C ×S×I
Moving Average = =T ×C
S×I

Actual Z
SeasonalRatios = × 100 (1.1)
corresponding MA
Averaging the seasonal ratios [Median]

Adjusted seasonal indices


The sum of the k-median seasonal indices must be equal 100 × k

k × 100
Adjusted factor = P (1.2)
(Median Seasonal Indices)
6 Review of Elementary Time Series

Each median seasonal indicex is finally multiplied by the adjustment factor

Adjusted seasonal index = Median Seasonal Indices × adjustment factor (1.3)

Adjustment seasonal indices are a measure of the seasonal influence on the actual values
of the time series for each given time period.

Actual Z
Deseasonalize Z = (1.4)
Seasonal Index

Steps to calculate seasonal indices

Step 1. Calculate 4-point centred moving average as per example.


Step 2. Establish the percentage extent to which the actual value deviates from the 4-
point centred average and enter each value on the % column.
Actual Z
SeasonalRatios = × 100 (1.5)
corresponding MA
Step 3. Transcribe all percentage values into a summary table.

Year Quarter 1 Quarter 2 Quarter 3 Quarter 4


2012
2013
2014
2015
Median
Adjusted Factor
Seasonal Index

Step 4. Calculate the median for each quarter. The median is calculated be removing the
highest and lowest values and averaging the remaining values. If only one value
remains after eliminating the highest and lowest values, then that remaining value
becomes the modified mean. If there are only 2 values to start with, then the two
values are averaged to give the mean.
Step 5. Total the modified mean percentages for all quarters. These should add up to
400% (there are 4 quarters). If they don’t add up to 400%, use an adjustment
factor to increase or decrease each value to achieve a total of 400% to finale the
seasonal indices. The adjustment factor is calculated as:

k × 100
Adjustment factor = P (1.6)
(Total of Median Seasonal Indices)
Step 6. Adjust each modified mean value by the adjustment factor to achieve the seasonal
index for that quarter

Adjusted seasonal index = Median Seasonal Indices × adjustment factor (1.7)


Review of Elementary Time Series 7

Adjustment seasonal indices are a measure of the seasonal influence on the actual values
of the time series for each given time period.

Actual Z
Deseasonalize Z = (1.8)
Seasonal Index

1.7 Trend Line Using Regression Analysis


A trend line isolates the trend (T) component only. It shows the general direction in
which the series is moving.

Method of Least Squares

Let

Z=dependent variable - actual time series

t= independent variable - time

To use the time as an independent variable in regression it is sometimes necessary to


code it:

The sequential numbering method.

The zero sum method.

The linear trend function (or regression line) is given by:

Zt = β0 + β1 t + ε (1.9)

Least square estimates are given by:


Pn 1 Pn Pn
t=1 tZt − n t=1 t Zt
β̂1 = Pn 2 1 Pn t=1 2
(1.10)
t=1 t − n ( t=1 t)
" n n
#
1 X X
β̂0 = Zt − β̂1 t (1.11)
n
t=1 t=1

You might also like