Sunteți pe pagina 1din 48

Time Series Analysis

If the data are arranged according to time


order (chronological order) then it is known as
the Time Series.

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.
Its 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

yi Ti Ci I i

Multiplicative model

yi Ti * Ci * I i

Where Yi = Value at time i.


Ti =Value of the trend component
Ci = Value of cyclic component
Ii = Value of the irregular component

Case II: If the data are given in the form of

less than one year then the


Additive model

yi Ti Ci Si I i

Multiplicative model

yi Ti * Ci * Si * I i

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

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 Method


Concept: 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

1991

1980

7.1

1992

7.2

1981

6.8

Year

3yearly
Total

Sales

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

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

21.7

7.2 -

1992

7.2 -

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 have
St = 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

39

41

37

10

69

61

11

49

58

12

66

18

13

54

56

14

42

82

15

90

27

16

66

Solution:

month

Smoothing
when alpha =
0.2

sales

Smoothing when
alpha = 0.7

39

39

39

37

38.6

37.6

61

43.1

54.0

58

46.1

56.8

18

40.5

29.6

56

43.6

48.1

82

51.2

71.8

27

46.4

40.4

41

45.3

40.8

10

69

50.1

60.6

11

49

49.8

52.5
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

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 Trend
Trend 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

yi 0 1 xi

And its estimated or fitted equation is

y b0 b1 xi

The two constants b0 and b1 are estimated


Coefficients.

Where
Y = Actual value of the time series in period
time t.
n= number of the periods.
y = Average value of the time series.
x = Average value of the time (xi)

As mentioned previously,

b1

n xy x y
n x ( x)
2

Then the intercept can be obtained as

b0 y b1 x

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.
Car

Age (x)

Repair (y)

Obtain the repair cost for the 6 years old car.

Solution:
car

age (x)

Repair (y)
(Rs. 000)

18

21

35

25

54

36

Total

18

33

132

80

xy

x2

Now we compute linear trend equation to analyse


the time data for this problem.

b1

n xy x y
n x ( x )
2

5 *132 18 * 33
b1
0.87
2
5 * 80 (18)
and b0 y b1 x
606 0.87 * 306 3.47
Hence the fitted time series mod el
is y 3.47 0.87 x

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
2
equation is
y a bt ct

Least square estimates of the coefficients

The least square estimate of the coefficients


of second degree trend is given by

y an b t c t
ty a t b t c t
t y a t b t c t
2

Where a= estimated y-intercept


b= estimated linear effect on y
c= estimated curvilinear effect on y

Example: Following data provides the total sales of


Quartz watch company in different years.
Year

Sales

1991

13

1992

24

1993

39

1994

65

1995

106

Choose an appropriate fitting line of trend and


estimate the sales for year 2000.

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

1994

1995

Sales (y)

Year (t)

t2

t4

Y*t

t2*y

13

-2

16

-26

52

24

-1

-24

24

39

65

65

65

106

16

212

424

247

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.07
2

39
.
3

22
.
7
t

5
.
07
t
Now the fitted trend equation is

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

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.

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

weig
hts

30

31

33.5

37.5

43.0

50.0

58.5

68.5

80.0

I Diff

1.0

2.5

4.0

5.5

7.0

8.5

10.0

11.5

II Dif

1.5

1.5

1.5

1.5

1.5

1.5

1.5

1.5

Example
Following is the information about the sales
obtained during five years.
Year

Sales

1921

11.4

1931

12.1

1941

13.9

1951

17.3

1961

18.0

Compute the second degree trend equation


and determine the trend value for 1971.

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

-8

16

-22.8

45.6

1931

12.1

-1

-1

-12.1

12.1

1941

13.9

1951

17.3

17.3

17.3

1961

18

16

36

72

72.7

10

34

18.4

147

Total

Now the normal equation are


5a 10c 72.7
18.4 10b
147.0 10a 34c
On solving these equations, we get
a 14.312
b 1.84
c 0.11
Now the fitted trend equation is
14.312 1.84t 0.11t 2
y

S-ar putea să vă placă și