0% found this document useful (0 votes)
11 views10 pages

Curve Fitting

The document discusses the concept of curve fitting, which is the process of establishing a mathematical relationship between two variables using experimental data that may contain errors. It explains the method of least squares to minimize the sum of squared errors to achieve the best fit for various types of curves, including straight lines, parabolas, exponential curves, and power curves. The document provides the mathematical equations and methods for fitting these curves using the principle of least squares.

Uploaded by

saurabh82somya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views10 pages

Curve Fitting

The document discusses the concept of curve fitting, which is the process of establishing a mathematical relationship between two variables using experimental data that may contain errors. It explains the method of least squares to minimize the sum of squared errors to achieve the best fit for various types of curves, including straight lines, parabolas, exponential curves, and power curves. The document provides the mathematical equations and methods for fitting these curves using the principle of least squares.

Uploaded by

saurabh82somya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Curve Fitting

DR. HEENA SHARMA


E6398
ASSISTANT PROFESSOR DISCOVER . LEARN . EMPOWER
CSE
Introduction
In interpolation, We have seen that when exact values of the function Y=f(x) is given we fit the
function using various interpolation formulae. But sometimes the values of the function may not be
given. In such cases, the values of the required function may be taken experimentally. Generally
these expt. Values contain some errors. Hence by using these experimental values . We can fit a
curve just approximately which is known as approximating curve. Now our aim is to find this
approximating curve as much best as through minimizing errors of experimental values this is called
best fit otherwise it is a bad fit. In brief by using experimental values the process of establishing a
mathematical relationship between two variables is called CURVE FITTING.
Method of Least Squares
Let y1, y2, y3 ….yn be the experimental values of f(x1),f(x2),…..f(x n) be the exact values of the function y=f(x).

Corresponding to the values of x=xo, x1, x2 …. x n .

Now error = experimental values – exact value.

If we denote the corresponding errors of y1, y2,….yn as e1,e2,e3,…..en , then

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

as much minimum I.e e12+e22+……+en2 is minimum.


Method of Least Squares

Let S=e12+e22+……+en2, S is minimum. When S becomes as much as


minimum. Then we obtain a best fitting of a curve to the given data, now to
make S minimum we have to determine the coefficients involving in the
curve, so that S minimum. It will be possible when differentiating S with
respect to the coefficients involving in the curve and equating to zero.

Dr. Heena Sharma, Asst. Prof., CSE, Chandigarh University


Fitting of Straight Line
Let y = a + bx be a straight line
By using the principle of least squares for solving the straight line equations.
The normal equations are

∑ 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

Let y = a + bx + cx2 be the parabola or 2nd degree equation.

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

solving these equations, we get the values of a, b & c.


substituting these values in the given parabola which gives the best fit.
Fitting of an Exponential Curve
The exponential curve of the form: y = a e bx

Taking log on both sides we get

logey = logea + logee bx => logey = logea + bx logee => logey = logea + bx

Y = A+ bx

Where Y = logey, A= logea

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

Please Send Your Queries on:

e-Mail: [email protected]

You might also like