time series analysis_economics
DESCRIPTION
Times Series- MBATRANSCRIPT
Time Series AnalysisIf the data are arranged according to time order (chronological order) then it is known as the Time Series.
020406080
100120
1 2 3 4 5 6 7 8 9 10
Year
Pro
du
ctio
n
Components of time series
• Long term trend / Secular trend (T)
• Cyclic Variation (C )
• Seasonal Variation (S)
• Random Variation (R)
Long term trend
• The upward or downward pattern of
movement of the data is known as trend.
• It’s duration is more than one year may be several years.
• Trend presents in the data due to the
changes in technology, population, wealth
value, effect of competition etc.
• Systematic in nature.
Seasonal variation
• Short term regular periodic variation,
• Occur within short period of time (yearly, quarterly, monthly, weekly or daily data).
• More or less systematic.
• Occur due to seasons, weather, festivals, social customs, religions, culture, etc
Cyclic Variation• Regular patterns that repeat over a long period
of time.• Movement are cyclical.• Occur more than one year.• Four phases exist such as; prosperity (growth),
recession (contraction) , depression (trough) and recovery (expansion)
• Due to the combination of numerous factors, however, economic booms and depression are the major causes.
Random (Irregular) Fluctuation
• Variations due to accidents, random or simply due to the chance factors.
• Unsystematic in nature
• Occur due to famines, strikes, war, political situations etc.
• Almost impossible to measure or isolate the value.
• Short duration and non-repetitive in nature.
Analysis of Time Series
Case I: If the data are given in the form of more than one year then
• Additive model
• Multiplicative model
Where Yi = Value at time i.
Ti =Value of the trend component
Ci = Value of cyclic component
Ii = Value of the irregular component
iiii ICTy
iiii ICTy **
Case II: If the data are given in the form of less than one year then the
• Additive model
• Multiplicative model
Where Yi = Value at time i.
Ti =Value of the trend component
Ci = Value of cyclic component
Si = Value of seasonal component
Ii = Value of the irregular component
iiiii ISCTy
iiiii ISCTy ***
Smoothing in Time Series
Smoothing is a procedure to remove the
effect of several components (such as
seasonal and irregular) associated with time
series data. In smoothing process, therefore,
we attempt to remove the effect of irregular
Components of the time series.
Smoothing the annual time series
• First plot the given annual data and examine the tendency over the time. If the time series are fairly stable with no significant trend, cyclic and seasonal effect.
• There may be the two cases:– Data series may move long term upward or
downward movement
– Data may oscillate about the horizontal line over the time period.
In such situation, the best way of removing the
random fluctuation is to smooth the time
series are MOVING AVERAGES and
EXPONENTIAL SMOOTHING
Moving Average MethodConcept: Any large irregular component of
time series at any point of time will have a less significant effect on trend if the observation at that point of time is averaged with such values immediately after and before the observation under the consideration.
Procedure:
• Determine the moving average period (such as 3-yearly, 5-yearly, 7-yearly, etc)
• Obtain the total of moving values and calculate the average of the total of moving values.
• Place the moving average at the middle value of the time series.
• Continue the process until all the moving average is not computed.
Note:
• Remember that one value at the beginning and the last of the data will not computed in case of 3-yearly moving averages.
Compute the 3-yearly and 7-yearly moving average from the following information
Year Sales Year Sales
1970 5.3 1982 6.2
1971 7.8 1983 7.8
1972 7.8 1984 8.3
1973 8.7 1985 9.3
1974 6.7 1986 8.6
1975 6.6 1987 7.8
1976 8.6 1988 8.1
1977 9.1 1989 7.9
1978 9.5 1990 7.5
1979 9 1991 7
1980 7.1 1992 7.2
1981 6.8
Year Sales3yearly Total
3- yearly MA
7early Total
7-yearly MA
1970 5.3 - - - -
1971 7.8 20.9 7 - -
1972 7.8 24.3 8.1 - -
1973 8.7 23.2 7.7 51.5 7.4
1974 6.7 22 7.3 55.3 7.9
1975 6.6 21.9 7.3 57 8.1
1976 8.6 24.3 8.1 58.2 8.3
1977 9.1 27.2 9.1 56.6 8.1
1978 9.5 27.6 9.2 56.7 8.1
1979 9 25.6 8.5 50.1 7.2
1980 7.1 22.9 7.6 41.5 5.9
1981 6.8 13.9 4.6 32.4 4.6
1982 6.2 14 4.7 31.6 4.5
1983 7.8 22.3 7.4 40.2 5.7
1984 8.3 25.4 8.5 48 6.9
1985 9.3 26.2 8.7 56.1 8.0
1986 8.6 25.7 8.6 57.8 8.3
1987 7.8 24.5 8.2 57.5 8.2
1988 8.1 23.8 7.9 56.2 8.0
1989 7.9 23.5 7.8 54.1 7.7
1990 7.5 22.4 7.5 - -
1991 7 21.7 7.2 - -
1992 7.2 - - - -
0
12
34
5
67
89
10
Sales
average
7y-av
Decision: It is obvious that 7-yearly moving average fits the data well
than 3-years moving average.
Limitations of Moving Averages
• It avoids the values for the first and last years of the data.
• It always provides the same weights for all the observations irrespective of the number of the time periods taken into consideration
Exponential smoothing
Exponential smoothing is just the modified form of moving average in which it assigns more weights for the time series data, which are more important.
For example, it is logical to assign more weight for the most recent data as compared with too old data for the future prediction.
Therefore, exponential smoothing uses the moving average with appropriate weights assigned to the values taken into consideration in order to arrive at a more accurate forecast.
Mathematically, the form of exponential smoothing is
S1 =Y1
S2 = y1 +(1- )S1
In general, we haveSt = y1 +(1- )St-1
Where, St = exponential smoothed time series.
Yi = time series at time t. St-1 = exponentially smoothed time series at time t-1. Alpha ( )= smoothing constant
The value of this constant is decided by the
decision maker on the basis of degree of
smoothing required. Smaller value of alpha
means a greater degree of smoothing and
large value of alpha means very little
smoothing.
If =1, there is no smoothing at all.
Example: Following information gives the sales of
petrol in 16 months. Apply the exponential smoothing
technique when alpha is 0.2 and 0.7.
Month Sales Month Sales
1 39 9 41
2 37 10 69
3 61 11 49
4 58 12 66
5 18 13 54
6 56 14 42
7 82 15 90
8 27 16 66
month sales
Smoothing when alpha = 0.2
Smoothing when alpha = 0.7
1 39 39 39
2 37 38.6 37.6
3 61 43.1 54.0
4 58 46.1 56.8
5 18 40.5 29.6
6 56 43.6 48.1
7 82 51.2 71.8
8 27 46.4 40.4
9 41 45.3 40.8
10 69 50.1 60.6
11 49 49.8 52.5
Solution:
Contd…
12 66 53.1 61.9
13 54 53.3 56.4
14 42 51.0 46.3
15 90 58.8 76.9
16 66 60.2 69.3
0
20
40
60
80
100 sales
Smoothing w henalpha = 0.2Smoothing w henalpha = 0.7
Decision: From the graph, It is obvious that that smoothing is less for alpha=0.7 , while smoothing is too much when alpha = 0.2. Therefore, alternative value of Alpha may have better explanation.
Analysis of TrendTrend is one of the important factors of
analyzing time series analysis.
• This is particularly important because it is
used as a forecasting model and it has
various advantages over the other
components.
• In practice, we use two types of trend
equations: linear and curvilinear model to
study the trend.
Least Square fitting of Linear Trend
As in regression analysis, we can estimate the
linear trend equation by using principle of least
square. Let the linear equation be
And its’ estimated or fitted equation is
The two constants and are estimated
Coefficients.
ii xy 10
ixbby 10ˆ 0b 1b
Where
Y = Actual value of the time series in period time t.
n= number of the periods.
= Average value of the time series.
= Average value of the time (xi)
y
x
As mentioned previously,
Then the intercept can be obtained as
221 )( xxn
yxxynb
xbyb 10
Example: A car fleet owner have been in the
fleet for several different years. The manager
wants to establish if there is linear relationship
between the age of car and repair in hundred of
dollar for a given year. The following is the
information provided.
Obtain the repair cost for the 6 years old car.
Car Age (x) Repair (y)
1 1 4
2 3 6
3 3 7
4 5 7
5 6 9
Solution:
Now we compute linear trend equation to analyse
the time data for this problem.
car age (x)Repair (y) (Rs. 000) xy x2
1 1 4 4 1
2 3 6 18 9
3 3 7 21 9
4 5 7 35 25
5 6 9 54 36
Total 18 33 132 80
xyis
elseriestimefittedtheHence
xbyband
b
xxn
yxxynb
87.047.3ˆ
mod
47.3306*87.0606
87.0)18(80*5
33*18132*5
)(
10
21
221
Estimation: Now we have to estimate the
repair cost for 6 years old car. Therefore, the
estimated repair cost is
3.47+0.87*6 =Rs. 8.69 thousands
where x is time and it is 6 years
Fitting of Quadratic Model
Sometimes the straight line equation may be
inappropriate to describe the time series
data and time series are best described by
the curves. To overcome this problem, we
prefer the parabolic curve, which is explained
mathematically by a second-degree equation.
The general form of estimated second degree
equation is 2ˆ ctbtay
Least square estimates of the coefficients
The least square estimate of the coefficients
of second degree trend is given by
4322
32
2
tctbtayt
tctbtaty
tctbany
Where a= estimated y-intercept
b= estimated linear effect on y
c= estimated curvilinear effect on y
0
50
100
150
200
250
1 2 3 4 5 6 7
Example: Following data provides the total sales of
Quartz watch company in different years.
Choose an appropriate fitting line of trend and
estimate the sales for year 2000.
Year Sales
1991 13
1992 24
1993 39
1994 65
1995 106
Solution: Since the nature of the data shows not
uniform increase in the data level therefore,
second degree equation may be the best fit for the
data. Now first convert the given year in
appropriate time period by assuming the year 1993
as 0, we have Year t= year-1993
1991 -2
1992 -1
1993 0
1994 1
1995 2
Sales (y) Year (t) t2 t4 Y*t t2*y
13 -2 4 16 -26 52
24 -1 1 1 -24 24
39 0 0 0 0 0
65 1 1 4 65 65
106 2 4 16 212 424
247 0 10 37 227 565
Now we estimate the value of the constant by substituting these values in the normal equations as mentioned previously, then we get a= 39.3, b= 22.7 and c= 5.07Now the fitted trend equation is
207.57.223.39ˆ tty
Here we have to forecast the volume of sales for
the year 2000, therefore, we have
t = 2000-1993=7 then
y= 39.3+22.7t+5.07t2
Estimated value for the year 2000 =39.3+22.7*
7+5.07*72 =446.6
Year Sales Fitted value
1991 13 14
1992 24 22
1993 39 39
1994 65 67
1995 106 105
Now comparing the observed and fitted
values through graph
0
50
100
150
200
250
1 2 3 4 5
Fitted value
Sales
Facts to be considered during the selection of
fitting model • Linear trend is used when the time series
increases or decreases by equal absolute amount. On plotting the data, it gives the straight line.
• In other words, a linear trend is assumed to be perfect one when the consecutive difference of the observations in the series are if same. For example;
Year 1992 1993 1994 1995 1996 1997 1998 1999 2000
Age 33 36 39 42 45 48 51 54 57
I Diff. - 3 3 3 3 3 3 3 3
• Second degree model is preferred when it shows curvilinear (either concave upward or downward) graph on plotting in logarithmic scale.
• In other words, second degree model is appropriate when second difference between consecutive pairs of observations in the series are same throughout. For example;
Year 1991 1992 1993 1994 1995 1996 1997 1998 1999
weights
30 31 33.5 37.5 43.0 50.0 58.5 68.5 80.0
I Diff
II Dif
-
-
1.0
1.5
2.5
1.5
4.0
1.5
5.5
1.5
7.0
1.5
8.5
1.5
10.0
1.5
11.5
1.5
Example
Following is the information about the sales
obtained during five years.
Compute the second degree trend equation
and determine the trend value for 1971.
Year Sales
1921 11.4
1931 12.1
1941 13.9
1951 17.3
1961 18.0
Solution: First, we need to obtain the normal
equations to get the value of the constants.
Year Sales t= (x-1941)/10 t2 t3 t4 t*y t3*y
1921 11.4 -2 4 -8 16 -22.8 45.6
1931 12.1 -1 1 -1 1 -12.1 12.1
1941 13.9 0 0 0 0 0 0
1951 17.3 1 1 1 1 17.3 17.3
1961 18 2 4 8 16 36 72
Total 72.7 0 10 0 34 18.4 147
Now the normal equation are
211.084.1312.14ˆ
11.0
84.1
312.14
,
34100.147
104.18
7.72105
tty
isequationtrendfittedtheNow
c
b
a
getweequationsthesesolvingOn
ca
b
ca