1) (Y-Yc)=0
i.e., the sum of deviation of the actual values of Y and the computed
values of Y is zero.
2) (Y-Yc)2 is least,
i.e., the sum of the squares of the deviations of the actual and computed
values is least from this line. That is why this method is called the
method of least squares.
The straight line trend is represented by the equation
Yc=a+b X
Where Yc denotes the trend (computed) values to distinguish them from
the actual Y values, a is the Y intercept or the value of the Y variable
when X=0, b represents slope of the line or the amount of change in Y
variable that is associated with a change of one unit in X variable. The X
variable in time series represents time.
In order to determine the value of the constants a and b, the following
two normal equations are to be solved:
Y=N a+b X
XY= aX+bX2
Y=N a
a
Since
Y
Y
N
XY= bX2
XY
2
X
2003
2004
2005
2006
2007
2008
10
13
16
21
24
30
X2
Sales (in
Deviation
lakhs )
from 2005
2003
10
-2
-20
9.143
2004
13
-1
-13
13.086
2005
16
16
17.029
2006
21
+1
21
20.972
2007
24
+2
48
24.915
2008
30
+3
90
28.858
X=3
XY=126
N=6
Y=114
XY
Trend values
Yc
X2=19 Yc=114.003
(i)
126=3a+19 b
(ii)
114=6a+3b
252=6a+38 b
-35 b=-138
Or, b=3.943
Putting the value of b in equation (i)
114=6a+33.943
6a=114-11.829
6a=102.171
a=17.029
the equation of the straight line trend is :
Y=17.029+3.943 X
Y2003=17.029+3.943 (-2)=9.143
Y2004=9.143+3.943=13.086
Second Degree Parabola:
The simplest example of the non-linear trend is the second degree
parabola, the equation of which is written in the form:
Yc=a+b X+c X2
when the numerical values for constants a, b and c have been derived,
the trend value for any year may computed substituting the value of X
for that year. The values of a, b and c can be obtained by solving the
following three normal equations simultaneously:
i.
ii.
XY= aX+bX2+cX3
iii.
X2Y= aX2+bX3+cX4
When time origin is taken between two middle years X and X3 would
be zero. In that case the above equations are reduced to
i.
Y=N a +cX2
ii.
XY= bX2
iii.
2003
`2004
2005
2006
2007
2008
Price
100
107
128
140
181
192
Yc
Price
X2
X3
X4
XY
X2Y
Trend
values
2003
100
-2
-8
16
-200
400
97.744
2004
107
-1
-1
-107
107
110.426
2005
128
126.680
2006
140
+1
140
140
146.506
2007
181
+2
16
363
724
169.904
2008
192
+3
27
81
576
1728
196.874
N=6
Y=8
X=3
X2
X3
X2Y=3099
Yc=848.134
=19
=27
48
X4=115 XY=77
1
(i)
771=3a+19b+27c
(ii)
3099=19a+27b+115c
(iii)
(iv)
(v)
log a
log Y
X . log Y
; and log b
2
N
X
Take the antilogs of these expressions to arrive at the actual trend values.
Problem 04:
Fit a logarithmic straight line to the following data:
Years
2003
2004
2005
2006
2007
2008
64
70
75
82
88
95
Solution:
Year
log Y
X2
X. log Y
2006
X
2003
64
-3
1.8062
-5.4186
2004
70
-2
1.8451
3.6902
2005
75
-1
1.8751
-1.8751
2006
82
1.9138
2007
88
+1
1.9445
1.9445
2008
95
+2
1.9777
3.9554
log Y=11.3624
X2=19
X. log
N=6
Y=474
X=-3
Y=-5.084
(i)
(ii)