# Dictionary:Least-squares fit

An analytic function that approximates a set of data such that the sum of the squares of the ‘‘distances’’ from the observed points to the curve is a minimum; an ℓ_{2} fit. (Usually implies deviation measurements along paths where *x*=constant; other criteria are sometimes used.) One must determine the functional form of the fit (whether linear, quadratic, etc.) and what is to be minimized to define the problem. For example, different velocity functions result depending on whether seismic time-depth data or velocity-depth data are fitted, or if the data are weighted or differently distributed in depth. Least-squares fitting is the same as the ℓ_{ρ} (q.v.) fit with *p*=2. The ℓ_{2} fit is the least-variance solution and corresponds to the maximum-likelihood estimate when the errors have a Gaussian (normal) distribution. The best ℓ_{2} estimate to a set of numbers is the average of the numbers.