Curve Fitting
Curve Fitting
e1= y1 - f(x1), e2 = y2 - f(x2 ). e3= y3- f(x3) ……. en= yn - f(xn). These errors e1,e2,e3,……en, may be either positive
or negative. For our convenient to make all errors into positive to the square of errors.
i.e e12,e22,……en2. In order to obtain the best fit of curve we have to make the sum of the squares of the errors
∑ y = na + b ∑ x
∑ xy = a ∑ x + b ∑ x2
solving these two normal equations we get the values of a & b ,substituting
these values in the given straight line equation which gives the best fit.
Fitting of Parabola
By using the principle of least squares for solving the parabola, The normal equations are
∑ y = na + b ∑ x + c ∑ x2
∑ xy = a ∑ x + b∑ x2 + c ∑ x3
∑ x2y = a ∑ x2 + b ∑ x3 + c ∑ x4
logey = logea + logee bx => logey = logea + bx logee => logey = logea + bx
Y = A+ bx
This is in the form of straight line equation and this can be solved by using the straight line normal equations
we get the values of A & b, for a =eA, substituting the values of a & b in the given curve which gives the best
fit.
Exponential Curve
The equation of exponential curve be of the form y = abx
taking log on both sides we get
log ey = log ea +log ebx
Y = A + Bx
where Y= logey, A= logea , B= logeb
This is in the form of the straight line equation which can be solved by using the normal
equations we get the values of A & B for a = eA
b = eB substituting these values in the equation which gives the best fit.
Fitting of Power Curve
Let the equation of the power curve be y = a xb
Taking log on both sides we get
log ey = logea + log exb
Y = A + Bx
This is in the form of the straight line equation which can be solved by
using the normal equations we get the values of A & B, for a = eA b= eB,
substituting these values in the given equation which gives the best fit.
THANKS FOR PAYING ATTENTION
e-Mail: [email protected]