In this exercise, linear regression is performed using basic statistical formulae and sklearn. Then we compare the RMSE from both techniques and verify.
Regression equation for a single x variable is: y=b0+b1x In this case once we solve for minimum RMSE , we get that b1= b1 = r sy/sx= summation((xi − x¯)(yi − y¯))/summation((xi − x¯)^2)