Introduction to Least Squares Method of Best Fit

The Least Squares Line

According the the method of least squares, the line of best fit is the one that minimizes the squares of the differences between the data points' observed (experimental) y-values and their expected (theoretical) y-values. This line is known as the least squares regression line.

To calculate the sum of squares of a line, find the difference between and the true y value for each point. is found by substituting the corresponding x value into the linear regression equation. Then square those differences, and then sum them. Line A is done below:

    Point x y Difference y- Difference Squared (y-)2
    1 10 5.0 8.0 -3.0 9.00
    2 18 24 14.4 9.6 92.16
    3 38 27.5 30.4 -2.9 8.41
    4 50 60.0 40.0 20.0 400.00
    5 63 50.0 48.0 2.0 4.00
The total sum of squares for this line is 513.57. As said before, the line that minimizes this value is the line of best fit according to the least squares method.

Earn ASCLS P.A.C.E.® credits for your state clinical laboratory personnel license. Visit LabCE.com for laboratory continuing education.

Linear Regression Analysis course details »

Learn more about laboratory continuing education for ASCP, AMT, NCA, and state renewal and recertification requirements »

Get information on OSHA laboratory safety courses for clinical and medical laboratories »