Method of Least Squares:
If the approximating curve is indicated by f (x) and the given data by (xi, yi) the error is
ei = yi - f (xi)
The one criterion to attain the best fit curve is to minimize ∑ ei. Since errors can tend to cancel out and a better criterion would be ∑ | ei |. It is not an easy condition as this can yield several interpolating curves. Generally this approach yields a unique curve that provides a good representation of the given data (if the approximating curve is correctly chosen). In a most commonly utilized approach the addition of squares, S is minimized. The expression for S considering n data points is
For instance: Daily ambient temperature variation is sinusoidal function.
Calibration curve of orifice meter is a parabola.