Econometric Theory/Normal Equations Proof

From testwiki
Jump to navigation Jump to search

Below is the proof of the Normal Equations for OLS.

The goal of OLS is to minimize the sum of squared error terms to find the best fit.


Known: ϵi^=YiYi^=YiαβXi

ϵi^2

=(YiYi^)2

=(Yiα^β^Xi)2


minα,βϵi^2ϵi^2α^=2ϵi^ϵi^α^=2ϵi^(1)=2(Yinα^β^Xi)(1)=0


ϵi^2β^=2ϵi^ϵi^α^=2ϵi^(Xi)=2(Yiα^β^Xi)(Xi)=0

So we have two equations:

(Yinα^β^Xi)(1)=0

and

(Yiα^β^Xi)(Xi)=0

setting them both equal to Yi

We get

Yi=nα^+β^Xi

and

YiXi=α^Xi2+β^Xi2

Divide the first equation by n


1nYi=α^+1nβ^Xi

Leaves us with (nWi1n=W¯)

Y¯=α^+β^X¯α^=Y¯β^X¯

Now we know how to get α(hat), we can work on β(hat)


YiXi=α^Xi2+β^Xi2=[Y¯β^X¯]Xi2+β^Xi2=[(Xi)(Yi)n]+β^[Xi2(Xi)2n]

We can move β(hat) to one side

β^=YiXi(Xi)(Yi)nXi2(Xi)2n


And now we have our Normal equations for OLS.