Explanation: The line of best fit to a scattergram is obtained in linear regression analysis by minimizing the sum of the squared errors. For example, in the diagram shown below, there are n data points in the scattergram. The error for the i-th data point is . The coefficients (a and b) for the line of best fit are determined using calculus, to minimize .