Least squares fitting of a straight line to a set of data points
- 1 September 1995
- journal article
- Published by IOP Publishing in European Journal of Physics
- Vol. 16 (5) , 204-210
- https://doi.org/10.1088/0143-0807/16/5/002
Abstract
Least squares fitting of a straight line y=a+bx to a set of data points, when there are errors in the values of both coordinates is reviewed. It is shown that if the errors are equal or unknown, then it is possible to solve the problem by a direct approach, using a quadratic equation, and avoiding iteration. If the errors in both coordinates are unknown, the 'best' line is not invariant under a change of scale: a possible criterion for uniquely determining the best line is suggested. If there are errors in both coordinates, and if each point has its own weighting factors for x and y, a new algorithm is given which involves the iterative solution of a quadratic equation: some remits for this algorithm are presented. A comparative analysis of existing and our methods is presented, using standard data sets. A FORTRAN-77 implementation of our algorithm, suitable for PCs is available.Keywords
This publication has 14 references indexed in Scilit:
- Linear least-squares fits with errors in both coordinates. II: Comments on parameter variancesAmerican Journal of Physics, 1992
- Least-squares fitting when both variables contain errors: Pitfalls and possibilitiesAmerican Journal of Physics, 1992
- Robust estimation when more than one variable per equation of condition has errorBiometrika, 1990
- Linear least-squares fits with errors in both coordinatesAmerican Journal of Physics, 1989
- A better least-squares method when both variables have uncertaintiesAmerican Journal of Physics, 1984
- Least squares when both variables have uncertaintiesAmerican Journal of Physics, 1982
- Regression line analysisAmerican Journal of Physics, 1982
- On the Method of Least-SquaresThe Astronomical Journal, 1980
- Comment on ’’Simple method for fitting data when both variables have uncertainties’’American Journal of Physics, 1975
- The Fitting of Straight Lines when Both Variables are Subject to ErrorJournal of the American Statistical Association, 1959