The least squares method results in values of the y-intercept and the slope, that minimizes the sum of the squared deviations between the observed (actual) value and the fitted value.
Step-by-step explanation:
The method of least squares works under these assumptions
The best fit for a data collection is a function (sometimes called curve).
This function, is such that allows the minimal sum of difference between each observation and the expected value.
The expected values are calculated using the fitting function.
The difference between the observation, and the expecte value is know as least square error.