⇤ ← Revision 1 as of 2023-10-28 16:16:10
Size: 1172
Comment: Extracted this content from main page for OLS
|
Size: 1289
Comment: Rewrite 1
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
The model is constructed like: {{attachment:model1.svg}} This is estimated as: {{attachment:model2.svg}} |
Ordinary Least Squares Univariate Proof
The model is constructed like:
This is estimated as:
As a starting point, the regression line must pass through these two points:
and
Take the generic equation form of a line:
Insert the first point into this form.
This can be trivially rewritten to solve for a in terms of b:
Insert the second point into the original form.
Now additionally insert the solution for a in terms of b.
Expand all terms to produce:
This can now be eliminated into:
Giving a solution for b:
This solution is trivially rewritten as:
Expand the formula for correlation as:
This can now be eliminated into:
Finally, b can be eloquently written as:
Giving a generic formula for the regression line: