Curve fitting is the process of introducing mathematical relationships between dependent and independent variables in the form of an equation for a given set of data.
Method of Least Squares
The method of least squares helps us to find the values of unknowns and in such a way that the following two conditions are satisfied:
- The sum of the residual (deviations) of observed values of and corresponding expected (estimated) values of will be zero. .
- The sum of the squares of the residual (deviations) of observed values of and corresponding expected values () should be at least .
Fitting of a Straight Line
A straight line can be fitted to the given data by the method of least squares. The equation of a straight line or least square line is , where and are constants or unknowns.
To compute the values of these constants we need as many equations as the number of constants in the equation. These equations are called normal equations. In a straight line there are two constants and so we require two normal equations.
Normal Equation for ‘a’
Normal Equation for ‘b’
The direct formula of finding and is written as