Curve Fitting ST Line and Parabola
Curve Fitting ST Line and Parabola
Curve Fitting ST Line and Parabola
1
Curve Fitting
This is a method of finding a specific relation connecting the dependent and independent variables
for a given data . Such a curve is called the curve of best fit.
•Curve
fitting by least squares method
Curve fitting is a method of finding a suitable relation in the form of for a set of
observed values …..n .Such a relation connecting is known as empirical law.
This relation is most suitable for predicting the value of for a given value of .The method of
least squares is as follows.
Suppose is an approximate relation that fits into a given data comprising ,
i=1,2,3,……..n then are called observed values and are called expected values.
The method of least squares provides a relationship
Now we discuss 1) Fitting of a straight line
2) Fitting of a second degree parabola
3) Fitting of the curve of the form
2
Fitting of a straight line
Consider a set of ‘n’ given values for fitting the straight line where are parameters to be determined. If then the
normal equations are and
Problems : 1. Fit a straight line for the following data.
X 1 3 4 6 8 9 11 14
y 1 2 4 4 5 7 8 9
>> The normal equations for fitting the straight line are
Here n=8
x y xy
The relevant table is as follows 1 1 1 1
3 2 6 9
4 4 16 16
6 4 24 36
8 5 40 64
9 7 63 81
11 8 88 121
14 9 126 196
=56 =40
3
• normal equations become
The
56a+8b=40
524a+56b=364
On solving (using calculator) we have
a=0.636363636 ̴ 0.64 ; b=0.545454545 ̴ 0.55
Thus by substituting these values in we obtain the equation,
2. A simply supported beam carries concentrated load P at its mid point . Corresponding to various
values of P the maximum deflection Y is measured and is given in the following table . Find a law of the
form Y and hence estimate when is 150
P 100 120 140 160 180 200
Y 0.45 0.55 0.60 0.70 0.80 0.85
4
>> The normal equations associated with are as follows.
𝞢PY=a𝞢P + b𝞢 Here n=6
• Let be the equation of the best fitting straight line. The associated normal equations
>>
are as follows and 𝞢xy= ax (n =5)
The relevant table is as follows
x y xy
5 16 80 25
10 19 190 100
15 23 345 225
20 26 520 400
25 30 750 625
=75 =114 =1885
6
The normal equations become
75a+5b=114
1375a+75b=1885
On solving (using calculator) we have
a=0.7 ; b=12.3
Thus by substituting these values in we obtain the equation of best fitting straight line in the form
Also given x=30 , putting this value in above equation we obtain
7
Fitting of a second degree parabola
Consider a set of n given values for fitting the curve
•Problems:
1. Fit a second degree parabola in the least square sense for the
following data and hence estimate y at
x 1 2 3 4 5
y 10 12 13 16 19
(n=5)
8
The relevant table is as follows
• x y xy
1 10 10 10 1 1 1
2 12 24 48 4 8 16
3 13 39 117 9 27 81
4
4 16
16 64
64 256
256 16
16 64
64 256
256
5
5 19
19 95
95 475
475 25
25 125
125 625
625
=15
The normal equations become
55a+15b+5c=70
225a+55b+15c=232
979a+225b+55c=906
On solving (using calculator) we have
a=0.2875 0.29 ; b=0.4875 0.49; c=9.4
Thus the required second degree parabola is
Also at we get
9
2.Fit a parabola for the data
(n=5)
x
y
0
1
1
1.8
2
1.3
3
2.5
4
2.3
The relevant table is as follows
x y xy
0 1 0 0 0 0 0
1 1.8 1.8 1.8 1 1 1`
2 1.3 2.6 5.2 4 8 16
3 2.5 7.5 22.5 9 27 81
4 2.3 9.2 36.8 16 64 256
=10
10
The normal equations become
5a+10b+30c=8.9
10a+30b+100c=21.1
30a+100b+354c=66.3
On solving (using calculator) we have
a=1.0771 , b=0.4157 , c= -0.0214
Thus the parabola of fit is
(n=5)
11
The relevant table is as follows
x y xy
-2 -3.15 6.30 -12.60 4 -8 16
-1 -1.39 1.39 -1.39 1 -1 1
0 0.62 0 0 0 0 0
1 2.88 2.88 2.88 1 1 1
2 5.378 10.756 21.512 4 8 16
=0
12