Which step is found in the last step of the least-squares method?
1) Calculating the residuals
2) Minimizing the sum of squared residuals
3) Finding the slope and intercept of the regression line
4) Plotting the data points on a scatter plot