Lesson 21 Time series Analysis 21.1 Introduction Forecasting or predicting is an essential tool in any decision making process. Its uses vary from determining inventory requirements for a local shoe store to estimating the annual sales of high-tech computers. The quality of the forecasts management can make is strongly related to the information that can be extracted and used from past data. Time series analysis is one quantitative method we can use to determine patterns in data collected over time. Table 21.1 presents an example of time series data.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Lesson 21
Time series Analysis
21.1 Introduction
Forecasting or predicting is an essential tool in any decision making process. Its uses vary
from determining inventory requirements for a local shoe store to estimating the annual
sales of high-tech computers. The quality of the forecasts management can make is
strongly related to the information that can be extracted and used from past data. Time
series analysis is one quantitative method we can use to determine patterns in data
collected over time. Table 21.1 presents an example of time series data.
Time series data: A time is a set of observation taken at specific times, usually at
equal intervals. Mathematically, a time series is defined by the values
of a variable at times .
Example 21.1
Consider the data in Table 21.1 where the quarterly S&P 500 indices from 1900 to 1995
are presented in order of time. This is a proper example of a time series data. The change
and variation pattern of the data over the period and making future forecast from the
observed pattern are of simultaneous interest and studying these characteristics of the
data is termed as time series analysis. The example considers a data for a substantially
long period and this is often a requirement for valid future prediction. For simplicity of
the analysis, the quarter January 1900 can be coded as quarter 1 (or ) and the
corresponding index value is read as , the quarter April 1900 can be coded as quarter 2
(or ) and the corresponding index value is read as , … and so on up to the index
corresponding to the quarter October 1995. The data is given in Table A21.1. A line
diagram of the data in Table 21.1 is presented in Figure 21.1, where the fluctuation of the
S&P 500 index over the study period 1900-1995 is pronounced.
Figure 21.1: The line diagram of quarterly S&P 500 index from 1900-1995
21.1.1 The uses and utilities of Time series analysis
The analysis of time series can be helpful in economist, business people, the scientist,
social researchers and many other groups of people. The following utilities are rendered
very important:
It helps understand the past behaviour of any physical phenomenon .
It helps in planning the future and policy making
It helps evaluating current achievement or accomplishment
It helps researchers to compare change behaviour in different data.
21.2 Variations in time series
We use the term time series to refer to any group of statistical information accumulated at
regular intervals. There are four kinds of change or variation involved in time series
analysis, or in other words we can say there are four components of time series data:
Secular trend: The smooth gradual direction of increase or decrease behavior
over long time.
Cyclical fluctuation: The fluctuation or rise and fall of a time series over long
period of time.
Seasonal variation: The fluctuation or ups and down over small interval of time,
usually over every year.
Irregular variation: The random behavior of un-patterned fluctuations.
Figure 21.2, shows different variations in time series. We can see in Figure 21.2 that the
general movement persisting over the range time represented by a straight line (c). This
variation is the secular trend in the time series. A pronounced fluctuation moving up and
down every few years is also observed, this is the cyclical variation and it is represented
by (b) in Figure 21.1. Moreover if we look closely year by year, we can see the original
time series has a variation within every year, and this is known as the seasonal
fluctuation. Finally the saw-tooth irregularities in the curve of original data is the
irregular random variations.
Figure 21.2: Different types of variation of time series.
21.2.1 Time series models:
Let us denote the four components secular trend, cyclical fluctuation, seasonal variation
and the irregular variation by and . In traditional or classical time series
analysis it is ordinarily assumed that any particular value of the time series is the product
of these four components, i.e., . This is called the multiplicative model.
The other traditional time series models include
Additive model
Mixed model
Mixed model .
Example 21.2
From the quarterly S&P 500 index from 1900-1995, show the different components of
time series.
Solution:
The S&P 500 index from 1900-1995 are presented in Figure 21.3 and the different
components of time series.
Again for Figure 21.3, the general movement persisting over the range time or the secular
trend is represented by a straight line (c). The cyclical variation is represented by (b) in
Figure 21.3, and the seasonal variation observed year by year is shown for one year in a
boa. Finally one instance of the irregular random variations is highlighted in another box.
Figure 21.3: Different types of variation for quarterly S&P 500 index from 1900-1995
21.3 The secular trend
Of the four components of a time series, secular trend represents the long term direction
of the series. One way to describe it is to fit a line visually to a set of points on a graph.
Any given graph, however, is subject to slightly different interpretations by different
individuals.
21.3.1 Reasons for studying Trends
The following three are the main reasons for studying trends:
The historical pattern of the data can be described by studying trends.
The future patterns of the data can be projected using the past pattern
The trend, in many situations can be eliminated to check the trend free time series
for other components.
21.3.2 Types of trends
Trends can be linear or curvilinear. The method of linear trends, or the straight line
method is usually used for describing time series, but it might not be appropriate because
some of the time series data could have other types of trend. For example, pollution in
environment or yearly sales of an industrial product do not follow straight line pattern of
trend. The rough pictures of the trend for the examples are given in Figure 21.4.
Figure 21.4: Trends of pollution in environment and yearly sales of an industrial product
21.3.3 Fitting the linear trend and Least squared Estimates
The long term trend of many business series, such as sales, exports and production often
approximates a straight line. If so, the equation to describe the growth is given by the
following linear trend equation as
,
where is the projected value of the variable for a selected value of ,
is the intercept. It is estimated value of when . Another way of interpreting is
that is the estimated value of where the line crosses the axis, is the slope of the
line, or an average change in for each one unit change in , and is any value of time
that is selected.
The concept associated with fitting the linear trend or the linear trend equation is quite
the same as the simple linear regression with the independent variable being considered is
the time. Now using the well known results of simple linear regression, we can find the
Least squared estimators and using sample data on time series and time as
and
Example 21.3
The sales of Jenson foods, a small grocery chain, since 1997 are given in Table 21.1.
Determine the least squares trend-line equation.
Year 1997 1998 1999 2000 2001Sales ($ million) 7 10 9 11 13Table 21.1: Sales ($ million) of Jenson foods, since 1997
Solution:
To simplify the calculations, the years are replaced by coded values. That is, we let 1997
be 1, 1998 be 2 and so forth. Computations needed for determining the trend equation is
given in Table 21.2.
YearSales
($ million)
19971998199920002001
71091113
12345
720274465
1491625
50 15 163 55Table 21.2: Computations needed for determining the
trend equation for sales data of Jenson foods
Now the linear trend equation is
,
where and are calculated using the necessary calculations done in Table 21.3. We
now have
and
The trend equation, therefore, is given by
where, sales are in millions of dollars. The origin, or year 0, is 1996 and increases by
one unit for each year. The value of 1.3 indicates sales increased at a rate of $1.3 million
per year. The value 6.1 is the estimated sales when . That is, the estimated sales
amount for 1996 (base year) is $6.1 million. The fitted trend line is shown in the
following Figure 21.5.
Figure 21.5: The original sales and the trend line.
Example 21.4
Use the data on S&P indices for fitting the least square estimation of the trend.
Solution:
From the data on time series available in Example 21.1, a least square estimation method
can be used. The intercept and regression co-efficient are to be obtained. We used SPSS
software for computing the estimated regression parameters. The values obtained are
1.10259712304 and -0.0001738063029993.
The fitted linear equation revealed by these values is
.
The fitted trend is shown in Figure 21.5.
Figure 21.6: The fitted linear trend along with the original series of quarterly S&P 500 index 1995
21.3.4 Future projection using least squared estimates
If the time series data is fitted to a linear trend using least squared estimation method, the
future value of the variable can be projected by putting the desired value of in the
fitted linear equation.
Example 21.5
Refer to the sales data in example 21.2. the year 1997 is coded 1 and 1998 is coded 2.
what is the sales forecast for 2004?
Solution:
The year 1999 is coded 3, 2000 is coded 4, 2001 is coded 5, 2002 is coded 6.2003 is
coded 7 and 2004 is logically coded 8. The linear trend equation for the problem is:
Thus for the year 2004, substituting in the equation we get
thus, based on past sales, the estimated sale for 2004 is $16.5 million.
14.3.5 Method of moving average
The method of moving average (MA) is useful in smoothing a time series so that the
trend of the series becomes more visible. The moving average method is also the base for
measuring seasonal variations. The arithmetic mean of successive data points are moved
to construct the moving average. A -point MA is obtained by constructing the variable
which is represented by the average of successive observations. Let be a
time series data. A -point MA, is obtained by using the following relations:
,
,
…
The MA averages out the cyclical and irregular variation, however, caution should be
taken in using MA since if the data do not follow fairly linear trend or do not have a
definite rhythm, the computation of the MA would not be appropriate.
Example 21.6
For the sales data from 1976 to 2001, compute a seven year moving average and plot the
moving average along with the original time series.
Solution:
We construct the Table 21.3 to compute the moving average.
Figure 21.7: The Seven years moving average along with the original series of sales data from 1976 to 2001
Example 21.7
From the data on time series available in Example 21.1, find a 25-pt MA and plot the MA data along with the original series
Solution:
From the data on time series available in Example 21.1, a 25-pt MA is obtained and presented in Table A21.5. The line diagram of the 25-pt MA is also presented along with the original series in Figure 21.8.
Figure 21.8: The 25 pt moving average along with the original series of of quarterly S&P 500 index 1995
21.3.6 Nonlinear Trend
A linear trend equation is used to represent the time series when it is believed that the
data are increasing (or decreasing) by equal amounts, on the average, from one period to
another. If the data increase (or decrease) by equal percents or proportions over a period
of time, a curvilinear trend will appear.
The trend equation for a time series that does approximate a curvilinear trend, may be
computed by using the logarithms of the data and the least squares method. The general
equation for the logarithmic trend equation is:
Example 21.8
Fit the general equation for the logarithmic trend equation using the sales data from 1997
to 2003 given in Example 21.5.
Year Sales($ million)
1997199819992000200120022003
2.130.3539.8257211290981
Table 21.4: Sales ($ million) since 1997
Solution:
An Excel run provides the following outputs
Intercept= -0.4129, Slope= 0.519676
Now we can write and ,
i.e. and ,
hence the non-linear equation of trend becomes
.
Whereas the fitted linear (secular) trend is found to be
.
The fitted linear and non-linear trends are calculated in Table 21.7 and they are plotted