Linear regression

The goal of a linear regression model is to find the slope and intercept pair that minimizes loss on average across all of the data.

The question is:

If there are formulas for slope and intercept:
slope (b) of regression line: b = r(Sy/Sx);
Y-Intercept (a) of the regression line: a = y̅ - bx̅.

And by these formulas, we can calculate linear regression function y = a + bx which gives us a best-fit line.

Why do we need to find squared error to find the best-fit line?

Simplest answer, squares are positive. After that we can ignore signs and add all the terms. Once we divide by N and take the square root, it still comes out positive.

Algorithmically, well, that’s a little more involved, obviously. Keep in mind that the line is not data, it is meta data, that’s why M and B are what’s important, not X. M is the rate, and B is the median range when X is zero.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.