Curve Fitting ST Line and Parabola

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

Module No : 4

Curve fitting and Statistical methods


Topic: Curve fitting
Department of Mathematics
Acharya Institute of Technology

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

•   relevant table is as follows


The
P Y PY
100 0.45 45 10000
120 0.55 66 14400
140 0.60 84 19600
160 0.70 112 25600
180 0.80 144 32400
200 0.85 170 40000
=900 Y=3.95 =621 =142000

The normal equations become


6a+900b=3.95
900a+142000b=621
On solving (using calculator) we have
a=0.047619047 0.0476 ; b=0.0040701429 0.0041
Thus the required law is Also when P=150,Y=0.66260.66 5
3. Find the equation of the best fitting straight line for the following data and hence estimate the
value of the dependent variable corresponding to the value 30 of the independent variable.
x 5 10 15 20 25
y 16 19 23 26 30

•   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

The normal equations associated with are as follows

•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

>> The normal equations associated with are as follows

(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

>>The normal equations associated with are as follows

(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

•  Find the best values of a,b,c if the equation is to fit most


3.
closely to the following observations.
x -2 -1 0 1 2
y -3.150 -1.390 0.620 2.880 5.378

>>The normal equations associated with are as follows

(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

•   normal equations become


The
5a+10c=4.338 …………. (1)
10b=21.326 Hence b = 2.1326
10a+34c=10.402 ………….. (2)
On solving (1) and (2) (using calculator) we have,
,
Thus the best values a,b,c for fitting the parabola are

12

You might also like