# Curve Fitting and Method of Least Squares

Curve Fitting:

Curve fitting is a process of introduction mathematical relationship between dependent and independent variables in the form of an equation for a given set of data.

Method of Least Square:

The method of least square helps us to find the values of unknowns $a$ and $b$ in such a way that following two conditions are satisfied.

• The sum of residual (deviations) of observed values of $Y$ and corresponding expected (estimated) values of $Y$ will be zero. $\sum \left( {Y - \widehat Y} \right) = 0$.
• The sum of squares of residual (deviations) of observed values of $Y$ and corresponding expected values ($\widehat Y$) should be least $\sum {\left( {Y - \widehat Y} \right)^2}$ is least.

Fitting of a Straight Line:

A straight line can be fitted to the given data by the method of least square. The equation of straight line or least square line is$Y = a + bX$, where $a$ and $b$ are constants or unknowns.

To compute the values of these constant we need as many equations as the number of constants in the equation, these equations are called normal equations. In straight line there are two constant $a$ and $b$ so we required two normal equations.

Normal Equation for ‘a       $\sum Y = na + b\sum X$

Normal Equation for ‘b       $\sum XY = a\sum X + b\sum {X^2}$

Direct formula of finding $a$ and $b$ is written as