Econometric Theory/Normal Equations Proof
From Wikibooks, the open-content textbooks collection
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, also called the Residual Sum of Squares (RSS). This is denoted by
.
[edit] Defining the RSS
Known: 
RSS =
=


[edit] Differentiate the RSS (so that we can then minimise it)
=

=

So we have two equations:

and
(The two(2) here is divided from both sides)
setting them both equal to 
We get
(This is the first OLS Normal Equation)
and
(This is the second OLS Normal Equation)
[edit] Solve the Normal Equations
Divide the first equation by n

Leaves us with (
)

Now we know how to get α(hat), we can work on β(hat)
![\sum Y_i X_i = \hat{\alpha} \sum X_i + \hat{\beta}\sum X_i^2 = [\bar{Y} - \hat{\beta} \bar{X}] \sum X_i + \hat{\beta}\sum X_i^2 = [\frac{(\sum X_i)(\sum Y_i)}{n}] + \hat{\beta}[\sum X_i - \frac{\sum X_i^2}{n}]](http://upload.wikimedia.org/math/a/b/5/ab5d0edf00037e7bf41bd0e97fbcf57c.png)
We can move β(hat) to one side

And now we have our Normal equations for OLS.
Since we have two equations and two unknowns, we are able to solve for them (
).