A lost asteroid made least squares famous, and started a priority fight
On 1 January 1801 Giuseppe Piazzi spotted the asteroid Ceres, tracked it for 40 days, then lost it in the Sun's glare. Astronomers needed to know where it would reappear. The only predictions that let Franz Xaver von Zach find it again came from a 24-year-old Carl Friedrich Gauss, using a method called least squares.
The idea is simple to state. Given scattered measurements and a model, such as a straight line, choose the model's parameters so that the sum of the squared residuals, the gaps between observed and predicted values, is as small as possible. For the simplest model of all, a single constant, the answer turns out to be the ordinary average. Linear versions have a direct formula; nonlinear ones are solved step by step, approximating the problem with a linear one at each stage.
The method grew from eighteenth-century astronomy and surveying. Isaac Newton combined repeated observations while studying equinoxes, trusting that errors shrink when measurements are aggregated. Roger Boscovich and Pierre-Simon Laplace tackled the shape of the Earth using absolute deviations rather than squares, and Laplace's error model led him to a median instead of the mean he had hoped for.
Adrien-Marie Legendre published the first clear account of least squares in 1805, testing it on Laplace's data about the Earth's shape. Within ten years it had become standard in French, Italian and Prussian astronomy and geodesy, a remarkably swift adoption. Then in 1809 Gauss claimed he had used it since 1795, sparking a dispute over credit. An American, Robert Adrain, had meanwhile devised it independently in 1808.
Gauss's real advance was linking the method to probability. Asking what error pattern would make the average the best estimate, he arrived at the normal distribution. Laplace later justified the approach for large samples through the central limit theorem, and Gauss showed in 1822 that, under tidy conditions on the errors, least squares gives the best linear unbiased estimates, the core of what is now called the Gauss–Markov theorem.
Source: Least squares