You are on page 1of 4

1 | A m i t K u m a r

CH5440 ASSIGNMENT 1 SUBMITTED ON: Monday, 29 January 2013


Amit Kumar (BT10B004)
Dept. of Biotechnology
E-mail id: amitk.iitm@gmail.com
Note: For some question, calculation were done in separate sheet. Since, typing the formula was
becoming time consuming and lengthy, some steps were skipped.

Symbols used:

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

is the difference between Experimental and theoretical values.

)
( )


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

from pat (a),


()

,
we get


Putting this value of o in
()

, we get a quadratic equation in the form of


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

in the first term of RHS, we will get final result.


(



Note: For convenience, I have used
Y: Experimental value of y
y: Theoratical Value of y

= Mean of theoretical value

= Mean of Experimental value.



3. For this question, the table of sales and price is

Assuming price on X-axis and sales on Y-axis, So
(Note: All these calculation for mean, variance and covariance were done in R.)

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.

You might also like