0% found this document useful (0 votes)
8 views16 pages

Best Fit Line Calculation Examples

The document discusses methods for fitting straight lines to data using least squares, providing multiple examples with corresponding calculations. It outlines the normal equations used to derive the coefficients for the best-fit line based on given datasets. The examples illustrate how to compute necessary values and solve the equations to find the coefficients for linear regression.

Uploaded by

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

Best Fit Line Calculation Examples

The document discusses methods for fitting straight lines to data using least squares, providing multiple examples with corresponding calculations. It outlines the normal equations used to derive the coefficients for the best-fit line based on given datasets. The examples illustrate how to compute necessary values and solve the equations to find the coefficients for linear regression.

Uploaded by

palm131719
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Probability and St

a11st1cs
492
v A = log, o a and B = logiob.
where Y = log,o · .' are given by
The nonna I equation - ·
5

iY = mA + B'iX, i

i:XY Al:X + Bl:X a.,


~1,1 u +iii►,. A' s.1 .
- I d of least [Link], find the strai ght line that best Gts the
Example 1 : By the met io
follow ing data:
I 2 3 4 5
.\" l,J NTlJ ( H).June 2010, ,June 2011 (Set No. 2)1
y 14 '27 40 55 68
· I l line be .v = 0 o + a,x .. .. ( I )
Solution : Let the required stra1g,

The normal equati ons are I


2)
ma0 + a1 L-'"i = LY; ; + ao ,L.., X; , •2 _ , ,. \J.
a1L.., ,\ ; - L.., ",. ,
... (

The values of I x, L, Y, L / "! and L xy are calculated as fo ll ows:


,
2
X; Y; x, X;Y;

I 14 I 14
2 27 4 54
3 40 9 120
4 55 16 220
5 68 25 340
I x;= 15, L Y; = 204, I x/ = 55 and L, X;Y; = 748
Substituting these values in (2), we get
15a1 + 5a0 = 204
55a1 + I5a0 = 748

Solving, we get a0 = 0, and a 1 = 13.6 .

Thus the line of best fitting is y = l 3.6x . [Link]


1
Example 2 : d ro '
The temperatures T (in °c) and lengths L ( in -mm ) 0 ·t·.a )leate
given below. If L = a 0 + a 1 T, find the best values fo r a and a, .
T 20 30
u -
40 50 70
L 800.3 800.4 800.6 .8 00.7
60
801.0
-
800.9 - 1h'
~5 ti1
Solution: We require IT,IL,L 2
T and LT
L and these are coinpu tc d •

following table.
r
--
.....-
T L T2
TL
493

20 800.3 400 -
~
160()()
800.4 -
30 <JOO
240I ~
~

40 800.6 1600
~
32024
50 800.7 2500 40035
60 800.9 3600 48054
70 80 1.0 4900 56070
2
IT=2 70 L L = 4803.9 L T = 13900 ITL = 216201
\\"e haw the nomial equations

ma0 + a,L -'"; = LY; ... ( I ); 2


'°'
a0 "~ x,. + a, ~ xI = L r r
"'\"' -,_, ...Ln
Csing (1) and (2), we obtain
6a0 ... 27001 = 480r 9 and 270a 0 + l 3900 a 1 = 21620 I
Sol\'ing these equations, we get a 0 = 800 and a1 = 0.0146 ..

i#i11MiW Cer:nr ~iTn:al r~sIf::1 y arc given below

lf_r = a0 - a, x, find the approximation value s of 0 0 and a,.


fu/lutioo : We form the following table values :
2 .\)'
X y X

0 0
0 I
4 10
2 5
25 60
5 12
49 1-W -
7 20
7X y .\r == ~
I0
LX 14 LY 36 L x2 -

u~ing
norm al equations, we obtain
4 ao + 14u = 36
1
..• ( I )
and ... (2 )
14a0 +78 a1 = 2 10

'1))(1 4_ (2) . 336 -, XlJMi


x4 gives 16a 1 = 336 or u 1 = 16 - -·
From ( I ) --q
45
' 4ao == 36 - 14a 1 = 36 - 14 (2.8tJ66) = - . :i-
~ c,o == - I. I 38 1
ao -
- - l.!381 and a, = 2.896 6.
Probability and
Statistits

. for the fnll mv ing data


a!ll•dg■ ..
II fit ·1 [Link] 1111c
IP1mut
-
s-
- X H ') ')
-
10_
7 7 8 l,JNTU Sep 2008 (Set N
\'
" ~

5 5 4 5 4 3 4 3 3
- , o. ~
11
-
.
r
-
. 1 he equati on ol the straight Iine is Y = ax + h
J

Solution ·
Nnrma l equati ons ;lre :
Lr - aLx -I nb .. . ( I )

,- . , :... aix! + hlx ... (2)


"'·' ·'
- 11 l)Wtll b) t·,blc
In the lo (
1 t c rms. required in norma I equatmns.
we compute tie
.

.Y :c ' y xy
6 36 s 30
7 49 5 35
7 49 4 28
8 64 5 40
8 64 4 32
8 64 3 24
9 81 4 36
9 81 3 27
10 100 3 30
Lr = 72 I Ix1 = 588 LY= 36 LXY = 282
Substituting these values in ( l ) and (2), we obtain
36 = 72a + 9b ... (3)
282 = 588a + 72b ... (4)
(3) Y 8 - (4) gives
6 = - I 2a ⇒ <1 = 0. 5
From (3), 72(- 0.5) t 9h = 36 ⇒ 9b = 72 or b = 8
:. The req uired line is y = -0.5x + 8.
. ,,
E>.ampk 5: A ch . . l t11ll'
em1ca\ company, wishin g to study the effec t ol. t':\•(r':l(\lll
• .
l
: blt'·
. . .
the cl I1c1ency o ,· an extraction
. . 111 1
operation, obtained the data shown .Ill t he fo\lO'' Ill:-lSi' ~,~ ti
lJNTU 200.i scpI .
Extraction time minutes (x)
27 45 41 19 3 31
39 19 49 15
Eniciency (}1)
57 64 80 46 62 72 57 68
S2 77
Fit a stra ight line to the given data by the method of least squares.
495
the least squares o r strai ght line of yon y is y _
l'I. Le 1 / - Clo+ a,x
~I equation s are
· 113
JIS J1l)f l
. ~r : : Non + a, L \'
")

,1nd - ·
q 'l' :::: aoL + o,rx-
X y x2 XY
27 57 729 1539
45 64 2025 2880
41 80 168 1 3280
19 46 36 1 874
3 62 9 186
39 72 152 1 2808
19 52 36 1 988
49 77 240 1 3773
15 57 225 855
31 68 961 2 108
288 635 10274 1929 1

I X=288, IY = 635, rx 2 = 10274, rXY = 192 11 and N = 10


Substituting these values in the above normal equations, we get
635 = 10a0 + 288a ••• (I)
1
19291 =288a0 + 102 74a 1 ... (2)
To Gnd ao and a 1, solve these equations.
{] ) x 28.8 ⇒ 288a0 + 8294.4a 1 = 18288
(2) x I ⇒ 288a0 + 10274a 1 = 19291
- 1979.6 a 1 = - 1003
~ al = 0.5066
and a = -1 (635-288a1) ='- (635-145.9) = 48.9 1
·ri.. o IO 10
•nus the t st (0 ' 066)X.
ea square straight line Yon Xis Y === 48.91 + ·'
· Fit a straight line to the fo ll owing data
I 2 3 4
b . .8 3.3 45 63 . 2otl(SCl No,·'ll
eth . . 2010 (H) Dec.
S01 • od of least squares. IJNTU (A), (H) June '
~L
'W et Y = ao + a1x be the least square line.
e calculat
e tx, Ly, tx 2 , Ixy from the given data
Probability and S
tatistics

\" \' ,•h1


\' \'
. ' . ' I
' '
0 1 n 0
1 I.~ 1 \.8
"')
3.3 4 6.6
3 4.5 9 13 .5
4 6.3 16 25.2
,-X, - \l) ,~,. = \6 9 L./ = 30. L.x,y,
.- I . • I
= 47 .1
The normal equations are
... ( I )

a0 I.x; + o 1L..Yi = ,.
- ., ... (2)
L.,\·;.r;
Substinitin g the above values in (
I) and (2) , we get
Sa0 + 10a1 = 16.9 ... (3)
1000 + 3001 = 47. \ ... (4)
Solving (3) and (4) , we get a =
0 0.72 and a 1 = 1.33
Thus the line of best fit is y = a
0 + a 1x
i.e. y = 0.72 + I .33x

Example 7: Fit a stra ight line to the for


my = a + hx for the following data.
X 0 5 10 15 20 25
)' 12 15 l7 22 24 30
\J NTU May 2007, (H) 2010, Dec. 20 11 ,
(K) Dec. 20 I 5 (Set ~o. ~ll
Solutio n :

.,
XI Y; xi X; Y;
0 12 0 0
5 15 25 75
10 17 100 170
15 22 225 330
20 24 400 480
25 30 625 750
75 120 1375 1805
To fi1t a stra 1.g ht 1·me o1· t I1c 1·orm y = a + bx, we have the nonn 111
al [Link] as fotll ~·
L Y, = 11a + b I, x;
... ( \ )
,
L, X;.\'; = {I L X; + b L ·< ... (2)
fittin9
curie

Her~ /1 :::: 6, ~ --' == 75, LY; = 120, x~ = IJ? 5 ~-


~ '
'°'
' £...\Y; == 1805
497

6a , 75h - 120
r11us ... (3)
75a+ 1375/J = 1805
Jn 1 55h = 72.2
... (4)
. lving these equations, we get
t)n ~<' ....
J J .2862 and b = 0.697 1
0
. The fitted linear fom1 is y = 11 .2862 + 0.697 lx
iiWO@I: Fit a straight line to the data given below :
- X 1
..,
J 5 7 9
- \' 1.5 2.8 4.0 4.7 6.0
-
IJNTU 2008S, (K)Jun e 2009 (Set No.3)1
Solution: Let the required straight line be y = a + a x .
0 1

The \'alues of LX, LY, Lx 2 , Lxy are calculated as follow s.


,
x, Y, x; X; Y,
l l.5 1 l. 5
3 2.8 9 8.4

5 4.0 25 20.00
~t !'o. 4)1 7 4.2 49 29.4
9 6.0 81 54

Lx, = 25, LY,= 18.5, "f.x? = 165, "f.x, .\', = 11 3.3


The nonnal equati ons are
.. . (2l
,~,ao + a, L x, = LY, ... ( I )
Sunst'1l uting
·
the values, we get
S
uo + 25aI = 18 • 5 (
••• I) 25aU + I65a, = 1 I.'-:'I
" •
Solvin h
gt ese equations, we get a = 1.075, 0 , == O.)-.
--)~
11
Thus th ·
e hne of best fit is y a x ⇒ )' = 1.( >7~· HO·5~5).c Jcll hnving d:iW -
= a 0 -1
u..~ 1
-t /,r to 111c
3

-.._'8111 Fit the least square straight Iin~s Y == " ·


. . , 008 (Set NoA)I
-3 - 1 0 l 4 p Nl l1 ~
2
-0. l - 0.2 - 0.3 -0.3 O. I 0.4
Probability arid l\
y rJ8
498
\)la,. Cv
I t11 ,· l)C. 1hc lt.:asI .squa re I inc. '\
~olu rion : I c t ' - "n
' ·:1 lct1l ~11 cd as rio I low ..
s
. , \ Ll. ,·
,_, . a rc c ,
l he v:-iluc:- nl ,_ .

T
)
,, l II
\'I \'I-. \JI·

) 0.4 25 -2
-., ~
- 0. 1 9 - 0.3

I - 0.2 I 0.2
0 - O.J 0 0
I - OJ I - 0.3
2 0. 1 4 0.2
4 0 .4 16 0. 16
- -

rI 2 Ir-
• I
0 LX~
I
= 56 LXI-Y,-
I 2.04
~-

The nom,al equations are


ma0 + a 1Lr, = LY;
ao-, ",., - a I LrI 2 = Ix I Y;
Suhs,iruting ihe above va lues, we get

7o0 2a 1 = 0
... ( I )
2u0 -1 56 a1 = - 2.04
... (2)
- 2.04
Solving, u0 == -
194
= - 0.0 105

,:1nd 7
- (uo)
2
0.036~
·.1 ht· line' of bt'!>I Ii i i~ v "o I "i r
I \[Link]: IO : 0.0 I 05 0.0368 (x).
I i11ll rhc hi:~, li1t i11g strai ght line 10 th e data :

' I1~0.!II
IJNTU(A) Juue 200IJ (~"iC i,
1
!>.Ju1iu11 : I. cl J " " "1, he lhc lca, 1 "' Ilia re Iine . Ht're "' = 7 ·
l J1t' normal 1:qua 11011 !) cH\;

,,.
I

In the following table we comput e the terms req uired in nonnal equations.
r,
-
x,
- ,

I 'I r r, ,.,
' -
() 10 0 ()

5 14 _1"
) 70
10 19 100
--
190

15 25 225
-375-
:w 31 400 620
-
25 36 625 900
1--
-
30 39 900 11 70

Total : 105 174 2275 3325

Thus the nomrnl equations are

701, + 10501 = 174 .... ( I )

105011 + 2275a, = 3325 .... (2)

Ill>' IS- (2) gives

-700a, = - 7I5

715
:::) u1 = - = I .02 14 .,
700 -'

(IJ::::, 7uo = 174 - IOSa, = 174 - 105(1.0 2 143) = 174 - 107.25 = 66. 75

66.75
0
o~- - - = 9.5357
7
· 1s
· The line · y = a x + a i.e., y = 9.5357 1- 1.02 1-D x
1 0

"' I ' (l''tighl r .l 1111c' [ll tht'


<bilii · tlUWl•i l3y the method of least squares lind the.: heSL rtui g:... '
given below :
, 11 ( St•I No.411
x: S I() 15 20 25 p NTl l (:\IJUlll' - 00 .
y · I 19
. S 23 26 30
Sotut·
~ •on. L ' I 1·01.11 l I' ~ "11 f ' 'I ·\
--...:...:.. et the require d straight line bt: o l 1 1e ·

lne nonn aI equatio ns are


Illa +
a, Lx, == LY,

l
o
[/ \"'
ii '-l.·, +a ~ 2
I L.. x, == LX )I
' '
Fittin9
~~ . . 501
. t,·ng these values m norm al equations we ol'lt .
subsuru ' aIll
0 + I 398a2 = I 00, 80a0 + I 398a 1 + 26270
5t10 + 80 1 " 2 = 1684 ·,
+ 2627001 + 52 120202 = 30648
!398Oo
_ . 0 these equations, we get
SO 1\II 0 ::;

0
== - 8.72790 114 ~ a, = 3.009927929
n
a == - 0.0694955 14
:in d ,
The required equation is y = - 0.695x 2 + 3.0 lx - 8.728.
[,ampk 13 : Fit a second degree polynomial to the following data by the method or
least squares :

X 0 1 2 3 4
y 1 l.8 1.3 2.5 6.3
IJNTU 2008, 2008S, 2009, Nov.2009S, (A) May 2012, (K) Dec. 2015 (Set No. J)I
Solution : Let the required polynomial equation is y ::::: ar1;2 + ai-'" + a0 . The nonnal
equations are

LY, =mao + a1L X; + a2 L X;2

L ·\Y; = a0 L x; + a1L x; 2 + a2 Z: x/
I, x/y; = a0 Z: x/ + a :Z:x/ + a2 Z: x/ 1
The above values are calculated by means of the fo ll ow ing table.

- )
3 4 X;-Y;
XI· X·2 X; X;Y ;
Y; I
X;
0 0
0 I 0 0 0
1.8 1.8
I 1.8 I I I
2.6 5.2
2 1.3 4 8 16
7.5 22.5
3 2.5 9 27 81

-LX; 4

:::: 10
6.3

LY;
16

Ii x/ L X;
64
3
LX;
256
4
25.2
~.\"; _\',
::: J7. l
~
100.~
- -
~ .\"I ~ .I'I
== 1JO.>
- 12.9 30 )00 - 354 -

Substitur · 1et 1.,o 1


Sc, tng these values in normal equau ons, we g + 354a: ~ ., ··
r1 1- )0 3oa11 + I 000 I
a1 + 30a1 = 12.9, 10a + 30a + l 00a~ == 3?. l ; == o.55.
Solvin - . o , - - 1.07 and "2
: g these equations, we get a 0 = l .42, 0 1 -
. i hr, o•n - . . • - - - ? I
7
f\"7 , . -I- I .4- .
'
Probability and Statistics
502

Example 14:
l3 y ihc mdhocl nr lcasl squares fit a parabo la o f the fonn
I IJ.\" + (T · r1r the foll mvin
(
- ,..,u da ta :
:'\ . 'l -1 6 8 10
.. -
v: 3.0 7 12.X5 J 1.4 7 57. 38 ') 1.29
~
-
l,JN1ll2008,{H).Junc2011, (K).J une20 15 (SctNo. )1
4
2
Solution : 7-1,c '"'PqLiation
~
o f the 1rnrabola is Y = a + hx + c:x ... ( 1)
Norm:il equa ti ons are
I ,, = mo + h LX _._ c "i.x ~ .. . (2)
L X\' - al:.,· + h'f.x~ + cLr' .. . (3)
L.\' ~ \' = (I L\'~
, + b LX 1 + C LX4 ... (4)
y
,
.,1· -
X x~ x' Xl -~V

2 ~ 8 16 3.07 6. 14 12.28
-1 16 64 256 I 2.85 5 1.4 205.6
6 36 216 1296 3 1.4 7 188.82 1132.92
8 64 512 4096 57.38 459.04 36 72.32
10 100 1000 10000 9 1.29 9 12.9 9129
Y't = 30 ~x~ = 220 LX 1 = 1800 LX4 = 15664 Ly = 196.06 LX\' = 16 18.3 >r2 v = 141 52.12
Substituting 1he above values in (2 ), (3) and (4), we obtain
196.06 = 5a + 30b + 220c ... (5)
161 8.3 = 30a + 220b + 1800c ... (6)
141 52. 12 = 220a + 1800b + 15664c .. . ( 7)
(5) / 6 ~ 30a + 180/J + 1320c = 1176.36
(6) / I ~ 30a + 220h + 1800c = 1618.3
Subtracting -40b - 480c = - 441 .94
... (8)
(6) , _ 7.333 ~ 220a + 16 13.26/, + 13 199.4c = 11 866.99
(7) / I ~ 220a + 18001> t 15664c = 14 152. 12

Subtracting - 186. 74b _ 24 64 _6 c = _1


2285 3 ... (9)
(8), 40h 1 48Uc = 44 1.94
(9), 18(,.74/J + 2464 .6(' = 2285 . I J
(8) / 4.668 => 186.74h 1 ? 24 () 64
- · c ::::: 2062 9
(9) x I ~ 186.74/J + 2464 .6c -== 2285: 13

Subtracting - 223.96c ::::: _ _


222 23
⇒ C == 0.9922
From (8) ⇒ 40b = 441.94-476 ? _
·- 56 - - 34 3 I 6
~ b = -0.8579 .
rr f ittif19 503
c~""e
S) ::, Sa 1- 30h ~ 220c - 190 .06
f r1ltll (
:=, 5a = 196.06 I 25.737 218.284 - .J.5 I J
::, 0 = - 0.7026.

79.r + 0_9922x2
Thus equation of the parabola is y == 0.7026 - 0.85
nd degree to the data noi · ·
Example IS: Fit a poly nomial of seco , . 111sg,vcn rn the folio"--

111g1,1hk:
X 0 1.0 2.0
\' 1.0 6.0 17.0 l,JNTU ( A) Dec. 20 11 , May 20 12 (Set No. -4)!

Solution : We require the qua ntitics I X;,L I x/ ,I x/, LY,. I x,v, and
2
X; ,

l r/.r. These are computed in the fo llow ing table.


,
3 •4
X; Y; xI.-'J X·I -\; X;Y, X; - Y;

0 I 0 0 0 0 0

6 1 I I 6 6
1

17 4 8 16 34 68
2
1

rx. LX~ J
LX~I L.\"'·/.V·I I..r:-I . \'·I
LY; I Lr=-I I

= 9 = 17 = 40 = 7-+
= 3 ::: 24 = 5
Lsing norm al equations, we get the equations
170~ = 7-i
30u + 3a + 5a = 24 ; 3a + 5a1 + 9a 2 = 40; Sao + 9a, +
1 02
and a~ = 3 ·
Solving these equations, we get a 0 = I, a 1 = 2
· . . . . , -2 From the gi ven data pomts
Th = I + 2., + -'·' ·
.. e required polyno1111al 1s then give n by y
II rs seen th h.1s polynomial fi tting as "exact .
"
at t
• • - - • t n ~ w the foli o,, ing da1:1
• 1 h., · -
b.:11npt1: J<, • f 11 a paraboh ot the lorm \I - "
' 5 6 7
-
I 2 J 4
X )4. ➔

y 2.3 5.2 9. 7 16.5 29.4 }5.5


..
-
loi,• . .2

2.3 9.7 5.2 16.5


y
r <' \ "
(/ l h.
r
r: a parabola o 1· 1I1c 1·Ill·111 .I'
I !ere n -- 7 1·o 111
• s are
Nonna! equa tion
2
Ly == na , h'f.x + c'f.x
txy == aLx + h'f.x2 I- c'f.x 1
504
. to get the equatio ns of parabol a
Solve the three equauon s
Let X == x- 4
Normal cqua t"on s ca n he written as
' . '
Lr = nil -I h'fX ' crX2 ... ( I )

IX_r == aLX + b'fX2 + c'fX 3 ... (2)

== a'fX2 + b'fXJ + c'f X,i ... ( 3)

X V X x2 x1 X -t Xy X 2y -

1 2.3 -J 9 - 27 81 6 .9 20.7

2 5.2 -2 4 -8 16 - 10.4 20.8


"'
.) 9.7 -1 I - 1 I - 9.7 9.7
4 16.5 0 0 0 0 0 0
5 29.4 I I I I 29.4 29.4
6 35.5 2 4 8 16 71 142
7 54.4 3 9 27 81 163.2 489.6
Total 153 0 28 0 196 236.6 712.2
=LY =LX =IT2 =LXJ = ll4 =IXy =[X ~y
Substituting these values in equations ( I), (2) and (3), we get
?a + 28c = 153 ... (4), 28b = 236.6 ... (5), 28a + 196c = 7 12.2 ... (6 )
From (4), (5), (6) a = 17.0857 , b = 8.45, c = 1. 1928
Substituting these values in

y = a + hX + cX 2 = a + b (x - 4) + c (x - 4 )~
2
= cx -I x (b- 8c) + (a - 4b 1- t 6c)

= l.l 928.x2 + x(8 - 45 - 8( 1. 1928) + 17.O857 - -H 8...t5) r- l oll -~11_'S',


= I . I 928x2 - ( 1.0924 )x + 2.3705
The required equation of parabola is 1. 1928 x~ 1.09~-h + ~.3 705.
Eumple 17 : Fit a parabola of the form . d·tW·
l' _ " -I hx + ex~ 10 the followuig ·

I; I I 23
1
s2
2

Solution : Let the parabola be y ==a+ bx + cx2


3
I I :5 I
97 I 2:.4 3:.5 I5:~
-- x.I Y;
23
)
X; x~
I ,-~
. I
X;Y; 2
.....,
I I I x, Y,
I
2 5.2 4 23
23
-
8 16
9.7 9 10,4
3 27 20.8
81 29. 1
4 16.5 16 64 87.3
256 66
5 29.4 25 125 264
625 147
6 35.5 36 216 735
1296 213
7 54.4 49 1278
343 2401 380.8 266S.6
28 173.7 140 784 4676 869.3 S073.7
Here [Link] = 28, [Link]= 173.7, 'i..x; = 140, LYt == 784, u;
= 4676 , Ix,y,=
8693
_
and ':.x;y; ==5073.7 (Here a = a , b = al' c; a )
0 2
Substituting these values in normal equations, we get
7a0 + 28a 1 + 140a = 173.7
2 ... (I )
28a0 + 140a 1 + 784a ;
869.35
2 ... (2)
l40a0 + 784a 1 + 4676a - 5073.7
2 ... (3 )
Solving ( I) & (2), we get
28a1 + 224a2 = 174.5 ... (4)
Solving (1) & (3), we get 224a + l 876a = 1599.7 ··· (S)
1 2
Solving (4) & (5), we get b = a = - 13. 16785 and a2 = 2.425 =c
1
and a= a0 = 28.98568
:. The required parabola is y = a + bx + cx2
i.e., Y == 28.98568 - l 3.1 6785x + 2.425x2• .
[Link] e 18 F.1t a curve f I ~ . .1 t· the followmg data.
o t 1e orm y - a + In + n or
30 35
....X 10 15 20 25
~0.5
-y

Sotutio L
35.3 32.4
~ et the required polyn omta 1 e .l - •
29.2
b , - "
26. l
+ bx 1
- .
c,
.,
- ·
23.2
-
then 0
1lnal equati ons are
ty -
; - tna + bI. x . + CL x?
I I

tx;Y;:::c atx . + bI. ? +er. -?


I X1 X1 .
t x2 y
; ;:::c atx? + b I. ...~ + cI.x-4 . ol· l I11.:, 1<,lk>" ,ng.
1ne re ' .,, , d h)' rnt:nn:-
. 1·11e
table: quired terms in the norma l equati..ons are ca1cl 1 ,
Probability and S .
lat,sti~
506
-l
- XT
) )
,l j X; X; Y; x?
I y.

----
~

, \" I I
X;
100 1.000 10,000 353 3,530
10 35.J
225 3,375 50,625 486 7,290
IS 32.4
400 8,000 16,000 584 11 ,680
20 29.2
625 15,625 3,90,625 652.5 .16.3 12.5
r
_) 26. 1
900 27,000 8 1,000 696 . 20,880
30 23.2
225 42,875 15,00,625 7 17.5 4,612.5
35 20.5
~

Iv .= I .r IJ = I •r3I - Lx~I 1:x.I y I. I "~ y -


I x; = , I
• I I

135 166.7 2,475 97,875 20,48,875 3,489 64,305


a ( 6) + b ( I 35) + c ( 24 75) = I66. 7 ... ( I )
0 (2475) + h (97875) + c (2048875) = 64305 ... (2)
n ( 135) + b (2475) + c (97875) = 3489 .. . (3)
Now we have to solve ( I). (2) and (3) for the values of a, band c.
(i) ( l ) x 1 35 ⇒ 22504.5 = 8 10a + I8225b + 334 125c
(J) x 6 ⇒ 20934 = 8 10a + 148506 + 587250c
Subtracting 1570.5 = 3375b - 2531 25c ... (4)
(ii) (2) x 6 ⇒ 385830 = 14850 o + 587250 b + 12293250 c
(I) x 2475 ⇒ 4 12582.5 = 14850 a + 334 I 25 b + 6 125625 c
Subtracting - 26752.5 = 253 126 b + 6 167625 c ... (5)
(iii) (9) x 253 126 ⇒ 397534383 = 85430250 h - 640725 18750 c
(5) x 3375 ⇒
- 902896875 = 854300250 b + 20815734375 c
On Subtraction, 1300431258 = - 84888253 I 25 c or r. = - 0.01532
From (4), 3375 b = 1570.5 + 253125 ( -0.0 I 532)

=1570.5-3877.825 = -2307.375
-2307.3 75
⇒ b= 3375 =-0.683 7
Substituting b, c in equation ( I ), we get
6a = 166. 7 - 135 (- 0.6837) + 2475 (- 0.0 )
1532
= 166.7 + 92.2995 - 37.917 =:.. 22 l.0825
⇒ a= 36.847 1

:. The required curve is Y == 36.847 1-0.6837x-0.01532.r2


filling
507
r/- - Fit a parabola to the data given below
X I 2 J 4 5
-
''. 10 12 8 10
-14
. - l,JNTU 2008 (SN No I
. . Let the equation of the parabola be l' = r, 2 + h , · )I
~ . . ,x ., + c ... ( I)
The normal equations are
1.r == aL x 2 + hI x + nc ... (2)
3 2
, n = a 'f, x + bI x + c I x
t., . . .. . (3)
,-t., .,.~v
'
= a'f, x 4 + bI x 3 + cI x 2 ... (4)
The above values are computed by means of the following table.
, x-' x-l
J
x- y xy x2y
- I I 1 1 10 10 10
- 1
- 4 8 16 12 24 48
~
J 9 27 81 8 24 72
4 16 64 256 10 40 160
5 r
_) 125 625 14 70 350
~x = 15 LX~ = 55 u 3 = 225 Ix4 = 979 'f,y = 54 LXV = 168 Lr2y = 640

Suhstituting these values in normal equations, we get


54 = 55 a + 15 b + 5 c ... (5)
168 = 225a + 55b + 15 c •·· (6)
640 = 979 a + 225 b + 55 c •·· ( 7)
(5) x 3 ⇒ 162 = 165a+45b + 15c
(6) ⇒ 168 = 225a+55b+ 15c
Subtracting, -6 = - 60 a - I 0 b
.. . ( 8)
==> 60 a + I 0 b =6
(G) / 55 ⇒ 9240 = 12375 a + 3025 h + 825 c
(7J / IS ⇒ 9600 = 14685 a + 3375 b + 825 c
Subtra Cling,
·
- 360 = - 23 10 a - 350 b
==> 23 10 a + 350b = 360
( 8 ) ✓- 3s ==> 2 100a + 350h = 2 10
(9 ) ==> 23 10 a + 350 h = 360

Subtracting,
- 2 10 a = - 150

a =0.7 14
Probability ~
sos ario .
J~
6 :> 42. 84 -t IO h - 6
<,O ( ().7 14) • I O />
V,.84 -> h 3.68 4
---> JOh

1 n,m 1,). "c 111,,·c


5::;1 0.7 14) -L 15 ( 3.684) J Sc = 54

c_s.26 + S c = 54 ::> - 15.99 + Sc = 54


_, }Q.27 .1
Sc - 69.99 ==> c - I J.998
The required equation of parabola is y - 0.7 14 x 2 - 3
.684 r 13.99R -1-

Fit the least square parabola y = a + bx+ cx 2 to the data

t t - l l = - 2. _I (0) =I. ./ (I) = 2./( 2) = 4 l,JNTU (A).Ju ne2009 1\t, ,


Solution : We write the data in tabular form
(
,\ -l 0 I 2
.... "I
- 1 - 4
'
Let the required poly nomial be y =a+ bx + cx 2
... . (I)
Vi e ha, e the nonn al equa tions
~ •1 = ma ~ b L xI + c '/_ .,r I2 1•
~ .1 .1

=ui x, ..- hLx;+c Lx~;
I
\ • ,- , 3
- X .I = uL.. x,- + I, L X + C ' X -I
L I I
fheabo
,e vaIues are calcu lated by means of th f II
e 0 owmu:::, ta bl t' .
..l 'l
' ), x- rJ ,
' .' \. -1
• I X 1· x,-_r,
-I 2
I, I

I - I I
u I 0
-
")
-1
0
I ")
0 0 0
I
I I ...,
'
-1
-I
4
-1
8
L-' -'1 L.1 s LX~ -6 lo ~ lb
-
~ .

\ub~111u1 111g lh t: l)i:, . I


'
i:I \It: l)
-~ 1
L x, = x L r"'
'
,~ )' \ I '
I I
,~ \
,
\ ,- I ...; 1(1
--
111 nor111al . .
-lu ~ !I> ' <,, 'I l:l1llat1u11 s, w1..· gl'l
!.<1 ~ 6/J ' ~( 12 ... ( I )
(w ➔ ~b ➔ I ~c I<, ... (2)
(I) <2)-" 2 gi ves ... (3)

- I Oh - I Oc = _ 19
> I ()/, ♦ I Uc- = 19
.... (4)

You might also like