Академический Документы
Профессиональный Документы
Культура Документы
Mean of x
Mean of y
Variance of x
Variance of y
Covariance of (x,y)
1.
a. Ordinary Least Square method
Let error= u, then
Sum of squared errors
( )
Hence, Sum of squared errors depends on the coefficients o,|.
So, minimize S(o,|) wrt o,|.
( ) (
( )
Let,
x
,
y
, o
x
, o
y
,
xy
be the mean of x, mean of y, variance of x, variance of y and
covariance of x and y. Then
( )
( )
2 | A m i t K u m a r
( )
For getting minimum, solving
()
and
()
, We get
So, above two are linear equation in two variable with unknown (o, |). The value of
(o, |) can be obtained by simply solving both equations
And then putting the value of
and
in the
value obtained for (o, |), we get
b. Total Least square method:
Where
)
( )
Here, the function that we have to minimize is ( ).
Now, For getting minimum, solving
()
and
()
, We get
From solving first equality condition and using values of
and
,
we get
Putting this value of o in
()
Where,
)(
)(
And then solving this quadratic equation, we get
3 | A m i t K u m a r
So, Value of in both the cases depends on . And the relationship between is
same.
2. We have to prove
OR
(
We know that
Y
i
= o + | x
i
Now, from OLS formula
o =
y
- |
x
Putting the value of o in above equation
Y
i
=
y
- |
x
+ | x
i
Taking summation both side and then dividing it by N.
2
nd
and 3
rd
term of right side will cancel out.
(a)
Now,
Y
i
= y
i
+ c
i
................(b)
Summing it over all is and dividing it by N, we get
(c)
From equation (a) and (C)
Taking variance both side of equation (b)
Var(Y) = Var(y
i
) + Var(c) +2*Cov(y
i
, c) ..(d)
The last term in RHS of above equation is zero.
(
() ()
(
() ()
(
() ()
Putting value of (e), (f) and (g) in (d) and putting
,
And
4 | A m i t K u m a r
(
Then Put
Note: For convenience, I have used
Y: Experimental value of y
y: Theoratical Value of y
x
= 104.6
y
= 172.7
o
x
= 244.2667 o
y
= 1152.456
xy
= -88.91111
Putting all these values for (o, |) in solution of question 1, we get
Sales = 210.77 -0.364(Price)
Correlation = (
xy
/o
x
o
y
)
= -0.000315
The value of correlation is far away from unity. So, linear model is not acceptable.
(Note: Correlation is also used for determining whether linear model is acceptable or
not.)
Coefficient of relation = (Explained Variation/total variation)
= 291.2794/10372.1
= 0.0280
So again it proves that linear model is not acceptable.