23. Simple Linear Regression Intuition - Step 2

SIMPLE LINEAR REGRESSION 2

Ordinary Least Squares

  • To get this best fitting line, you take the each of the points on the line, you square them and you take the sum of the squares

  • So you got to find the minimum of the sum of the squares

  • The formula is SUM (y - y^)^2 -> min

  • So basically what a simple linear regession does is it draws lots and lots of these lines

  • These trend lines all this is like a simplistic way of imagining the linear regression. and it draws all possible trendlines through the dots and counts the sum of those squares every single time.

  • It then finds the minimum one so it looks for the minimum sum of squares and finds a line which has the smallest sum of squares possible

  • And that line will be the best fitting line and that is called the ordinary least squares method.

Last updated