Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

Time series analysis

2000-01

2001-02

Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar

Sales
6.6
6.7
5.9
4.9
5.8
6.4
6.2
6.3
9.6
7.5
7.6
8.1
6.6
6.7
5.9
4.9
5.8
6.4
6.2
6.3
9.6
7.5
7.6
8.1

Copy and paste monthly


sales year on year one
below the other

2000-01

2001-02

Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar

Sales
6.6
6.7
5.9
4.9
5.8
6.4
6.2
6.3
9.6
7.5
7.6
8.1
6.6
6.7
5.9
4.9
5.8
6.4
6.2
6.3
9.6
7.5
7.6
8.1

MA-12

6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.89
7.01
7.24
7.52
7.60
7.61

Formula for Moving


average = Enter
@average(c2..c13) in d2
Copy and paste the
formula to d3
D3 will read as
@average(c3..c14)
Now copy till D.., leaving
the last 6
Next center Moving
average

Canceling random variation


Inherent in the collection of data taken over
time is some form of random variation.
There exist methods for reducing of canceling
the effect due to random variation.
An often-used technique in industry is
"smoothing".
This technique, when properly applied, reveals
more clearly the underlying trend, seasonal
and cyclic components.

Moving Average Method


It is one of the most popular method for
calculating Long Term Trend.
This method is also used for Seasonal
fluctuation, cyclical fluctuation & irregular
fluctuation.
In this method we calculate the Moving
Average for certain periods.

Sales and Moving Averages

Seasonal variation:
Seasonal variation are short-term
fluctuation in a time series which occur
periodically in a year. This continues to
repeat year after year.
The major factors that are weather conditions
and customs of people.
More woolen clothes are sold in winter than in
the season of summer .
each year more ice creams are sold in summer
and very little in Winter season.
The sales in the departmental stores are more
during festive seasons that in the normal days.

Seasonal Variation in one year or less


= ratio actual to Moving average
2000-01

2001-02

Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar

Month
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

Sales
6.6
6.7
5.9
4.9
5.8
6.4
6.2
6.3
9.6
7.5
7.6
8.1
6.9
7.3
7.2
7.2
7.2
7.5
7.2
7.4
7.1
7.8
8.1
8.7

MA

MAC

Act/Mac

6.800
6.825
6.875
6.983
7.175
7.292
7.383
7.467
7.558
7.350
7.375
7.417
7.467
7.533
7.600
7.725
7.808
7.775
7.692

6.813
6.850
6.929
7.079
7.233
7.338
7.425
7.513
7.454
7.363
7.396
7.442
7.500
7.567
7.663
7.767
7.792
7.733

0.910
0.920
1.385
1.059
1.051
1.104
0.929
0.972
0.966
0.978
0.974
1.008
0.960
0.978
0.927
1.004
1.040
1.125

Averaging Moving averages of different years


and rectification
Copy and paste seasonality ratios in year wise columns,
calculate averages and adjust for total =12
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar

2000- 2001- 2002- 2003- 2004- 2005- 2006- 2007- 200801


02
03
04
05
06
07
08
09
Mean Index
0.929 0.999 1.130 0.884 1.115 1.040 1.028 1.012 1.017 1.019
0.972 1.047 1.060 0.988 1.120 1.073 1.151 0.932 1.043 1.045
0.966 1.119 1.079 1.038 1.010 1.044 1.100 0.949 1.038 1.040
0.978 1.052 0.887 1.186 1.107 0.952 0.987 0.965 1.014 1.016
0.974 0.877 0.990 0.886
0.924 0.898 1.030 0.940 0.942
1.008 0.846 0.930 0.909 0.844 0.893 0.859 1.040 0.916 0.918
0.910 0.960 0.985 1.019 0.967 0.815 0.853 0.828 1.030 0.930 0.931
0.920 0.978 0.989 0.977 1.012 0.858 0.909 0.876 1.037 0.951 0.953
0.927 0.987 0.988 0.999 0.974 0.962 0.988 0.974 0.975 0.977
1.059 1.004 0.980 0.981 0.999 1.038 1.068 1.050 1.017 1.022 1.024
1.051 1.040 0.939 1.004 0.936 1.119 1.106 1.082 1.023 1.033 1.035
1.104 1.125 1.016 1.143 0.889 1.276 1.128 1.110
1.099 1.101

Sum

11.977 12.000

De-seasoning data

Actual sales
De-seasonalised sales = _______________

Monthly seasonal Index

2000-01

2001-02

Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar

Month
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

Sales
6.6
6.7
5.9
4.9
5.8
6.4
6.2
6.3
9.6
7.5
7.6
8.1
6.9
7.3
7.2
7.2
7.2
7.5
7.2
7.4
7.1
7.8
8.1
8.7

MAC

Sales/Mac

6.81
6.85
6.93
7.08
7.23
7.34
7.43
7.51
7.45
7.36
7.40
7.44
7.50
7.57
7.66
7.77
7.79
7.73

0.910
0.920
1.385
1.059
1.051
1.104
0.929
0.972
0.966
0.978
0.974
1.008
0.960
0.978
0.927
1.004
1.040
1.125

Index
1.019
1.045
1.040
1.016
0.942
0.918
0.931
0.953
0.977
1.024
1.035
1.101
1.019
1.045
1.040
1.016
0.942
0.918
0.931
0.953
0.977
1.024
1.035
1.101

Salesd
6.477
6.413
5.674
4.821
6.160
6.973
6.656
6.614
9.829
7.327
7.342
7.357
6.772
6.987
6.924
7.084
7.646
8.171
7.729
7.769
7.270
7.620
7.825
7.902

Linear Trend: Least Squares

Slope of the best fitting line


sum XY- n*X mean*Y mean
b =_____________________________
Sum X^2 n * Xmean^2
Easy to remember variance xy/variance x^2
Since X mean and Y mean is on the regression
line
A = Y mean b* X mean

Simplify X in Time series


X = 2005, 2006, 2007, 2008, 2009,2010, 2011
X = -3, -2,-1, 0, 1, 2, 3 . X mean = 0
X = 2005, 2006, 2007, 2007.5, 2008,
2009,2010
X= 2*(-2.5), 2*(-1.5), 2*(-0.5), 2*(.5), 2*(1.5),
2*(2.5)
X = -5, -3, -1,1, 3,5 X mean = 0
N*X mean * Y mean = 0*Y mean =0
b = sum XY/sum X^2, a = Y mean

De-season
6.22
6.07
5.66
5.16
6.62
7.21
6.96
7.02
9.11
7.27
7.13
7.11

Period
-56
-55
-54
-53
-52
-51
-50
-49
-48
-47
-46
-45

XY
-348.187
-333.666
-305.434
-273.664
-344.271
-367.602
-348.149
-343.986
-437.477
-341.88
-327.9
-319.834

X^2
3136
3025
2916
2809
2704
2601
2500
2401
2304
2209
2116
2025

Trend = 8.49+.034243*De-seasoned sales

Trend
6.57
6.60
6.64
6.67
6.71
6.74
6.78
6.81
6.84
6.88
6.91
6.95

SUMMARY OUTPUT
Regression Statistics
Multiple R 0.799894
R Square
0.639831
Adjusted R
Square
0.636586
Standard
Error
0.771784
Observatio
ns
113

Intercept and coefficients are


different as periods (x) is
numbered from 1 to 113

ANOVA
df
Regression
Residual
Total

Intercept
Month

SS

MS

1 117.4554 117.4554 197.1884


111 66.11723 0.595651
112 183.5726

Significanc
eF
2.29E-26

Coefficient Standard
Lower
Upper
s
Error
t Stat
P-value Lower 95% Upper 95% 95.0%
95.0%
6.761015 0.146176 46.25262 2.27E-74 6.471358 7.050672 6.471358 7.050672
0.031256 0.002226 14.04238 2.29E-26 0.026845 0.035666 0.026845 0.035666

Cyclical Variations:
Cyclical variations are recurrent upward or downward
movements in a time series but the period of cycle is
greater than a year. Also these variations are not regular
as seasonal variation.

A business cycle showing these oscillatory movements has


to pass through four phases-prosperity, recession,
depression and recovery. In a business, these four phases
are completed by passing one to another in this order.

Cyclical Variation and Moving average


When we have yearly data, not monthly nor
Quarterly, we will not have Seasonal Variation.
Seasonal variation is in monthly or quarterly data
Yearly data contains Trend, Cyclical and Error
S = T*C, C= S/T
Percent of Trend when we have monthly data =
Ratio of Moving Average to Trend Value
Moving average smoothens the
monthly/quarterly variations
Remember Cyclical variation is oscillations around
trend line for periods longer than a year

2000-01

2001-02

Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar

Sales
6.6
6.7
5.9
4.9
5.8
6.4
6.2
6.3
9.6
7.5
7.6
8.1
6.6
6.7
5.9
4.9
5.8
6.4
6.2
6.3
9.6
7.5
7.6
8.1

MA-12

6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.82
6.83
6.93
7.19
7.39
7.55

MAC

6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.80
6.81
6.82
6.88
7.06
7.29
7.47
7.55

Trend
6.57
6.61
6.64
6.67
6.71
6.74
6.78
6.81
6.85
6.88
6.91
6.95
6.98
7.02
7.05
7.08
7.12
7.15
7.19
7.22
7.26
7.29
7.32
7.36

MAC/trend

1.01
1.00
1.00
0.99
0.99
0.98
0.98
0.97
0.97
0.96
0.96
0.96
0.96
0.97
0.99
1.02
1.04
1.04
1.04

Cyclical
Factors

Rearrange Cyclic Factors and calculate Yearly


averages
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar
Mean

2000- 2001- 2002- 2003- 2004- 2005- 2006- 2007- 200801


02
03
04
05
06
07
08
09
1.036 1.023 1.007 0.969 0.995 1.034 1.046 1.009
1.044 1.023 1.010 0.951 0.998 1.039 1.041 1.003
1.032 1.023 1.012 0.941 1.000 1.044 1.038 0.989
1.015 1.021 1.014
1.002 1.048 1.035 0.976
1.015 1.012 1.019 0.947 1.003 1.053 1.030 0.970
1.017 1.000 1.027 0.956 1.009 1.049 1.024 0.967
0.976 1.020 0.999 1.031 0.959 1.013 1.044 1.021 0.964
0.977 1.025 1.004 1.033 0.958 1.012 1.048 1.021 0.954
0.984 1.034 1.002 1.030 0.960 1.015 1.054 1.018 0.947
1.001 1.043 0.993 1.021 0.974 1.014
1.014 0.949
1.018 1.043 0.990 1.006 0.988 1.017 1.056 1.010 0.956
1.029 1.030 1.000 0.986 0.992 1.028 1.051 1.009
0.998 1.033 0.998 1.018 0.972 1.017 1.050 1.015 0.954

Time Series Model


Addition Model:
Y=T+S+C+I
Where:- Y = Original Data

T = Trend Value
S = Seasonal Fluctuation
C = Cyclical Fluctuation

Multiplication Model:

I=

Y = T x S x C x II = Irregular
Fluctuation
or
Y = TSCI

Irregular variation:
Irregular variations are fluctuations in time series that are
short in duration, erratic in nature and follow no
regularity in the occurrence pattern. These variations
are also referred to as residual variations since by
definition they represent what is left out in a time series
after trend ,cyclical and seasonal variations. Irregular
fluctuations results due to the occurrence of unforeseen
events like :

Floods,
Earthquakes,
Wars,
Famines

Weakest part of estimation

Forecast

Forecast = T*S*C, compare actual for six months.


Predict for next 6 months.
Verification and Forecast
Trend
Mar
10.109
Apr
10.140
May
10.171
Jun
10.202
Jul
10.233
Aug
10.264
Sep
10.295
Oct
10.326
Nov
10.357
Dec
10.388
Jan
10.419
Feb
10.450

Seaons
1.101
1.019
1.045
1.040
1.016
0.942
0.918
0.931
0.953
0.977
1.024
1.035

Cyclic
0.970
0.970
0.970
0.970
0.970
0.970
0.970
0.970
0.970
0.970
0.970
0.970

Predict
10.795
10.022
10.308
10.291
10.088
9.375
9.166
9.330
9.570
9.841
10.346
10.493

Actual
11.3
9.8
10.7
10.6
10.7
10

Diffpct
-4.466
2.269
-3.666
-2.915
-5.716
-6.250

Advanced Topic
Parabolic Curve for Trend
Many times the line which draw by Least Square
Method is not prove Line of best fit because it is
not present actual long term trend So we distributed
Time Series in sub- part and make following equation:-

Yc = a + bx + cx2
If this equation is increase up to second degree then it is
Parabola of second degree and if it is increase up to third
degree then it Parabola of third degree. There are three
constant a, b and c.
Its are calculated by following three equation:-

Parabola of second degree:2


Y

Na

b
X

c
X

2
3
XY

a
X

b
X

c
X

2
2
3
4
X
Y

a
X

b
X

c
X

If we take the deviation from Mean year then the all


three equation are presented like this:
2
Y

Na

C
X

2
XY

b
X

2
2
4
X
Y

a
X

c
X

Example:
Draw a parabola of second degree from the following data:Year

1992

1993

1994

1995

1996

Production (000)

10

Year

Production

Dev. From Middle


Year
(x)

xY

x2

x2Y

x3

x4

Trend Value
Y = a + bx + cx2

1992

-2

-10

20

-8

16

5.7

1993

-1

-7

-1

5.6

1994

6.3

1995

8.0

1996

10

20

40

16

10.5

= 35

X Y X X
XY X
=12 = 10 = 76 = 0 = 34
2

=0

We take deviation from middle year so the


equations are as below:

Y Na X
XY b X
X Y a X c X
2

Now we put the value of

2
3
4
X
,
Y
,
XY
,
X
,
X
,
X
,&N

35 = 5a + 10c
12 = 10b
76 = 10a + 34c

(i)

.. (iii)
12
From equation (ii) we get b = 10 = 1.2

(ii)

Equation (ii) is multiply by 2 and subtracted from (iii):


10a + 34c = 76
10a + 20c = 70
14c = 6 or c =

..
..
6
14

= 0.43

Now we put the value of c in equation (i)


5a + 10 (0.43) = 35
5a = 35-4.3 = 5a = 30.7
a = 6.14
Now after putting the value of a, b and c, Parabola of second
degree is made that is:

Y = 6.34 + 1.2x + 0.43x2

(iv)
(v)

Equation (ii) is multiply by 2 and subtracted from (iii):


10a + 34c = 76
10a + 20c = 70
14c = 6 or c =

..
..
6
14

= 0.43

Now we put the value of c in equation (i)


5a + 10 (0.43) = 35
5a = 35-4.3 = 5a = 30.7
a = 6.14
Now after putting the value of a, b and c, Parabola of second
degree is made that is:

Y = 6.34 + 1.2x + 0.43x2

(iv)
(v)

You might also like