Linear Regression

A linear regression expresses the linear relation of a treatment variable to an outcome variable.


Regression Line

A regression line can be especially useful on a scatter plot.

The regression line passes through two points:

[ATTACH]

and

[ATTACH]


Regression Computation

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]


CategoryRicottone