More details on the method can be found in Appendix 2 and in the tutorial on the program Labfit in Appendix 3. The method of least squares enables one to fit a straight line to a set of data and to calculate the line's slope and intercept. To see how this works consider the data shown in Figure 1. Three data points and their deviations. The object of a linefit, or linear regression, is to fit a straight line to the data and to obtain the slope m, intercept b and their errors.
Some deviations are positive while others are negative.
In order to work with positive quantities the deviation is squared. By definition, the line of best fit is the line for which D2 is a minimum-hence the term least squares. All we need to know is the meaning of these values, and how to interpret them in the output of a typical computer program. The deviations screen is shown in Figure 2. Sample output from the program Labfit.