Differences between revisions 5 and 6
Revision 5 as of 2023-10-28 07:02:07
Size: 2051
Comment: Added model
Revision 6 as of 2023-10-28 07:04:18
Size: 2049
Comment:
Deletions are marked like this. Additions are marked like this.
Line 104: Line 104:
Where R^^2^^ is calculated as: Where R^2^ is calculated as:

Ordinary Least Squares

Ordinary Least Squares (OLS) is a linear regression method. It minimizes root mean square errors.


Univariate

The regression line passes through two points:

[ATTACH]

and

[ATTACH]

Take the generic equation form of a line:

[ATTACH]

Insert the first point into this form.

[ATTACH]

This can be trivially rewritten to solve for a in terms of b:

[ATTACH]

Insert the second point into the original form.

[ATTACH]

Now additionally insert the solution for a in terms of b.

[ATTACH]

Expand all terms to produce:

[ATTACH]

This can now be eliminated into:

[ATTACH]

Giving a solution for b:

[ATTACH]

This solution is trivially rewritten as:

[ATTACH]

Expand the formula for correlation as:

[ATTACH]

This can now be eliminated into:

[ATTACH]

Finally, b can be eloquently written as:

[ATTACH]

Giving a generic formula for the regression line:

[ATTACH]


Linear Model

The linear model can be expressed as:

model1.svg

If these assumptions can be made:

  1. Linearity
  2. Exogeneity

model2.svg

  1. Random sampling
  2. No perfect multicolinearity
  3. Heteroskedasticity

Then OLS is the best linear unbiased estimator (BLUE) for these coefficients.

Using the computation above, the coefficients are estimated to produce:

[ATTACH]

The variance for each coefficient is estimated as:

[ATTACH]

Where R2 is calculated as:

[ATTACH]

Note also that the standard deviation of the population's parameter is unknown, so it's estimated like:

[ATTACH]


CategoryRicottone

Statistics/OrdinaryLeastSquares (last edited 2025-01-10 14:33:38 by DominicRicottone)