Time Series Analysis Notes
Time Series Analysis Notes
Time Series Analysis Notes
TIME SERIES
1.1. Meaning
In time series analysis, current data in a series may be compared with past data in the
same series. We may also compare the development of two or more series over time.
These comparisons may afford important guide lines for the individual firm. In Economics,
statistics and commerce it plays an important role.
For example, if we observe agricultural production, sales, National Income etc., over
a period of time, say over the last 3 or 5 years, the set of observations is called time series.
Thus a time series is a set of time, quantitative readings of some various recorded at equal
intervals of time. The interval may be an hour, a day, a week, a month, or a calendar year.
Hourly temperature reading, daily sales in a shop, weekly sales in a shop, weekly sales in a
market, monthly production in an industry, yearly agricultural production, population growth
in ten years, are examples of time series.
From the comparison of past data with current data, we may seek to establish what
development may be expected in future. The analysis of time series is done mainly for the
purpose of forecasts and for evaluating the past performances. The chronological variations
will be object of our study in time series analysis.
The time gap, between various values must be as far as possible, equal.
2
It must consist of a homogeneous set of values.
Data must be available for a long period.
symbolically if „t‟ stands for time and „yt‟ represents the value at time t then the paired values
(t, yt) represents a time series data.
Year Production
2010-11 400
2011-12 450
2012-13 440
2013-14 420
2014-15 460
2016-17 520
The analysis of time series is of great significance not only to the economists and
business man but also to the scientists, astronomists, geologists, sociologists, biologists,
research worker etc. In the view of following reasons
Secular Trend
Secular Trend is also called long term trend or simply trend. The secular trend refers
to the general tendency of data to grow or decline over a long period of time. For example the
population of India over years shows a definite rising tendency. The death rate in the country
after independence shows a falling tendency because of advancement of literacy and medical
facilities. Here long period of time does not mean as several years. Whether a particular
period can be regarded as long period or not in the study of secular trend depends upon the
nature of data. For example if we are studying the figures of sales of cloth store for 1996-
1997 and we find that in 1997 the sales have gone up, this increase cannot be called as
secular trend because it is too short period of time to conclude that the sales are showing the
increasing tendency.
On the other hand, if we put strong germicide into a bacterial culture, and count the
number of organisms still alive after each 10 seconds for 5 minutes, those 30 observations
showing a general pattern would be called secular movement.
1. Linear Trend
2. Curvi-Linear Trend or Non-Linear Trend.
4
If one plots the trend values for the time series on a graph paper and if it gives a
straight line then it is called a linear trend i.e. in linear trend the rate of change is constant
where as in non-linear trend there is varying rate of change.
Seasonal Variations
Seasonal variations occur in the time series due to the rhythmic forces which occurs in
a regular and a periodic manner with in a period of less than one year. Seasonal variations
occur during a period of one year and have the same pattern year after year. Here the period
of time may be monthly, weekly or hourly. But if the figure is given in yearly terms then
seasonal fluctuations does not exist. There occur seasonal fluctuations in a time series due to
two factors.
The most important factor causing seasonal variations is the climate changes in the
climate and weather conditions such as rain fall, humidity, heat etc. act on different products
and industries differently. For example during winter there is greater demand for woolen
clothes, hot drinks etc. Where as in summer cotton clothes, cold drinks have a greater sale
and in rainy season umbrellas and rain coats have greater demand.
5
Though nature is primarily responsible for seasonal variation in time series, customs,
traditions and habits also have their impact. For example on occasions like dipawali,
dusserah, Christmas etc. there is a big demand for sweets and clothes etc., there is a large
demand for books and stationary in the first few months of the opening of schools and
colleges.
This is a short term variation occurs for a period of more than one year. The rhythmic
movements in a time series with a period of oscillation( repeated again and again in same
manner) more than one year is called a cyclical variation and the period is called a cycle. The
time series related to business and economics show some kind of cyclical variations.
One of the best examples for cyclical variations is „Business Cycle‟. In this cycle
there are four well defined periods or phases.
Boom
Decline
Depression
Improvement
Irregular Variation
It is also called Erratic, Accidental or Random Variations. The three variations trend,
seasonal and cyclical variations are called as regular variations, but almost all the time series
including the regular variation contain another variation called as random variation. This type
of fluctuations occurs in random way or irregular ways which are unforeseen, unpredictable
and due to some irregular circumstances which are beyond the control of human being such
6
as earth quakes, wars, floods, famines, lockouts, etc. These factors affect the time series in
the irregular ways. These irregular variations are not so significant like other fluctuations.
Additive model
Multiplicative model
Additive model
Yt Tt S t Ct Rt
In additive model
S t Seasonal component
Ct Cyclical component
Rt Irregular component
But if the data is in the yearly form then seasonal variation does not exist, so in that situation
Yt Tt Ct Rt
Multiplicative model:
In multiplicative model Yt Tt .St .C t .R t .
The multiplicative model can be put in additive model by taking log both sides.
However most business analysis uses the multiplicative model and finds it more appropriate
to analyze business situations.
8
or estimate values for the future time periods. As the method is subjective the prediction may
not be reliable.
1400
1200
production of cotton
1000
800
Series2
600
400
200
0
1971 1972 1973 1974 1975 1976 1977 1978
year
Figure 1.3. Graphic method for thee production of cotton base on year
Advantages
It is very simplest method for study trend values and easy to draw trend.
Sometimes the trend line drawn by the statistician experienced in computing trend
may be considered better than a trend line fitted by the use of a mathematical
formula.
Although the free hand curves method is not recommended for beginners, it has
considerable merits in the hands of experienced statisticians and widely used in
applied situations.
Disadvantages:
This method is highly subjective and curve varies from person to person who
draws it.
The work must be handled by skilled and experienced people.
Since the method is subjective, the prediction may not be reliable.
While drawing a trend line through this method a careful job has to be done.
9
number of years like 9, 13, 17 etc. two equal parts can be made simply by omitting the
middle year. For example if the data are given for 19 years from 1998 to 2016 the two equal
parts would be from 1998 to 2006 and from 2008 to 2016, the middle year 2007 will be
omitted. After the data have been divided into two parts, an average (arithmetic mean) of
each part is obtained. We thus get two points. Each point is plotted against the mid year of the
each part. Then these two points are joined by a straight line which gives us the trend line.
The line can be extended downwards or upwards to get intermediate values or to predict
future values.
Example:
Year Production Semi averages
2001 40
2002 45 40 45 40 42
41.75
2003 40 4
2004 42
2005 46
2006 52 46 52 56 61
53.75
2007 56 4
2008 61
Thus we get two points 41.75 and 53.75 which shall be plotted corresponding to their
middle years i.e. 2002.5 and 2006.5. By joining these points we shall obtain the required
trend line. This line can be extended and can be used either for prediction or for determining
intermediate values.
Advantages:
Disadvantages:
The method assumes straight line relationship between the plotted points
regardless of the fact whether that relationship exists or not.
10
The main drawback of this method is if we add some more data to the original
data then whole calculation is to be done again for the new data to get the
trend values and the trend line also changes.
As the Arithmetic Mean of each half is calculated, an extreme value in any
half will greatly affect the points and hence trend calculated through these
points may not be precise enough for forecasting the future.
If m is odd then the moving average is placed against the mid value of the time
interval it covers. But if m is even then the moving average lies between the two middle
periods which does not correspond to any time period. So further steps has to be taken to
place the moving average to a particular period of time. For that we take 2-yearly moving
average of the moving averages which correspond to a particular time period. The resultant
moving averages are the trend values.
2008-09 61
11
Ex :2 Calculate 4-yearly moving average for the following data.
Advantages:
Disadvantages:
For a moving average of 2m+1, one does not get trend values for first m and last m
periods.
12
As the trend path does not correspond to any mathematical; function, it cannot be
used for forecasting or predicting values for future periods.
If the trend is not linear, the trend values calculated through moving averages may not
show the true tendency of data.
The choice of the period is sometimes left to the human judgment and hence may
carry the effect of human bias.
1. (Y Y ) 0 i.e.
c the sum of the deviations of the actual values of Y and the
(Y Y )
2
2. c is least, i.e. the sum of the squares of the deviations of the actual values
The line obtained by this method is called as the “line of best fit”.
This method of least squares may be used either to fit a straight line trend or a parabolic
trend.
Where Ytc is used to designate the trend values to distinguish from the actual Yt values, a is
Now the values of a and b to be estimated from the given time series data by the method of
least squares.
In this method we have to find out a and b values such that the sum of the squares of
Yt Ytc
the deviations of the actual values and the computed values is least.
13
i.e. S (Yt Ytc ) should be least
2
S
2 (Yt a bt )(1) 0
a
(Yt a bt ) 0
Yt a b t
Yt na bt
……………….. (3)
S
2 (Yt a bt )(t ) 0
b
t (Yt a bt ) 0
tYt a t b t 2
……………….. (4)
Solving these two equations we get the values of a and b say â and b̂ .
Ytc aˆ bˆt
Note: The method for assessing the appropriateness of the straight line modal is the method
of first differences. If the differences between successive observations of a series are constant
(nearly constant) the straight line should be taken to be an appropriate representation of the
trend component.
14
To find a and b we have two normal equations
Y na b X
XY a X b X 2
15
To find a and b we have two normal equations
Y na b X
XY a X b X 2
16
and so on
Let Yt be the value of the time series at time t. Thus Yt is the independent variable
depending on t.
Now the values of a, b and c to be estimated from the given time series data by the
method of least squares.
In this method we have to find out a, b and c values such that the sum of the squares
of the deviations of the actual values Yt and the computed values Ytc is least.
S
2 (Yt a bt ct 2 )(1) 0
a
17
(Yt a bt ct 2 ) 0
Yt a b t c t 2
S
2 (Yt a bt ct 2 )(t ) 0
b
t (Yt a bt ct 2 ) 0
……………….. (4)
tYt a t b t c t
2 3
S
2 (Yt a bt ct 2 )(t 2 ) 0
c
t 2 (Yt a bt ct 2 ) 0
t 2Yt a t 2 b t 3 c t 4
……………….. (5)
The equations (3), (4) and (5) are called „normal equations‟
Solving these three equations we get the values of a, b and c say aˆ , bˆ and ĉ .
Note: The method for assessing the appropriateness of the second degree equation is
the method of second differences. If the differences are taken of the first differences and the
results are constant (nearly constant) the second degree equation be taken to be an appropriate
representation of the trend component.
18
19
Advantages
Disadvantages
Great care should be exercised in selecting the type of trend curve to be fitted
i.e. linear, parabolic or some other type. Carelessness in this respect may lead
to wrong results.
The method is more tedious and time consuming.
20
Predictions are based on only long term variations i.e trend and the impact of
cyclical, seasonal and irregular variations is ignored.
This method can not be used to fit the growth curves like Gompertz
1
curve Y K a
bX
Y
, logistic curve
X
K ab etc.
Question bank:
1) Define a time series. Discuss its main components.
2) Define secular trend of a time series and explain methods that are used in isolating it.
3) Explain the method of moving average for the determination of trend. What are the
advantages and disadvantages of this method?
4) What are the advantages and disadvantages of the graphic method and least square
method in trend analysis?
5) Explain briefly the method of moving averages for calculating the trend.
6) How does analysis of time series help business forecasting?
7) Distinguish between secular trend, seasonal variations and cyclical fluctuations. Discuss
various methods of measuring each.
8) Explain briefly the additive and multiplicative models of time series. Which of these
models is more popular in practice and why?
9) Explain how you would determine seasonal variation by 12-monthly moving average.
10) What are the various methods for determining trend in a time series?
11) Describe in detail the method of least squares for determining trend.
12) The production data on steel in a factory in the past 10 years are given below:
Year : 1987 1988 1989 1990 1991 1992 1993 1994 1995
1996
Fit a staright line trend and tabulate the trend values. What is the expected production in
the year 1997 on the basis of trend? (Y 113.2 5.08 X ; Y 169.98)
13) Fit a staright line trend of the following data by least square method. Also find an
estimate for the year 1997;
21
Year : 1989 1990 1991 1992 1993 1994 1995 1996
Production : 12 13 13 16 19 23 21 23
(tonnes) (Y 17.5 .893 X ; Y1997 25.54)
14) Fit a staright line trend by the method of least square to the following data. Also find an
estimate for the year 2000;
Production : 38 40 65 72 69 67 95 104
(tonnes) (Y 68.75 4.404 X ; )
15) From the following data, calculate trend by 4 yearly moving average and find short-term
oscillations:
22