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

Curve Fitting and Least Squares Principles

Uploaded by

rahulkumar150582
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)
11 views26 pages

Curve Fitting and Least Squares Principles

Uploaded by

rahulkumar150582
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

CHAfYrER NINE

Curve FittingandPrincipleo!
LeastSquares
9·1. Curve Fitting. Let (x., Yi) ; i = I, 2, ... , n be a given set of n pairs
of values, X being independent variable and Y the dependent variable. The
general problem in curve fitting is to find, if 'possible, ail analytic expression
of the form Y ==1 (x), for the functional relationship. suggested by the given data.
Fitting of curves to a set of numerical data is of considerable importance-
theoretical as well as practical. Theoretically it is useful in the study of correla-
tion arid (egressjon, e.g., lines of regression can be regarded as fitting of linear
curves to the given bivariate distribution (c.c. § 10·8'1). In pfactical statistics .it
enables us to represent the relationship between two var~bIes by simple al-
gebraic expressions, e.g., polynomials, exponential or logarithmic functions.
Moreover, it may be used to estimate the values of one variable which 'would
correspond to the specified values of the other variable.
9·1·1. Fitting of a straight line. Let us• consider the 'fitting of a straight
line
Y=a+bX ...(9,1)
to a set of n points (x.. Yi) ; i = 1,2, ... , n. Equation. (9·1) represents a family of
straight lines for different values of the arbitrary constants' a' and :b' . The problem
is to determine 'a' and 'b' so that the line (9(1) is the line of " best fit ".
. The term 'best, fit' is interpreted in accor~ce with Legender.'s principle
of least squares which consists in minimising the sum of the squares of the
deviations of the actual values of y
from their estimated values as given
'by the line Of best fit.
Let Pi (Xi. Yi) be any general
point in the scatter diagram (§ 10·2).
Draw Pi M 1. to x-axis meeting the
lin~, (9·1) ilJ Hi: Abscissa of Hi is
Xi and since H;. lies on (9·1), [Link]-
dinate is a + bx i. Hence the 'co-or-
dinates 'of Hi are (Xi. a + bXi).
piHi=PiM-HiM
=Yi-(a+bxi),
-O~-------M~---------~X
is Called the error of estimate .or the
residual for Yi.
According 'to the principle of,
Fundamentals of Matbematical Statistics

least squares, we have to detern1ine a and b so that


. n 2 n 2
E= L PH· = L (y.-a-bx.)
;=1 1 1 ;=1 1 1

is minimum. From the principle [Link] and minima, the partial derivaUves of
E, with respect to (w.r.t.) a and b should vanish separately, i.e .•
aE' n BE n
-=0=-2 L (y.-a-bx,) and-=O=-2 L x.(y.-a-bx,) ... (9'2)
Oa ;=1 1 1 Bb ;=\ 1 1 1

n n .n n n 2
=> .L Yi
1=\
=na + b .L X;
I=\'
and .L xiY;
1=\
=a .L x; + b .L Xi
1=1 1=\
... (9'20)

Equations (9'2) and (9'2a) are:known as the normal equations for estimating
a and h.
'n n 2 n n
All the quantities L x; E x;, L y; and L x;Y;, can be obtained from
;=\ ;=\ ;=\ ;=(

the given set of points (x, Yi); j = .1, 2, ... , nand .the equations (9'2a) can be
solved for a and b. With the values of a and b so obtained, equation (9'1) is
the line of best fit to the given set of poin~ (Xi' Yi); i = 1, 2, ... , n.
Remark. The eqmllion of the line of best. f\t of Y on x is obtained on
eliminating a clOd b in (9' !) am) (9'2a) and can be expressed in the determinant
forlp as follows:

y X
. LY; LX; n ~O ...(9·2b)
LX;Y; LX; LX;
9-1-2. Fitting of second degree I)araboln. 'Let
Y = a + hX + e}{2 ... (9'3)
be the second degree parabola of best fit to set of n points (Xi' Yi); i = 1, 2, ... ,
n, Using the principle of l¥ast squares, we have to determine the constcints 0,
band e so that
2 ~
n
L (v-I -a-bx.1 -ex·1
E= ;=( r
is mininuun.
Equating to zero the partial derivatives of E with respect to a, h clOd c
separately, we get the normal equations for estimating Q. band c as

BE • 1 -a -bx.1 -cx1 )
fJa = 0 =..,..2 L(y.
2

DE 2
-Db = 0= -2 LX.(y. -a~bx· -ex·1 )
1 1 1
...(9,4)
0: = = 0 -2 L xi(Y; -a-bx; -cxi>
Curve Fittillg IIl1d Prilldple of lellst Squares 9·3

L: .V, ;: na + b t X" + c L: x.2


~ L: Xi Yi = a L: Xi " b L: xl + c L: x/ ... (9·4a)
,.
, .,Y = a L: x2, + b L: x3, + c L: x4.
L: x2
summation taken over i from I to n.
For given set of points (Xi' Yi); i = 1,2, ... , n, equations (9'4a) can be solved
for a, band c, and with these values of a, band c, (9'3) is the parabola of best
fit.
Remarl<•. Eliminating a. band c in (9'3) and (9'4a), the parabola of best fit
of Y on X is given by

y X2 X
LYi LX~I LXi n
=0
LXiYi LX~I LX~I LXi ... (9·4b)
LX; Yj LX4I LX3I LX2I

9·1·3. Fitting of Polynomiul of kth Degree. If


}' -
- ao + a 1 ."-v +• a 2 •'\"2 + ... + ak .~vI. ... (9'5)
is the kth degree polynomial of best fit to the sct of points (Xi' Yi); i = 1.2, ....
n. the constants ao, a l • a2 , ... , ak are to be obtained so that
n . 2 I; 2
E = L. (yj -aO -aJxj -a2 xj - ... -al; Xj )
J=}

is minimum. Thus the normal: equations for estimating ao, aI' .... ak are obtained
~n equating to zero the partial derivatives of f
w.r.t. ao, ai' ... , ak separately,
I.e.•
BE 2 I:
-;-- =0 =-2 L(Yi -ao -aJ Xj -a~ Xi - ... - al;xi )
vao
aE 2 I;
--=0=-2 LXj(Yj-aO-a J Xj -a2 Xj - ... -al;xj )
aaJ ... (9'6)
BE k 2 I;
-;--=0=-2LXj (Vj-aO-a J xi -a2 xj - ... -al;xj )
val;
~

LY; = nao +aJ L'C; +a~ "Ex? + ... + ak '[Link] }


L XjY; = a o L.'Cj + a J L.t; +a2 L.'C: + ... + ak 'txf+J
... (9·6a)
L xtYj = ao rxt +aJ L.'Ct+ J +a2 ~'Ct+2 + ... + ak Lx;t,
summation extended over i from 1 to n. These are (k + I) equations in (k + 1)
unknowns aOI aI' a2, ... , ak and can be solved with the help of algebra.
Remarl<. It has been found that in all the above cases, the values of the
a2 E [;2 E
second order derivatives, viz., - - 2 ' - - 2 '" come out to be positive at the
aao aaJ
94 Fundamentals of Mathematical Statistics

points 00, a" ___ ,


01;. the solutions of the 'normal equations'. Hence they
provide minima of E. For proof see Remark 1 to § 10_7. I-Lines of Regression_
Example 9·1. Fit a straight line to the following data.
X: 1 2 3 4 6 8
Y. : 2·4 3 3·6 4 5 6
Solution. Let the line be Y = a + bX
X Y )(2 XY
2·4 2·4
2 3-0 4 6·0
3 3·6 9 10·8
4 4·0 16 16·0
6 5·0 36 30·0
8 6·0 64 48·0
Total 24 24 130 113·2
Using nonnal equations (9_2a), we get
=
24 6a + 24b and J J3-2 =24a + 130b
=
Solving these equations, we get a 1-976 and b 0-506. =
Example 9·2. Fit a parabola of second degree to the following data:
X 0 1 2 3 4
Y: 1·8 1·3 2·5 6·3
(Delbi Univ. [Link]., Oct. 1992)
Solution. Let Y =a + bX + c)(2 be the second degree parabola.
X Y Xl X3 X4 XY Xly
0 1-0 0 0 0 0 0
I 1-8 1 1 I 1-8 1·8
2 1·3 4 8 16 2·6 5·2
3 2-5 9 27 81 7-5 22·5
4 6·3 16 64 256 25·2 100·8
Total 10 12·9 30 100 354 37·1 130-3
Using nonnal equations (9·4), we get
12·9 = 5a + lOb + 30c; 37·~ = lOa + 30b + 100c;
130· 3 = 30a + 100b + 354c
Solving these equations, we get a 1·42, b= =- 1·07 and cO-55. Thus the
required equation of the second degree parabola is
Y = 1-42 - 1·07 X + 0·55)(2
Remark. If the values which X and Y take are large, the calculation of
LX, L x2, LX y, ... , becomes q~ite tedious and the solution of the normal
equations, is also quite cumbersorrte.
, In this case arithmetic is reduced to a great
(:ur~e Fittin~ lind j'rinciplc of LClisl Squares 95

C,xlcnt by suilllble change of origin in X or (and) in )'.


9·1·~. Change of origin. Lei us suppose thalthe values of X are given
to be equidistant at an interval of It, i.e., X rakes the values, (say), a, a + h.
;1 + 21t •... If n is odd. i.e .• n = 2m + I (say). we take
U = X - (m,tddle t?r~ ~ = X - (a + mh)
- Interval h
Now U takes the values - m. - (m - 1)•...• - 1. 0.1, ... , (m - 1), m, so that
~U= I: U 3=0.
If n is even, i.e.• n = 2m (say). then there are two middle terms, viz., mth
and (m + l)lh terms which are p + (m - 1) h and a + mho In this [Link] take
X - (mean of two middl~ terms) X - [a + ~ (2m - 1) h)
U- ---~----
- ~ ([Link]) - ~ (h)
2X ~ 2a - (2m - 1) h
= h ...(9·7)
Now for X = a, a + h , ... , a + ( 2m - 1 ) h; U takes the values
-( 2m - 1 ), - ( 2m - 3 ) ,... , - 3, - 1, 1. 3,.... , ( 2m - 3 ), ( 2m - 1 ) .
Again we see that I: U = I: U3 = 0 .
E"a~ple 9·3. The weights of a calf taken at weekly intervals are given
below. Fit a straight Iif!e using the method of least squares and calculate the
average rate of growth ,per week.
Age (X) 1 2 3 4 5 6 7 8 9 10
Weight (Y): 52·5 58·7 65·0 70·2 75·4 81·1 87·2 95·5 102·2 108·4
Solution. Let the variables age and weight be ,.denoted by X and Y
respectively.
Here n = 10. i.e .• even and the values of X are equidistant at an interval
of unity, i.e., h = 1. Thus we take
U = X - (5 1+ 6)12) = 2X - 1.1.
- -2
Let the least-square line of Y on l.j be Y =a + bU.
The normal equations for estimating a and b are
I:Y =na + bllJ and I:UY =aW + bI:U 2
X Y U ~2 UY
1 52·5 -9 81 -472·5
2 58-7 -7 49 -410·9
3 65·0 -5 25 - 325-0
4 7~2 -3 9 -210-6
5 75-4 - 1 1 -75·4
6 81-1 1 1 8].]
7 87·2 3 9 261·6
." (, Fundamentals {If ;\1aihematical Statistics

8 95·5 5 25 477·5
9 ](\2·2 7 49 71~-4
10 IOS·4 9 81 975·6
Total 796·2 0 330 1016·8
Thus the normal equations are
796·2= lOa + 0 x band 1016·8 =a x 0+ 330b,
1016·S
which give a = 79·62 and b =~ = 3·0S (approx).

:. The least ~uare


Ijne of Y on U is
I y =79·62 + 3·0SU
Hence the line of best fit of Y on X is
y= 79·62 + 3·0S (2X -11) => Y=45·74 +6·16X
The weighrs of the calf (as given bY,the line of best fit Y =A + BX ) after
I, 2, 3, ... weeks are A + B, A + 2B, A + 3B, ... , respectively. Hence the average
rate of growth per week is B units, i.e., 6·16 units.

EXERCISE 9 (a)
1. (a) (Xi, Yi) ; i = 1,2, ... , n, give the co-ordinates of n points in- a plane.
It is proposed to fit a straight line Y =aX + b to. those points such that the sum
-of the squares of the perpendiculars from those n points to the line is a mini-
mum. Find the constants a and b. Use the above [Link] to 'fit a straight line
to the following points :
X: 0 2 3 4
Y: 1 I·S 3·3 4;5 6-3
Ans. Y=O·72+ 1·33X
(b) Fit a [Link] of the form Y =AX + B to. the following data:
X: 0 5 10 15 20 '25 30
Y: 10 14 19 25 31 36 39
2. Show that the line' of best fit to the following data is given by
Y=-0·5X + S
X: 6 77'S 8 8 9 9 10
Y: 5 5 4 5 4 3 4 3 3
3. (a) How do you define ~e ter:m "line of best fit". Give the normal
equations generally used to obtain such a line. Fit a straight line and parabolic
curve to the following data :X :1·01·52·02·53·03·54·0
Y: I-I 1·3 1·6 2·6 2·7 3·4 4·1
Ans. Y = t-()4 - O· 20X + 0- 24X 2
(b) Fit a straight line to the following data. P,Iot the observed and the ex·
("urn' Fittin\! ,IOI! I'rincillll' ,,' Ll'ast Squarl's 97

(h) FiL a ~LraighL line LO the following daw. PIOL Lhc observcd and Lhc cx-
I)CCLCd values III a graph amll~xamil)c wheLhcr the sLraighL line givcs an adequaLc
rlL
x... I 2 3 4 5 6 7 R
55
y... 46 40 38 33 30 29 30
4. An expcrimcnt is conductcd to verify the law of falling under gravity
expressed by . S = ~ gt 2
where S is the distance fallen at time t and go is a gravitational constant. The
following resulL<; arc obtained:
t(seconds): 1 2 3 4 5
S ( feet) 15 70 14<r 250 380
Taking S as thc dcpenent variable, fit a stmight line to the data by the
method of least squares in a manner thar you can estimate g. What is the estimate
of g? .
S. (a) Explain the 'method of fitting a second degree parabola by using the
principle <,>f lea<;t squares.
(b) Fit a parabola Y = a + bx + ex 2 to the following data :
X; I 2 3 4 5 6 7
Y: 2·3 5·2 9·7 16·5 29·4 35·5 544
6. Fit a second degree parabola to the following data taking X as the
independent variable :
X ': I 2 3 4 5 6 7 '8 9
Y: 2 6 7 ,8 10" 11 11 10 9
An~. Y = - 1 + 3·55X - 0·27X 2
7. In a spectroscopic method for determining the .per cent X of natural
rubber-content of vu\cani7..ates, the variable Y used is 1 + 10glO r, where r is the
ratio of transmission at two selected wavelengths. In order to establish a relation-
ship between X and Y, the following data were obtained :
X: 0 20 40 60 80 100
Y: 2·19 2·65 3-16 3·57 3·93 4·27
Using least square method, fit a parabola. Comment on your results.
8. Fit ~ second degrec curve'Y = a + bX + eX 2 to the following data relat-
ing to- profjt of a certain [Link] ..
Year : 1980 1982 1984 1986 1988
Profit in lakhs o{rupees.: 125 140 165 195 230
Estimate the profit in the year 1995.
Ans. Y=114+7·2X+3·15X 2
9. Explain the method of least squares of fitting a curve to the given mass
of data :
X:. -2 -1 I) 2
Fundamentals (If Mathematical Statistics

Y: YI Y2 Ya Y4 Ys
Fll a parabola Y = a + bX + c (X 2 - 2), by lhe ,melhod of leasl squares and
show lhal
- b=IO(-2
a=y, I 2 1 2
Y I-Y2+ Y4+ ys), C=14(2Y I-Y2+ Y4+ ys)

10. Show lhal lhe besl filling linear function for the points (x\,Y\),
(X2, Y2), ... , (XII' YII) may be expressed in lhe form
x Y 1
EXi EYi n =0, (i=1,2, .. ,n).
Ex? LX;Yi LXi
Show that lhe line passes through the mean point (x, Y).
9.·2. Most Plausible Solution of a System of L..ine~r Equations.
Method of least squares is helpful in fmding the most plausible values of the
variables satisfying a system of independent linear equations whose number is
more than the number of variables under study. Consider the follQwing set of
m equations in n variables X, Y, Z, ... , T :
a\X+b\Y+c\Z+ ... +k\T=/\ }
a2X + blY + c2Z + .. , + k2T =h ...(9·8)
a",)( + bmY + cmZ + ... + k".T= 1m
where aj, bj, ... , 'i; i =--1, 2, ... , m are constants.
If m = n, the system of equations (9·8) can 'be solved uniquely with the help
of algebra. If m > n, it is not posible to detennine a u,nique solution X, Y, Z, ... ,
T which will satisfy the system (9·8). In this case we find th& values of X, Y,
Z, ... , T which will satisfy the system (9·8) as nearly as possible.
Legender's principle of least squares Consists in minimising the-sum Of the
squares o'f the 'residuals' or the 'errors'. If
Ej = aX + bjY + c;Z + ... +- kiT -/j; i = 1,2, .. , m
is the residual for lhe ilh equation, then we have to determine X, Y, Z, ... , T so that
m m
U = L E? ~ L (aj X + bjY + 'Cj Z + ... + kj T _ /j)2
j .. I ;= I
is minimum.
Using the principle of maxima and minima in differential calculus, the par-
tial derivatives of 'U' w.r.t. X, Y, Z, ... , T should vanish separately.
Thus
Curve Fitting lind Principle (If Lellst Squares 99

~ ~ = 0 = .~ a. (a. X + b.Y + GiL + .,. + kiT - Ii)


(J • = t

~ ~ = 0 = .~ b. (a. X + b.Y + G.L + ... + kiT - liJ ...(9·9)


a •= t

~ ~ = 0 = .~ k. (a. X + bjY + CiZ + ... + kiT - /;)


U .= t
These are known as the normal equations for X, Y, Z, ... , T respectively.
Thus we have n - normal equations in n unknowns X, Y, Z, ... , T and' their
unique solution gives the best or the most pla4sible solution of the system (9·8).
Here we see that the norm,al equation for any variable is obtained by mul-
tiplying each equation py {he coefficient of the variable in that equation and
then adding all the resulting equations.
Example 9·4. Find the most plausible values of X and Y from' the
fol/owing equations :
X-5Y+4=0, 2X-31:'+5=0
X + 2Y - 3 = 0, 4X -¥ 3Y + 1 == 0
Solution. Normal equation for X is
I . (X - 5Y + 4) + 2 (2X - 3Y + 5) + 1 . (X + 2Y - 3) + 4 (4X +.3 Y + 1) = 0
=> 22X+3Y+15=O ...(*)
Normal equation for Y is
- 5 (X - SY + 4) - 3 (2X - 3Y + S) + 2 (X + 2Y - 3) + 3 (4X + 3Y + 1) =0
=> 3X + 47Y - 38 =0 ... (**)
Solving (*) and (**), we get X = - 0·799 and Y =0·86.
Hence the most plausible values of X and Y are X = - 0·80 (approx.) and
Y =0·86 (approx.)
EXERCISE 9 (b)
1. Find the most plausible values of X and Y from tile following equations:
(i)
X + Y= 3·01, 2X - Y=0·03,
.X + 3Y = 7·03, 3X + Y =4·97.
Ans. X = 1·0003, Y = 2·0007.
(ii) X + Y = 3, X - Y = 2,
X + 2Y -'- 4 = 0, X =2Y + l.
2. Find the most plausible values of X, Y and 2 from the following
equations:
X - Y + 1Z = 3, 3X + 2Y - 52 = 5, 4X + Y + 4Z = 7t and -x + 3Y + 3L = 14
Ans. X=2·47, Y=3·5S, Z=I·92.
9·3. Conversion of Data to Linear Form. Sometimes it may happen that
the original data is not in a linear form but can be reduced to linear form by
f.l0 Fundamentals of Mathematic;11 Statistks

somc sImple transformation of variables. We will illustrate this by consldenng


thc following curves :
<a) Fitting 01 a Power Curve. Y = aXb ... (9 10)
to a set of n points.
Taking logarithm of both sides, we £et
log Y =log a + b log X
~ U=A+bV
I
where U = log Y, A = log a and V = log X.
This is a linear equation in V and U.
Normal equations for estimating A and B are
r..U::: nA+ br..V and r..UV =Ar..V + br..V 2 ... (9· lOa)
These equations can be solved for A and b and consequently, we get
a = antilog (A)
With the values of a and IF so obtained, (9·10) is the curve of best fit to
the set of n points.
( b ) Fitting of Exponential Curves. (f) Y = abx , (ii)' Y ::: ae bX
to a set of n points.
(i) Y =abx .:.(9 11)
Taking logarithm of both sides, we get
log Y::: log a + X log b
~ U=A+BX
where U::: log Y, A =log a and B::: log b.
This is linear equation in X and U.
The normal equations for estimating A and B are
r.. U = nA
+ BU and UU:;: AU + BU 2 ...(9·11a)
Solving these equations for A and B, we finally get
a = antilog (A) and l!.:;: antilog (B)
With these values of a and b, (9·11) is the curve of best fit to the given
set of n points.
(ii) Y=al X ... (9·12)
log Y = log a + bX log e =log a + (b log e) X
V=A+BX
where U =log Y, A::: log a and B = b tog e.
This is linear equation in X and U.
Thus the normal equations arc
r..U :;: nA + au and r..xU = Af..X" + BU 2 ... (9·12a)
From these we ~ind A and B and consequently J ,
Curve FiltinJ,l and Principle 01' Leas' Slluares 911

8
(/ = antilog (A) and fl=--
loge
Example 9·5. Fit an exponential curve of the form Y = ab~ 10 Ihe
following data :
X: I ·2 3 4 5 6 7 8
}' : 1·0 1·2 1·8 2·5 3·6 4·7 6·6 9·1
Solution.
X y V = log Y XU X2
t 1·0 0·0000
0·0000 1
2 1·2 0·0792
0·1584 4
3 1·8 0·2553
0·7659 9
4 2·5 0·3979
1·5916 16
5 3·6 2·7815
0·5563 25
6 4·7 0·6721
4·0326 36
7 6·6 0·8195
5·7365 49
8 9·1 0·9590
7·6720 64
total 3~ 30·5 . 22·7385
, .. 3·7393 204
(~rlla) gives the nonnal equations as
3· 7393 ::= 8A + 368
and 22· 7385 =36A + 2048
Solving. we get
8 ::= 0·1408 and A =~·t662 = f.8338
f

:. b = Antilog B ::= 1·383 and a::= Antilog A ::= 0·6821


Hence the equation of the required curve is
Y::= 0·6821 :1·38)x .
Example 9·6. J)erive the least square equations for filling a curve of the
Iype Y::= aX + (b/X>, to a set of n points (Xi. Yi) ; i = 1.2..... n.
Solution. The error of estimate £1 for the ith point (Xi. Yi) is given by

Ei = ( Yi - axi - ~J
According to the principle of least squares. we have to detennine thy values of a
and b so that sum of the Squares of errors £, viz.,

E= E E?::= E
n n ( b
Ji-axi--. J2
;=1 ;=1 XI
is minimum.
Consequently. the normal equations are

iJE
da
=0 ::= - 2
;= 1
i Xi ( Yi - ax; - ~XI J
9·12 Fundamentals of Math<''Il1atical Statistics

dE n I ( b '\
db
- = 0 =- 2
i=lxi
1: - Yi - axi - -
x,
J
which on simplificalion give
n n
1: Xi Yi = a 1: xl + nb
i= I i= 1

and i [~)=:na
i=1 x,
+ b .i [-~)
x, i='l
Example 9·7. Three independent measurements on each of the
three angles A, B, C of a tria'lgle are as follows,'
ABC
39·5 60·3 80·1
39·3 62·2 80·3
39·6 60·1 80·4
Obtain the best estimates of the three angles taking into account the relation 'that
the sum ofthe angles is equal to 180°.
Solution. Let the Lhree observations on A be denoted by XI, X2, X3, on B
by y., Y2, Y3 and on C by ZI, Z2, Z3. ~t 9.,92 be the best estimates for A and
B respectively.
According to the principle of least squares, our problem is to estimale
9. and 92, so that
E =1: (Xi - 91)2 + 1: (yj - 92)2 + 1: (Zj - 180 + 91 + 92)2
is minimum, summation being taken over i from 1 to 3.
Equating to zerQ the ,partial derivatives of E w.r.t. 91 and 92, the. nonnal
equations are
dE
:l9.
o
=0 =- 1: (Xi - 9d + 1: (Zj - 180 + 9. + 92)
.. ,(*)
dE
a92 = 0 = -1: (yj - 92) + 1: (Zj - 180 + 9. + 92) ...(**)
From {*) and (**), we get
391 - 1: Xi + 1: Zj - 540 + 39. + 392 = () }
392 - 1: Yj + 1: Zj - 540 + 39. + 392 = 0 ... (***)
But 1: x, =39·5 + 39· 3 + 39·6 = 118·4
1: Yj '" 60·3 + 62·2 + 60·1 = 182·6
1: Zj = '80·1 + 80· 3 + 80·4 = 240·8
Substituting in (***), we get
69.+392-417·6=0 and 39.+692-481.8=0
:. ~ =Q1 = 39.27,h =Q2 = 60·66 and t = 180 - QI - G2 = 80·07
cur"" Fitting nnd Pri,nciple of lellst Squnrcs 9,13

9.4: Selection of Type of Curve to be Fitted. The greatest limitation of the


method of curve fitting by the principle of least squares is the choice of the
Inalhematical curve to be fitted to the given data. The chojce of a particular
curve for describing the given data requires great skill, intelligence and expertise.
The graph of the given data enables us to have a fairly good idea about the
type of the curve to be fitted. The graph will clearly reveal if the trend is linear
(straight line) or curvilinear (non-linear). If the graph exhibits a curvilinear trend
Illen further [Link] _to the type of trend curve can be obtained 011
plolting the data. on a semi-Iogarilhll~ic sca!e. A ca~eful [Link] .of the graph
obtained on plottmg the data on an anthmellc or senll-iogantllllllc scale often
provides adequale basis for selecling the type of the curve. The various types
of curves that may be llsed to describe Ihe' given data in practise are: [If Yx is
Ibe value of the dependenl variable corresponding to th~ value x of the
independent variableJ
(i) A straight line: yx = a + hx
(ii) Second degree parabola: Yx = a + bx + cx 2
(iii) kth degree po~vnomial: yx = ao T a J x + a2 x 2 + '" + ak xk
(iv) Exponential curve: Yx = ab x
~ logyx = log a + x log b = A + Bx, (~ay).
.
(iv) Second degree curve jitted to logarithms:
x
.y x = ab cx
2
~ log y x = log a + x log b . = x 2 log c
= A + Bx + Cx 2 , (say).
(vi) Growth Curve ...:
(a) Yx = a + \)X (Modified Exponential Curve)
(b) Yx = abeX (Gonlpertz Curve)
~ log Yx = log a + "x. log. h = A + BeX, (say)
1

(c) -k . b < 0 (Lo'gistic Curve)


YI' = I + exp (a +hx)
For decideing about the type of curve 10 be titted to. a given sel of data,
the following points may b~ helpful:
(i) When the Yx series is found to be increasing by equal absolute amouIlls.
the straight line curve is used. In tllis case, the graph of the data will give a
straight line graph.
(ii) The logarithmic straigl"t line (exponential curve Yx = aV) is llsed when
the series is increasiJ)g or decreasing by a cO~lstant percentage rath~r than a
constant absolute amOlan\. In this case, the data plotted· on a semi-logarithmic
scale will give a straight line graph.
(iii) Second degree curve fitted to·logarithnls may be tried if the-data plotted
9·14 Fundamentals 01" Mathematical Statistics

on a semi~logarithmic scale is not a straight-line graph but shows curvature, being


[Link] upward or downward.
For further guidelines, the following statistical tests based on the calculus
of finite differences [ef. Chapter 17] may be applied.
We know that ·for a polynomial y" of nth degree in x.
~ ~ y" =constant,
r =n }
• =0 '\, r>n
where ~ is the difference operator given by ~ y" =YH It - y", h being the interval
of differencing and ~ , y" is the rth order difference of y".
r. If ~ y" = constant, use straight line curve.
~. If ~ 2 y" = constant, use a second degree (parabolic) curve.
3. If ~ (IOKY,,) 'T constant, use exponential curve.
4. If ~2 (log Y.) = constant, use second degree curve fitted to logarithms.
S. If ~ y" tends to decrease by a constant percentage, use modified ex-
ponential curve.
6. If ~ y" resembles a skewed frequency curve, use a Gompertz curve or
Logistic curve.
7. The growth curves, viz., modified exponential, Gompertz and Logistic
curves, can be approximated by the constancy of the ratios
~ { ~logY1i } { ~(l/y,,) }
. ~Y"-l' ~IOgY"-l ' ~(l/Y"-l)'
respectively for all possible values of x.
EXERCISE 9 (c)
1. Describe the method of fitting ~e following curves :
(t) Y =aeb", (ii) Y = aX b .
2. (a) Fit an eQuation of the form Y=abx to the following data :
-------' ..... X: 2 3 4 5 6
Y: 144 112·8 207·4 248·8 298·6
Ans. Y= (101·3) (l·I96l
(b) Fit a curve of the type y'='iJl,x to the following data :
X:.2 3 4 ~5 "'6
f: 8·3 15·4 33·1 65·2 127·4
Estimate Y when X = 4·5, 7 and 3·5.
3. Fit a curve of the' form Y= bex to the following data :
YeCJl'(X): 195'1 1952 1953 1954 1955 1956 ·1957
Production
In 'lQ!'IJ (f) : 201 263 314 395 427 504· 612
.". In a,n' experiment in which! the growth of duck weed under certain con-
Curve Fitting and l>rinciple of Least Squares 915

ditions was measured, the following results were obtained:


Weeks (X) '" 0 1 2 3 4 2 6 7 H
No. of friends (Y) ... 20 30 52 77 135 211 326 550 '1052
Assuming the relationship of the form Y = alx , find the best values of (l
and b by the method of least squares.
S. For the data given below, find the equation to the bes~ fitting exponential
curve of the form Y = alx.
X: 1 2 3 4 5 6
Y: 1·6 4·5 13·8 40·2 125·0 300·0
Ans. Y = (0.557) e!·05X
6. Fit the curve Y = aX 2 + (b/X) to the following data :
X: 1 2 3 4
Y: - 1·51 0·99 3·88 7·66
7. The following table gives correspondipg values of two variables
X and Y.
X: 1 2 3 4 5
Y: 1·8 5·1 8·9 14·1 19·8
It is found that they are connected by 'a law of the form Y= aX of bX 2 , where a and
b are constants. Find the best values of a and b by the method of least squares.
Calculate the value of.Y for X =2.
Ans. a = 1·521; b = 0·49; 5·006
8. The following pairs of observations were noted in experimental work on
cosmic rays. Find, by the method of least squares, the best values of a and b
for the equation log R =a - bC which fits the data and estimate the most
probable value of R for C =20· 7.
C: 14 15 16 17 18
R: 24·1 20·5 14·0 7·3 5·0
9. (a) Explain the principle of least squares and describe its applications,
in fitting a curve of the form Y=a exp (bX + cX 2).
(b) Fit an indifference curve of the type XY =r b + aX to the data given
below:
Consumption of Commodity X : 2 3 4
Consumption of Commodity Y : 3 1· 5 6 7· 5
Hint. y = a + (b/x). Now proceed as'in Example 9·ti.
Ans. XY= 1·3X+'l·7
10. (a) Show that the parabola of best fit for the points
(XI,YI); (Xl,Y2) ; ••.••• ; (X2n+I,Y2n+ I)
where the values of x are in A.P. with common difference unity and x~ 0, can be
expressed in the form
916 'FUndamentals of Mathematical Statistics

i x
Y n(n+l)(2n+l)
Iy; 3
o an+ 1
n(n+l)(2n+l) .0 =0
IX;Yi o 3 n (m + 1 )( 2n + 1 )
r.x~ Yi n2 (n+ 1 )2 n 3
2
[Delhi Univ. B.A. (Pass), 198'1)
Hint. Use (9·4b), with
xi=a+i; i= 1,2, ... ,(2n+ I). Since x=O,
l:xi=(2n+ I)a+l:i => 0-(211+ I)a+ (2n+ 1)(2n+2)
- 2
a=-(n+ I)
,i
l:Xi 2 = l: (a + = (2n + oi + l:i 2 + 2d ~i
and so on, for l: x? and 1; Xi4 •

[ iil=m(m+l)(2m+I); i;3=[m(m+l)f
i= 1 6 i= I 2

and m
i -: t= 1
30 m(m + 1)(2m + 1)(3m2 + 3m - I)
]

(b)
.
When do we prefer logarithmic curve to ordinary curve?
9·5. Curve Ji'itting by Orthogonal Polynomials. Suppose that the
polynomial of pth degree of Y on X is
= 2
Y ao + alX + az X + ... + ap X p
'
...(9·13)
The normal equations for detennining the .constants als are 'obtained by
the principle of least squares by minimising the residual or error sum of squares
E=l:(y-ao-alx-a2X2- ... -apxP)'" ...(9·14)
summation being extended over the given set of observations. The nonnal equa-
tions are:

~E =0, (j=0, 1,2, ... ,0)


Oaj
. 2
i.e .• l:xJ(y-ao-alx-,a2x - ... -apx")=O, [j=0, 1,2, ... ,p] ...(9·15)
Assume that X and Y are measured from their means (and this we can de
without any losS of generality) so that
~r=. !!r"=
' E /(X') =...!..
N l:x'
and write,
1 .,
~jJ =- l:xJi.y,
- N
curve Fitting and l>rinc:iple of tells! Squares ~ 17

where N is number of observations taken on each 01 the v;lriables X and y.


Hence (9·15) gives
J..Ljl -aoJ..L,-al J..L,+ 1- (/2 J..L,+2 - ... -ap J..L,+p= 0; )=0, I, 2, ... ,p
:;:::) ao J..L, + al J..Lj +1 + el2 J..L, +2 + ... + ap J..L, + p = flJI ; J = 0, 1. 2, ...• f1
PUlling j = 0, 1.2•...• p, we get respectively
ao J..Lo + al J..LI + a2 J..L2 +... + ap IIp ;= J..LoI )
aOIl\+alll~ +a21l:3 + ... +ap~+1 =J..L:I\ ...(9.16)

=J..Lpl
aof..lp+al f..lp+1 +a2Ilp+2+ ... +apll2p
Solving (9·16) for ao. a1. ...• up in terms of the moments 11, 's and J..Ljl's.
j = O. 1.2 ..... p and substituting in (9·13) we get the required curve of be~t fit.
Let
J..Lp
IIp+ I ...(9·17)

• f..lp J..Lp + I J..Lp + 2 J..L7p


and .111") be the determinant obtained on replacing (j + l)th column of .11(P) by
the column

...(9·18)

The required curve of best fit is the eliminant of aj's in (9·13)iand (9·16)
and is given. by
Y 1 X
~I J..Lo J..LI
J..LII J..LI J..L2 ...(9·19)

J..Lp1 J..Lp J..Lp +'1 J..Lp + 2 .... J..LZp


The use of equation (9·19) is subject to one. serious drawback. If 'we have
a set of data and apart from inspection if there is no guide regarding the order
of the polynomial to be fitled. the only way left to us is to try curves of order
I. 2. 3, .. , until we reach the point where further tenns do not improve the fit.
Every time we add a new term. the a, 's given by (9·18) change and accordingly
the determinantal arithmetic has to be done afresh. For example, if we want to
fit a polynomial curve of third or higher degree to the same data then w~ cannot
use the coefficients which we computed while fitting a second degree parabola.
To overcome this drawback Prof. R.A. Fisher suggested a method which
involved the fining of Orthogonal Polynomials by the principle of least squares,
so that each term i~ independent of the other, i.e .• each of the coefficients in
<) III Fundamentals of Mathematical Statistics

the polynomial is independent or the other so that each of them can be calculated
[Link]. In this method. the coefficients computed earlier remain the same
and we have to compute the coefficient only for the added term.
95·1. Orthogonal Polynomials (Del). Two polynomials p)(x) and
P2(X) are said to be orthogonal to each other if
1:. Pl(X) P2(X) = o. ...(9·20)
where summation is taken over a specified set of values of x. If x were a
continuous variable in the range from a to b, the condition for orthogonality gives
b
I PI(X) P2(X) dx = 0
a ...(9·2Oa)
For example. if we take
Po = [Link](x) = X-4.P2(X) = X2 - 8x+ 12.P3(x) =x 3 - 12t2 +4lx - 36
.•.(9·20b)
then these are orthogonal to each other for a set of integral values of x from 1 to
7 as ~xplained in the following table. Other examples of orthogonal polynomials
are HCrinit~ polynomials. Gram Charlier's polynomials. Legender.·s polynomials.
etc.
ORTHOGONALITY OF POLYNOMIALS DEFINED IN (9·20b)

X Po PI PO P2 PoP.3 PtP: PtP3 P,f3


1 -3 5 -6 -15 18 -30
2 -2 0 6 0 -12 0
3 -1 -3 6 3 -6 -18
4 0 -4 0 0 0 0
5 1 -3 -6 ;-3 -6 18
6 2 0 -6 . 0 -12- 0
, 7 3_ 5- 6 15 1~_ 30
Total 0 U U U u U'

9·5·2. Fitting of Orthogonal Polynomials. "Ibe Ptit degree polynomial


(9·13) can be rewritten as
y = boPo+ blPl + bzP2 + .,. + bpPp .•.(9·21)
where P's are polynomials in x • Pj being a polynomial of degree
j. (j ;:: O. 1.2•...• p). We shall determine P 's so that they satisfy the condition of
orthogonality. yiz .•
1:.Pj . Pl '.= 1:.Pj(x)Pl(x) =O;j~k
x ..• (9.22)
th~summation being extended over the observed valuesof x. Tne normal equations
for estimating the constants bj 's ~e obtained on minimising
E =:E (y - boPo - blP) - ... - bp pp)2 ...(9·23)
Curve ... tting and Principle or Least Squares 919

and arc given by


aE=O
ab,
~ LPj (y- boPo- biP. - ... -.bpPp);= 0: I =O. 1.2• ...• p.
Siml,ifying and using (9·?2). we get
bj L p/ =0
r. Pj . Y -
._LyP}._ .
bJ - 2 .J - 0.1.2 • ...• p. ... (9·24)
LPj
Thus bj is determined by Pj. If having fitted a curve of order p we wish
to go a step further by adding a term bp +. Pp + I. the coefficients already obtained
in (9·24) remain unaltered.
Moreover. the use of orthogonal polynomials will gi·.e us a very convenient
method of determining. step by step. the goodness of fit of the polynomial
curve. For pth degree polynomial'(9·21) •. the error sum of squares is [c.f. (9·23)J
E= L (y - boPo-blPI - .... - bp pp)2
= Ly2+ b6 LP6 +bltpl-:+- ... + bi ~P;
- 2 hoLY-PO - 2 blLyPI - ... - 2 bp LyPp •
other terms vanish because of orthogonality conditions (9·22). Using (9·24) we
finally obtain
E= Ly2 ':!.bo2 LP02 - bl 2 LPI%- ... -b/ LP/ ...(9.25)
Thus the effect of adding any term bj Pj is to reduce the error (residual)
sum of squares E by b/ L p/
and we may examine the effect of this term on
• not reduce E
E separately. If we find that the addition of any term bpPp does
significantly. we ma){ conclude that it is not desired (as far as the representation
of the given data by a polynomial curve is concerned).
9·5·3. Finding The OrthOgonal Polynomial' P" in Fitting a Polyno~ial
x be given by
of Degree p. Let Pp. the polynomial of degree p in
p .
Pp.= . ~ Cpjx} •••(9·26)
}=o
This contains (p + If-unknown constal)ts c,o: CpI. .••• Cpp. Hence in all the
polynomials in (9·21) up to and including those of pth order. there are
(p+l)(p+2)
I+2+3+ ... +(p.+1)= .2 •
unknown constants. The orthogonaljty conditions
LP;Pj=O.i~j=O.I.2•...• P.

prOvide p + Ie2 = (p + l)p conditions on the c· s so that there are


2
(p+ 1)(p+2) _ (P+ l)p_ 1
2 2 -p+.
9'20 Fundamentals of Mathematical Statistics

constants which can be assigned arbitrarily. We will take one for each polynomial
Pj (j = 0, 1, 2, ... , p) and assign it such that the coefficient of x1 in Pj is unity
i.e.,
cjj = I,} =. 0, 1, 2, "', p, ...(9.27)
In particular c oo = Po = l. The orthogonality conditions give:

~ Pp P, = O,} < p (j = 0, 1, 2, ... , P - 1) ... (9'28)


}=O,givesLPpPo=O => LPp=O;(':Po=l) ...(*)
}=O,givesLPpP I = 0 => LPp=O,(x+k)=O
=> L Pp . x + I{ L Pp = °
} = 2, gives L Pp P7 = 0
=>
=>
L x Pp = ° ° ..
(**)
LIt'..p = (xl + klx + k2) = {Using (*))
. => L r. Pp = ° [Using (*) and (**))
Similarly proceeding, we shall get in general
;: Pp x" = 0, r = 0, 1,2, ... , P - 1 ...(9'29)

~(f
x }=o
cpj .xjJxr = 0

=> f (c ~x xJ+r )
j=O PJ
= 0

Dividing both sides by N, the number of observations on each of the


[Link] X and Y, we get.
p

J~O cpj Pj + r == 0; r = 0, 1, 2, ... , (p - 1) ... (9'30)

where x is ~~umed to be measured from mean. Putting r = 0, 1, 2, .. , (p - I)


in (9'30), we get respectively
cpO~ +cpl~I+"'+cpj~j +"·+cp.p_I~p-1 +cpp~p=o
cpO~1 +cPI~+,,·*cpj~j+1 +"·+cp.p_l~p +cpp~p+I=O
C : II
pO:t"'p-1
+ Cplt"'p
II + ... + C II:
.pjt"''j+p_1
+ ... + Cp,p-Ir-J.p-2
11_ + Cpp r-J.·p-I=0
11_ :

Notmg that cpp = 1, solvmg the above equations for C S, we get


~o ~l ... -~p ~p-l

~l ~2'" -~p~l'" ~P

~p-l ~P ~L2p-l ... ~2p-2 _ /l(p)P}


c pj = - lp-l)
~o ~ll ~j ~p-l
...(9'31)
~l ~2 ~l J+l ~P

~p-l ~p ... ~j+p-l ... ~2p-2


Curve Fitting and l'rinciple of Least Squares 921

where !!.(p)h~l" been defined in (9 1'7) and !!.(P)PI is the minor 01 the element
in the last row and (j + 1)th column in !!.(P). SubstilUling lhis value of CPI in (9·26),
wegct

1
Pp =-- ...(9·32)
!!.(p-I)
1lP-1 IIp
11:>+ 1 1l2p-1
) X x2 xP
In particular if 110 = 1, III = 0 and 112 = I, i.e.~ if x is a standardised variate
then thc orthogonal polynomials are given by
Po= 1 ... (9·33)

PI (x)
17 ~l
----:::;x ... (9·330)
110
110 III 112
III 112 113
1 X x2
Pix) =-,-Ilo--Il-l -1- =x 2 -1l3 x - I ...(9·33b)

III 1l2.
110 III 112 113
110 III 112
P3(X) = III 112 113 J.14 ...(9·.33c)
+ III 112 113
112 113 J.4 Ils
1 X x2 x3 112 113 J.4
and soon.
If we further assume that x is· a standard normal variate so that 113 = Ils
= '" =1l2r+ 1= 0, then the above orthogonal polynomials are called Hermite
Polynomials and are given by
'\ 2· 3' 4
Po=l;PI(x)=x;Pix)=x -I;P3(x)=x -3X;,P4(X)=X -6x 2 +3;
and so on,. where x is a continuous r. v. taking values from - 00 to 00. ...(9· 34)
Remark. Hermite Polynomials defin~.d in (9·34) are orthogonal w.r.t. the
weight function
922 Fundamentals of Mathematical Statistics

00

i.e., J Pj(X) P,{X) a(x) = 0; i '* j


... (9·35)
where PI(X). P2(~). P3(x). P4(X) are defined in (9·34).
9·5·4. Determinatiop of the Coefficients bi's in (9·21). From (9·24), we
get
bp = r., y Pp / r., p/ ..•(9·36)
Now r.,p/=r.,ppp p
=r.,pp [CpO + CpIX+ Cp2X2+ ••. + cppx P ]
x
=r.,pp.x p ,
x
on using (9·29) and the fact that cpp = ....

. r.,p/=r., (
x
.!
)=0
CPii] xp=.! (Cpjr.,xp+jJ
)=o-x
l!.- P 6.(P) .
= N . r. Cpj IlP +j = N . r., (P-"~) ·1lP+j [From (9·31)]
)=0 )=0 6.
~ ·~I IlP
N ~J ~2 1lP+ I
=--
IlP-J IlP
6.(p-J) ~1p-l
IlP ~p+ I ~1p
[Proceeding exactly as we obtained (9·32)
N 6.(P)
r
- 6.(P- J)
...(9·37)

P 6.") .
Similarly, 'r., y Pp = N r., 6.(P-PIJ) . ~jJ
j=JJ
~ ~I IlP
.~I
. ~2 1lP+ I
- -N-
6.(P-J)
IlP-I IlP ~1p-J
~J ~11 IlPI
N .6.(P)
= 6.(P- J)
...(9·38)
where 6.(P) and 6.(P)j arci<lefined in (9·17). Substituting in (9,36) we get
curve Filtin~ and Principle of Least Squares 923

...(9·39)
1f Lhe variable x takcs Lhe inLcgral val ues 1, 2, ... , N. Lhen Lhe firsL seven
of these orLhogonal polynomials Pj'S j = 0, 1,2,3, ... ,6 are given by :
Po(x) = 1, Pt(x) = At . ~

P2(X):;=A2{~2_N:;I }
'\
P3(X) = 11.3
{~3
., -
3N
20
2- 7 .,~}
P4(X) = A)1~4 _ 3N
2
14
- 13 ~2 +...1..
560
(N 2 _ I)(N 2 - 9)}

Ps(x) =As { ~s - {8 (N 2 -7) ~3 + I~8 (I5~ - 230N z + 407) ~}


P6(X)=~·{ ~6 - ;4 (3N2-3I)~4+ I~6 (5~-llON2+329)~?}
5_ (N2_ 1)(N 2 -9)(N Z -2S)}'
__
14784
and so 011, where ~ = x -~ so that.~ ~ = 0 and A.;'s are arbitr3!Y constants.
If y = bo + btPt(x) + bz Pz(x) + ... + bp Pp(x); is Lhe orLhogonaI polynomial
fitted LO the given data then, using (9·24), we geL

~yPo ~v
bo=--z =/t ; (.: Po= 1)
~Po
~yP. ... (9·40)
x .
bi=--2 ,(i= 1.2, ...• P,
~Pi
x

The OIiglO of P;'s is so chosen that ~ Pi = O.


If N, the number of observations is odd, then we take
~=xj-A
h
and if N is even ~~ we take
~=xi-At
(h/2)
where h = length of the Jnterval (for values of x)
A = middle value (item) of the data
and At = ArithmeLic
.,
'"![Link] of two middle values of the data.

The values of P;'s and A.;·s are obtained Jrom. 'StatisLical Tables' by
924 Fundamentals of Math(.'fI1atical Stati~tics

R.A. Fisher for the values of N from 3 to 75. In these tabl~s the orthogonal
polynomials P/s are denoted by <I>/s. We reproduce below these tables for
N= 3toN=6.

TABLES OF ORTHOGONAL POLYNOMIALS


N=3 N=4 N=5
<pI <1'2 <PI <1'2 <p3 <PI <1'2 <P3 <P4
-I 1 -3 1 -1 -2 2 -1 1
0 -2 -1 -I -'3 -I -1 2 -4
1 I 1 -1 -3 0 -2 0 6
3 1 1 1 -1 -2 -4
2 2 1 1
Z. 6 20 4 20 10 14 10 70
~c/)t 10 5 35
Ai 3 2 3 6 22
N=6
<pI <1'2 ~ <P4 cps
-5 5 -5 I -1
-3 -1 7 -3 5
-1 -4 4 2 -10
l' -4 -4 -2 10
3 -1 -7 -3 -5
5 5 5 1 1
r. <p~ 70 84 180 28 252
x 3 5 7 21
Ai 2 2 3 12 10
Example 9·8. Fit a straight'line y =a + bx... (*) to the following data by
using orthogona I pay
I IIOmta
. Is.

x 0 "I 2 3 4

Y 1 1·8 3·3 4·5 6·3

Solution. Here N = 5. Let us transfonn to the variable


x-2
~=-I-=x-2 so that r.~=0

Let the orthogonl!1 polynomial fonn of straight line (*) be


y = bo+ btPt(~) = bo+ bt<l>t(x) .(**)
('ur'" FiUinll :IOd Principle of Least Squ:lrcs 925

- X ~=x-2 )' <Ill y <Ill

- 0
I
2
-2
-1
0
1
1·8
3·3
-2
-1
0
-2
-J.8
0
3 1 4·5 1 4·5
4 2 6·3 2 12·6
Total 16·9 -0 13,3

Thc values of c)ll are noted 'from .the tablcs for N = 5. From tables we also
find
Lc)l12= 10, AI = 1
. LV 16·9 Lyc)ll 13·3
Now usmg (9·40), bo == =..L == - = 3·38 ; /)1 = - - 2 = - = 1·33
N 5 Lc)ll 10
c)l1(X) = 1..\ ~ = 1 . (x - 2):;:: x - 2
Substituting in (**), the required straight line is
y = 3·38 + 1·33 (x- 2)
=> Y = 1· 33x + O· 72
Example 9·9. Fit a second' degree parapola to the following data, ,using
lhe method of orthogonal polynomials.

x 0·5 1·0 1·5 2·0 2·5 3·0


y 72 110 158 214 290 380

Solution. Let the second degree parabola be


y=a+bx+ cx 2 ...(*)
and its orthogonal polynomial transform be :
-,Y = bo + bl c)ll (x) + b2 c)l2(X) ,.. (**)
Here we have N = 6. Let us transform to
x -.! (l·5 + 2·0)
~= \ =4(x-l·75)=4x-7,
'2 (0·5)
so that L ~ =O. From Fisher's tables we nOle the values of c)ll and C\lz (as given in
the following table) and also
L <!II 2= 70, L <\122 == 84 ; Al == 2, 1..2 :::: 3/2·

0,5 -5 72 -5., 5 -360 360


1·0 -3 110 --' -1 -330 -110
9·26 FUndamentals of Mathematical Statistics

1·5 -1 158 -1 -4 -158. -632


2·0 1 2i4 1 -4 214 -856
2·5 3 290 3 -1 870 -290
3·0 5 380 5 5 1900 1900

Total 1224 2136 372

bo = ~::: 122'!.:: 204' bl = E Y -1>1 =2136 =30.51


N 6 • E~12 70 .

Ey¢22 ::-=4·43;
17t ~
b2= ~I(X)::~' -::2[4x-7]=8x-14
E~2 1M

¢2(x) = 'I11.2 [~2


1
N ..,.
., - - -
12
1] 32 [(4x-7) 2-36-12--1]
:;::-

=12 [1&1+ 49 - 5&- 35 ]=24Xl-84X+69.125


12
Substituting in (......). we get
y =204 + 30·51(8x-14) +443 (24xl- 84x+69·125)
= H)6·32x 2 - 128·04x + 83·08
which is the reqUired second degree parabola of best fit.

You might also like