Brain Dump

Least Squares Regression Line

Tags
math

Is a formula for the line-of-best fit for the data plotted on scatter-diagram. It's defined as a straight line that always goes through \( (\bar{x}, \bar{y}) \). The goal of the least squares regression line is to minimise the total residual space between the line and each point on the graph. I.E. To provide a best fit to the data.

Warn: A best fit line only works when there's positive or negative correlation.

If we define the least-squares regression line as \( y = mx + c \) then:

\begin{align*} m &= \frac{S_{xy}}{S_{xx}} \
c &= \bar{y} - b \bar{x} \end{align*}

Where \( S_{xy} \) and \( S_{xx} \) is taken from pearson's product moment correlation coefficient.