In algebra

y = mx+b

In statistics

y =

we use the Least Squares Method to find m and b