3 Curve Fitting: Least Squares Methods - NotesInterpreter

1y ago
8 Views
2 Downloads
1.45 MB
21 Pages
Last View : 23d ago
Last Download : 3m ago
Upload by : Genevieve Webb
Transcription

UNIT-3Statistical Techniques: Curve fitting by method of least squares:y a bx, y a bx cx2 andxy ab . Correlation–Karl Pearson’s coefficient of correlation, Regression analysis–lines ofregression (without proof)- problems.3 Curve fitting: Least Squares MethodsCurve fitting is a problem that arises very frequently in science and engineering.The process of constructing an approximate curve y f ( x) whichfit best to a given discrete set of points ( xi , yi ),i 1, 2, 3,., n is called curve fittingPrinciple of Least Squares:The principle of least squares (PLS) is one of the most popularmethods for finding the curve of best fit to a given data set( xi , yi ), i 1, 2, 3,., n .Let y f ( x) be the equation of the curve to be fitted to the givenset of points P1 ( x1, y1 ), P2 ( x2 , y2 ), P3 ( x3 , y3 ),., Pn ( xn , yn ).Then e1 y1 f ( x1 )e2 y2 f ( x2 )e3 y3 f ( x3 ) . .ei yi f ( xi )Squaring each error (or residue) ei and adding, we getnni 1i 1E e12 e2 2 e32 . en 2 ei 2 yi f ( xi ) .(i)2The curve of best fit is that for which E is minimum. This is called the Principle of least squares(PLS).Some standard approximating curves :1. y a bx(straight line)2.y a b x cx 2 (parabola or quadratic curve)3.y a b x (exponential curve)3.1 Fitting a straight line by least squaresLet be the straight line y f ( x) a b x .(ii)to be fitted to the given set of data points ( x1, y1 ), ( x2 , y2 ), ( x3 , y3 ),.,( xn , yn ) .To determine the two unknowns a (intercept) and b (slope) in (i) use the PLS criteria that E isminimum,nni 1i 1ni.e., E ei 2 yi f ( xi ) yi a bxi .(iii)2i 12

is minimum. Differentiating (iii) partially w.r.to a and b, and equating to zero, we get E Eand 0 0 a b E E 0 0 b an 2 yi a bxi ) ( 1) 0i 1 yi a bxi 0 yi xi axi bxi 2 0i 1i 1nni 1i 1i 1nni 1i 1nni 1i 1nni 1i 0i 0nnni 1i 0i 0 xi yi a xi b xi 2 yi a 1 b xii 1n yi xi axi b xi 2 yi a bxini 1nnnn 2 yi a bxi ( xi ) 0 yi na b xiThus the two unknown parameters a and b of Eq.(i) are determined from the two equations y na b x .(iii) xy a x b x2 (iv)Equations (iii) and (iv) are known as “normal equations” for fitting a straight line y a b x .Note: Let y a b x being a straight line, then the normal equations are y na b x and xy a x b x23.2 Fitting a quadratic curve (parabola) by method least squaresAssume that y a b x c x 2 being a parabola.Approximate the data according to PLS. Then the unknown three parameters a, b, c aredetermined from the following three normal equations obtained in similar way as above, y na b x c x2 .(iii) xy a x b x2 c x3 (iv) x2 y a x2 b x3 c x4 .(v)3.3 Fitting a nonlinear curve by least squaresAssume that y a b xTaking logarithm on both sides, we getlog y log a x log b Y A B X .(i)where Y log y , A log a , B log b and X xEquation (i) is a linear equation in Y and X. For estimating A and B, normal equations are Y nA B Xand XY A X B X2where n is the number of pairs of values of x and y .

Ultimately, a antilog( A).andb antilog( B).Example 1 By the method of least squares, find a straight line that best fits the following datapoints:x01234y1.02.94.86.78.6Solution: Let line of best fit be given by y a bx .(i)Where a and b are constants to be determined by the normal equations.The normal equations are y na b x .(ii) xy a x b x (iii)Calculating the values of x, y, xy, x2 from the following data:2x01234 x 10y1.02.94.86.78.6 y 24xy02.99.620.134.4 xy 67x2014916 x2 30Here n 5 (number of pairs)The normal equations are 24 5a 10 b .(iv)67 10a 30b .(v)Solving (iv) and (v), we get a 1 and b 1.9.Substituting in Eq.(i), line of best fit is y 1 1.9 x .Example 2 By the method of least squares, find a straight line that best fits the following datapoints:x12345y1427405568Solution: Let line of best fit be given by y a bx .(i)The normal equations are y na b x .(ii) xy a x b x .(iii)Calculating the values of x, y, xy, x2 from the following data:2x12345 x 15y1427405568 y 204xy1454120220340 xy 748x21491625 x2 55

Here n 5 (number of pairs)The normal equations are 204 5a 15b .(iv)748 15a 55b .(v)Solving (iv) and (v), we get a 0 and b 13.6Substituting in Eq.(i), line of best fit is y 13.6 x .Example 3. If P is the pull required to lift a W by means of a pulley block, find a linear law ofthe form P c mW connecting P and W , using the following data:P12152125W5070100 120where P and W are taken in kg.wt. Compute P when 150 kg.wt.Solution: Line for best fit is given as P c mW .(i)The corresponding normal equations are P nc m W (ii) PW c W m W2 .(iii)W5070100120 W 340P12152125 P 73WP600105021003000 PW 31800W2250049001000014400 W 2 6750Equations (ii) and (iii) becomes73 4c 340 m6750 340c 31800 mi.e., 2c 170 m 36534c 3180 m 675 .On solving above equations, we get m 0.1879 and c 2.2785 .Substituting in Eq.(i), line of best fit is P 2.2759 0.1879W .When W 150 kg. P 2.2759 0.1879 (150) 30.4635 kg.Example 4 Fit a 2nd parabola to the given dataxy113244648597118149Solution: Let the parabola of best fit be given by y a b x cx 2 .(i)where a, b, c are costants to be determined.By normal equations, we have y na b x c x2 .(ii) xy a x b x2 c x3 (iii) x2 y a x2 b x3 c x4 .(iv)xyxyx2x2yx3x4

161624406388126 x 56 y 40 xy 3641346891114124457891916366481121196 x2 524118641443205679681764 x2 y 1276421651272913312744 x31812561296409665611464138416 x43846 5624 65348Substituting these values in Eqs.(ii)-(iv), we get40 8a 56b 524c364 56a 524b 5624c3846 524a 5624b 65348cOn solving above equations, we geta 0.195, b 0.77, c 0.009.Substituting in (i), parabola of best fit is y 0.195 0.77 x 0.009 x 2 .3.4 Change of ScaleIf the data values are equispaced (with height (h)) and quite large for computation, simplificationmay be done by origin shifting as given below: When number of observations (n) is odd, take the origin at middle value of the table; sayx x0( x0 ) and substitute u h y values if small; may be left unchanged; or we can shift them at average value of yy y0data v h When number of observations (n) is even, take the origin as mean of two middle values,x x0 h with new height and substitute u .h/2 2 Example 5 Fit a 2nd parabola to the following data:x0134x0 2y11.81.32.56.3Solution: Here number of the given data is n 5 (odd), h 1, thenx x0 x 2u x 2 and y v so that the parabola of fit y a b x cx 2 .(i)h1becomes v A B u C u 2 (ii)The normal equations of (ii) are v nA B u C u 2 (iii) uv A u B u 2 C u3 (iv) u 2v A u 2 B u3 C u 4 .(v)

u x-2v y-2-101211.81.32.56.3u241014 u 12.9 u 2 10 u 0u 2v41.802.525.2 u v u2uvu41610116u3-8-10183 u 04-2-1.802.512.6 uv 11.3 34 33.5Equations (iii)-(v) are12.9 5 A 10C11.3 10B33.5 10 A 34CSolving these simultaneous equations, we getA 1.48, B 1.13 and C 0.55.Equation (ii) yieldsv A B u C u 2 1.48 1.13 u 0.55 u 2Hence y 1.48 1.13( x 2) 0.55( x 2) 2i.e., y 1.42 1.07 x 0.55 x 2 .B parabola,Which is the required solution of72.262.051.841.6y31.421.211.0012x30.54Fig.1. Plot of y verses x : Given data1.01.52.02.5Fig.2. Plot of y verses x : y 1.42 1.07 x 0.55 x 2Example 6 Fit a 2nd parabola to the following olution: Since number of observations is odd and h 0.5.x x0 x 2.5 2 x 5 and y v so that the parabola of fith0.5y a b x cx 2 (i)Taking u becomes v A B u C u 2 (ii)The normal equations are v nA B u C u 2 .(iii) uv u B u 2 C u3 .(iv) u 2v A u 2 B u3 C u 4 (v)

x1.01.52.02.53.03.54.0u 2x 5-3-2-10123 v u y 41016481 u 2 u3 u 4 uv-3.3-2.6-1.602.76.812.3 uv u2 v9.95.21.60.02.713.636.914.369.916.20196028Using the table values, Eqs.(iii)-(v) reduces to16.2 7 A 0 28 C 7 A 28 C 16.214.3 0 28 B 0 28 B 14.369.9 28 A 0 196 C 28 A 196 C 69.9On solving the simultaneous equations, we getA 2.07, B 0.511, C 0.061 . u 2v Equation (ii) becomes v 2.07 0.511u 0.061u 2 .Put u 2x 5 then y 2.07 0.511(2 x 5) 0.061(2 x 5) 2 .i.e., y 1.04 0.198 x 0.244 x 2 .Which is the best fit of the parabola.Example 7. Fit a 2nd degree parabola for the following data:xy1989 1990 1991 1992 1993 1994 1995 1996 1997352 356 357 358 360 361 361 360 359Solution: Since number of observations is odd and h 1.x x0 x 1993y y0 y 357 x 1993 and v y 357 so that the parabolahh11of fit y a b x cx 2 .(i)Taking u becomes v A B u C u 2 (ii)The normal equations are v nA B u C u 2 .(iii) uv u B u 2 C u3 .(iv) u 2v A u 2 B u3 C u 4 (v)xyu x 1993 v y 360 1013443216941014916

u v u2 u3 u4 uv u 2v 0 11 60 51 9 0 708Using the table values, Eqs.(iii)-(v) reduces to11 9 A 60 C 9 A 60 C 1151 60 B 60 B 51 9 60 A 708 C 60 A 708 C 9On solving the simultaneous equations, we get69417247.A , B , C 23120924694 17247 2Equation (ii) becomes v u u .231 20924Substituting u x 1993 and v y 357 into Eq,(i), we get694 17247y 357 ( x 1993) ( x 1993) 2 .231 20924i.e., y 1000106.41 1034.29 x 0.267 x 2 .Example 8. The pressure and volume of a gas related to the equation p v k where and kbeing constants. Fit this equation to the following data:0.51.01.52.02.53x p (kg / cm2 )y v (liters )1.621.000.750.620.52Solution: Given p v k (i)where and k are constants to be determined.Taking log,log10 p log10 v log10 k log10 v log10 k log10 plog10 v 1 1log10 k log10 p Y A B X .(ii)11where Y log10 v, A log10 k , B , X log10 p .i.e., Normal equations of (ii) are Y nA B X XY A X B X 2pvX log10 pY log10 25-0.1130-0.16090.090600.03100.09060.15830.2276 1.0511 0.7442 0.4214 0.5981 X Y XY X20.46

Here, n 6Substituting the values of X , Y , XY , X2into the normal equations, we get 0.7442 6 A 1.0511 B 0.4214 1.0511A 0.5981 BSolving these, we get A 0.0132 and B 0.783611 1.1276Now B 0.78361Again , A log10 k log k A k anti log( A) anti log( A) anti log(0.0168) 1.039 .Substituting the values of and k in Eq.(i), we getp v1.1276 1.039.Which is the required curve.Example 9. An experiment gave the following data350 400 500 600v ( ft / min)612672.6t (min)It is known that v and t are connected by v a t b . Find the best possible values of a and b.Solution: Given v a t b is the non-linear equation. .(i)Where a and b are constants to be determined.Taking log on both sides, we getlog10 v log10 a b log10 t Y A B X is the linear equationwhere Y log10 v , X log10 t , A log10 a , B b.The normal equations aretvX log10 t350400500600612672.61.78531.41500.84510.4150 X Y nA B Xand XY A X B X 2 .Y log10 .1872.0020.7140.172 Y XY X2 10.6234 11.658 6.075 4.4604Here, n 4. The normal equations become10.6234 4 A 4.4604 B and 11.658 4.4604 A 6.075BSolving these, A 2.845 and B b 0.1697 .Now A log10 a a anti log( A) anti log(2.845) 699.8 .Substituting the values of a and b into Eq.(i), we getv 699.8 t 0.1697 .Example10. By the method of least squares, find the straight line that best fits the followingdata:x12345

y1427405568Home work problem.3.4 CorrelationIn a bivariate distribution, if the change in one variable affects a change in the othervariable, the variables are said to be correlated.If the two variables deviate in the same direction i.e., if the increase (or decrease) in oneresults in a corresponding increase (or decrease) in the other, correlation is said to be direct orpositive.Fig.1. Positive CorrelationFig.2. Negative Correlatione.g., the correlation between income and expenditure is positive.If the two variables deviate in opposite direction i.e., if the increase (or decrease) in oneresults in a corresponding decrease (or increase) in the other, correlation is said to be inverse ornegative.e.g., the correlation between volume and the pressure of a perfect gas or the correlationbetween the price and demand is negative.Correlation is said to be perfect if the deviation in one variable is a followed by acorresponding proportional deviation in the other.3.4.1 Scatter or dot diagramsIt is the simplest method of the diagrammatic representation of bivariate data. Let( xi , yi ), i 1, 2,3,., n be a bivariate distribution. Let the values of the variables x and y beplotted along the x-axis and y-axis on a suitable scale. Then corresponding to every ordered pair,there corresponds a point or dot in the xy-plane. The diagram of dots so obtained is called a dotor scatter diagram.If the dots are very close to each other and the number of observations is not very large, afairly good correlation is expected. If the dots are widely scattered, a poor correlation isexpected.3.4.2 Coefficient of CorrelationCoefficient of correlation ( r ) lies between -1 and 1, i.e., 1 r 1 .If r is zero; no correlation between two variables, positive correlation ( 0 r 1 ); when bothvariables increase or decrease simultaneously, and negative correlation ( 1 r 0 ); whenincrease in one is associated with decrease in other variable and vice-versa.3.4.3 Karl Pearson Coefficient of Correlation

Coefficient of correlation ( r ) between two variables x and y is defined asCovariance(x, y) XY(remember)r 22Variance(x) Variance(y ) x yXY where X x x , Y y y , x , y are means of x and y data values.1 Cov(x, y ) XY is the covariance between the variables x and y,n x , y y are means of x and y series respectively, alsox nn x X2n Y 2and y nare called the Standard Deviation (SD) of x and y respectively. XY ( x x )( y y ) X 2 Y 2 ( x x )2 ( y y )2n xy x y22n x 2 x n y 2 y Alternate form : r ( x, y ) That is r ( x, y ) Here n is the number of pairs of values of x and y.Example 1. If Cov(x, y ) 10, Var( x) 25, Var( y ) 9 , find coefficient of correlation.Covariance(x, y)1010Solution: r 0.67.Variance(x) Variance(y)25 9 5 3Example 2. Calculate coefficient of correlation from the following data:xy915816714613511412310Solution: Karl Pearson coefficient of correlation ( r ) is given by r where X x x , Y y y ,Here x x 45 5 ,nx987654321 xy1516141311121089 y 45 1089X x x43210-1-2-3-4y x , y are means of x and y data values. y 108 12 .n9Y y y3421-10-2-4-3X216941012916 X2Y291641104169 Y 2XY1212410041212 XY 60 60 572819 XY X 2 Y 2

The Karl Pearson coefficient of correlation is r XY X 2 Y 2 5757 0.95 .60 60 60Example 3. Psychological tests of intelligence and of engineering ability were applied to 10students. Here is a record of ungrouped data showing intelligence ratio (I.R) and engineeringratio (E.R). Calculate the coefficient of correlation.Student ABCDEFGHIJIR104 1051021011009998969392ER101 103100989596104929794Solution : Karl Pearson coefficient of correlation ( r ) is given by r where X x x , Y y y ,Here x x 990 99 ,nStudentABCDEFGHIJ10x , y are means of x and y data values.y I.R (x)1041051021011009998969392 xE.R (y)101103100989596104929794 y 990 980 XY (i) X 2 Y 2 y 980 98 .n10X x x653210-1-3-6-7 XY y y3520-3-26-6-1-4 YX236259410193649 X2Y292540943636116 Y 2XY182560-30-618628 XY 0 170 140 92 0Substituting these values in Eq.(i), we get r XY X 2 Y 2 9292 0.59.170 140 154.3Example 4. Find the coefficient of correlation between the values of x and y (using alternateform):x1357810y81215171820Solution : Here, n 6 .xy13578121517x2192549y264144225289xy83675119

810 x1820 y 34 9064100 x324400 y22 1446 248144200 xy 582Karl Pearson's coefficient of correlation is given byn xy x y6(582) (34)(90)r ( x, y ) 0.98792222226(248) 34 6(1446) 90 n x x n y y Shortcut Method for Karl Pearson Coefficient of Correlation We can also find Karl Pearson Coefficient of Correlation by taking assumed means asshown:If we take X x a, Y y bwhere a and b are assumed means of x and y data values.x a. If x ’s are equispaced with height h , we can take : u hy b.Similarly y ’s are equispaced with height k , we can take : v kn uv u vThen r ( x, y ) .22n u 2 u n v 2 v Example 5. Find the co-efficient of correlation for the following table:x101418222630y18122463036x 22y 24, v Solution : Let u 902226301111130362244422 u v u uv v 3 3 19Here n 6. 19 12The Karl Pearson Coefficient of Correlation : r ( x, y ) i.e., r ( x, y) 6(12) ( 3)( 3)6(19) 3 26(19) 3 2 n uv u vn u 2 u 6363 3 105 105 105 5Therefore, r ( x, y ) 0.6. x 2 y 2 x y 2.Example 6. Establish the formula r 2 x y2n v 2 v 2

where r is the correlation coefficient between x and y. Using the above formula, calculate the"coefficient of correlation” from the following 135Solution: Let z x y , then z x y .Therefore, z z ( x y ) ( x y )z z (x x ) ( y y )Squaring on both sides, we get( z z )2 ( x x ) 2 ( y y ) 2 2( x x )( y y )Operating ‘ ’ on both sides, we get ( z z )2 ( x x )2 ( y y )2 2 ( x x )( y y ) ( z z )2 ( x x )2 ( y y )2 2 ( x x )( y y )nnn22r ( x x )( y y ) n x y x y x y.2 x y2Therefore, r n z x y 2r x y222which is the required result.Home work: Using the above formula, calculate the "coefficient of correlation” from the givendata. Try yourself, submit through the e-mail (nanjundappace@gmail.com)3.5 RegressionRegression is a statistical method used in finance, investing, and other disciplines that attempts todetermine the strength and character of the relationship between one dependent variable (usuallydependent variable y) and a series of other variables (known as independent variable x) and viceversa.Use of Regression Analysis(i) In the field of Business, this tool of statistical analysis is widely used. Businessmen areinterested in predicting future production, consumption, investment, prices, profits and sales etc.(ii) In the field of economic planning and sociological studies, projections of population, birthrates, death rates and other similar variables are of great use.3.5.1 Linear RegressionRegression describes the functional relationship between dependent and independent variables;which helps us to make estimates of one variable from the other. Correlation quantifies theassociation between the two variables; whereas linear regression finds the best line that predicts yfrom x and x also from y. The difference between correlation and regression is illustrated in theadjoining figure.

CorrelationRegression3.5.2 Lines of RegressionA line of regression is the straight line which gives the best fit in the least square sense to thegiven frequency.In case of n pairs ( xi , yi ); i 1, 2,3,., n. from bivariate data, we have no reason orjustification to assume y as dependent variable or x as independent variable. Either of the twomay be estimated for the given values of the other. Thus if we wish to estimate y for given valuesof x, we shall have the regression equation of the form y a bx , called the regression line of yon 'x'. If we wish to estimate x for given values of y, we shall have the regression line of the formx a by , called the regression line x on y.Thus it implies, in general, we always have two lines of regression.3.5.3 Derivation of Lines of Regression3.5.3(i) Line of Regression of y on xTo obtain the line of regression of y on x, we shall assume y as dependent variable and x asindependent variable. Let the equation of regression line of y on x isy a bx (i)The normal equations as derived by the method of least Square are: y na b x .(ii) xy a x b x2 (iii)Solving (ii) and (iii) for 'a' and 'b', we getn xy x yandb 2n x 2 x a y b x y b x .nnSubstituting the values of 'a' in Eq.(i), we gety y b( x x ) (iv)Equation (iv) is called regression line of y on x,. 'b' is called the regression coefficient of y on xand is usually denoted by b yx .Hence Eq.(iv) can be written asy y byx ( x x )is called the regression line y on x.where x , y are the mean values of x and y respectively, while

byx n xy x yn x 2 x 2. (Remember)In equation (iii), shifting the origin to ( x , y ) , we get ( x x )( y y ) a ( x x ) b ( x x ) .(v).We know that ( x x ) 0 ,X 2 ( x x )2 2 ( x x )2 n 22xnxn XY ( x x )( y y ) ( x x )( y y ) n x y X 2 Y 2 ( x x )2 ( y y )2 ( x x )( y y ) rn x yr Equation (v) reduces to ( x x )( y y ) a ( x x ) b ( x x )2 rn x y a (0) b n x2 y x yThat is byx rcalled the regression coefficient (slope of line of regression) y on x. xHere r is the coefficient of correlation, y and x are the standard deviation of x and y seriesTherefore b rrespectively.Note: The regression line of y on x is y y byx ( x x ) (remember) ycalled the regression coefficient (slope of line of regression) y on x. xWhere byx r3.5.3(ii) Line of Regression of x on yProceeding in the same way as 4.5.2(i), we can derive the regression line of x on y asx x bxy ( y y )is called the line of regression of x on yHere bxy is the regression coefficient of x on y and is given bybxy orn xy x yn y 2 y bxy r2 x ywhere the terms have their usual meanings.Here b yx and bxy are known coefficients of regression and are connected by the relation: ybyx bxy r x x r y 2 r .

Note : If r 0 , the two lines of regression become x x and y y which are two straight linesparallel to x and y axes respectively and passing through their means y and x . They aremutually perpendicular.If r 1 , the two lines of regression will coincide.3.5.4 Properties of Regression Coefficients Asbyx bxy r , the coefficient of correlation (r) is the geometric mean between thetwo regression coefficients.byx bxy byx bxy r , arithmetic mean of the two regression coefficients isSince2greater than or equal to the correlation coefficient ( r ).If there is a perfect correlation between the two variables under consideration, thenbyx bxy r ; and the two lines of regression coincide. Converse is also true, i.e. if twolines of regression coincide, then there is a perfect correlation.Since byx bxy r 2 0 , the signs of both regression coefficients b yx and bxy andcoefficient of correlation ( r ) must be same; either all three negative or all positive.Since byx bxy r 2 1 , if one of the regression coefficients is greater than unity, othermust be less than unity.Point of intersection of two lines of regression is ( x , y ), where x and y are the means xand y series respectively.If both lines of regression cut each other at right angle, there is no correlation between thetwo variables; i.e., r 0.3.5.5 Angle between the Lines of RegressionIf be the acute angle between the two regression lines for two variables x and y, then1 r 2 x y tan .r x 2 y 2 Proof: The two lines of regression are given by: y( x x ) .(i) x y and x x r x ( y y ) or y y ( x x ) .(ii) yr xy y rIf m1 and m2 are slopes of lines (i) and (ii), thenr y m m1tan 2, where m1 and m2 y1 m1m2 xr x

y r y 1 y r r x x r x tan 2 r y y y1 1 x r x x 1 r 2 x y Therefore, tan (iii)r x 2 y 2 When r 0,tan 2Therefore, the two lines of regression are perpendicular to each other. When r 1, tan 0 0Therefore, the two lines of regression are coincidentExample 1. The two regression equations of the variables x and y are x 18.13 0.87 y andy 11.64 0.54 x . Find (1) the mean of x’s and y’s, (2) the co-efficient of correlation between xand y.Solution: Given x 18.13 0.87 y .(i)y 11.64 0.54 x (ii)andSince the mean of x’s and y’s lie on the two regression lines, we havex 18.13 0.87 y .(iii)y 11.64 0.54 x .(iv)and(1) On solving the above equations, we get x 15.79 and y 3.74.(2) Regression coefficient y on x from Eq(ii) is byx 0.54 and Regression coefficient x on yfrom Eq(i) is bxy 0.87.Therefore, the coefficient of correlation is the geometric mean between the two regressioncoefficients is given by r byx bxy ( 0.54)( 0.87) 0.66 0.66.(here the -sign is taken, since both the regression coefficients are - sign ).Example 2. In the partially destroyed laboratory record, only the lines of regression of y on xand x on y are available as 4 x 5 y 33 0 and 20 x 9 y 107 respectively. Calculate (ii) xand y , and (ii) the co-efficient of correlation between x and y.Solution: Given 4 x 5 y 33 .(i)20 x 9 y 107 (ii).and(i) Since the mean of x’s and y’s lie on the two regression lines (i) and (ii), we have4 x 5 y 3320 x 9 y 107 .On solving these equations, we have x 13 and y 17.433(ii) The regression line y on x from the Eq(.(i) is y x .(iii)554The regression coefficient y on x is byx .59107y Similarly, the regression line x on y from the Eq(.(ii) is x .(iii)2099The regression coefficient x on y is bxy .20

Therefore, the coefficient of correlation is the geometric mean between the two regression 4 9 coefficients is given by r byx bxy 0.36 0.6 0.6 . 5 20 (here, the sign is taken, since both the regression coefficients are sign ).Example 3. In the following table are recorded data showing the test scores made by salesmenon an intelligence test and their weekly sales :Salesmen12345678910Test Scores x 40 70 50608050 9040 60 60Sales(000) y2.5 6.0 4.55.04.52.0 5.53.0 4.5 3.0Calculate the lines of regression of sales (y) on test scores (x) and estimate the most probableweekly sales volume if a sales man makes a score of 70.Solution: Determine the regression line of sales (y) on test scores (x): y y byx ( x x ) .where byx n xy x yn x x 2From the table, we havex mean of x (test scores) 2. x 600 60n10 y 40.5 4.05 .y mean of y (sales) n10Test scores x Sales(000) y 03.0 y 40.5 x 600Therefore, byx n xy x yn x 2 x 2and 0.06 .The required regression line y on x is y 4.05 (0.06)( x 60)i.e., y 0.06 x 0.45 .When x 70 , y 0.06(70) 0.45 4.65 .Thus the most probable weekly sales volume if a sales man makes a score of 70 is 4.65.Example 4. Following data depicts the statistical values of rainfall and production of wheat in aregion for a specified time period.Mean Standard DeviationProduction of Wheat (kg. per unit area) y108

Rainfall (cm) x82Estimate the production of wheat (y) when rainfall (x) is 9cm if correlation coefficient betweenproduction and rainfall is given to be 0.5.Solution: Let the variables x and y denote rainfall and production respectively.Given that x 8, x 2; y 10, y 8, r 0.5.Now equation of regression of y on x is given by:y y r y(x x ) x(0.5)(8)( x 8)2 y 10 2( x 8) y 2x 6 0 . y 2x 6That is the production of wheat on the rain fall.When rainfall is 9cm (x), production (y) of wheat is estimated to be 2(9) 6 12 kg. per unitarea. y 10 Example 5. Find the coefficient of correlation and the lines of regression for the datagiven below:n 18, x 12, y 18, x2 60, y 2 96, xy 48.Solution: (i) The coefficient of correlation: r ( x, y ) n xy x yn x x 2(ii) Equations of regression lines: y y byx ( x x ) ,Now x x 12 0.67,n18 x2 xn2y 2n y y 2x x bxy ( y y ) . y 18 1.n18 x 16 12 2.9 x 1.7. n 18 18 y 2 y 222296 18 4.33 y 2.08. nn18 18 y 1.7 2.08 bxy r x (0.57) byx r (0.57) 0.47 . 0.7 ; y x 2.08 1.7 y2(i) The coefficient of correlation: r 18(48) (12)(18)18(60) 12 218(96) 18 2 0.57(ii) Equations of regression lines :y y byx ( x x ) , x x bxy ( y y ) y 1 0.7( x 0.67) , x 0.67 0.47( y 1) y 0.7 x 0.53 , x 0.47 y 0.2 .Example 6. Find the correlation coefficient between x and y, when the two lines ofregression are given by: 2 x 9 y 6 0 and x 2 y 1 0 .Solutio

The process of constructing an approximate curve x which fit best to a given discrete set of points ,xyii in., is called curve fitting Principle of Least Squares: The principle of least squares (PLS) is one of the most popular methods for finding the curve of best fit to a given data set ,nii. Let be the equation of the curve to be fitted to .

Related Documents:

For best fitting theory curve (red curve) P(y1,.yN;a) becomes maximum! Use logarithm of product, get a sum and maximize sum: ln 2 ( ; ) 2 1 ln ( ,., ; ) 1 1 2 1 i N N i i i N y f x a P y y a OR minimize χ2with: Principle of least squares!!! Curve fitting - Least squares Principle of least squares!!! (Χ2 minimization)

Least Squares Fitting Least Square Fitting A mathematical procedure for finding the best-fitting curve to a given set of points by minimizing the sum of the squares of the offsets ("the residuals") of the points from the curve. The sum of the squares of the offsets is used instead of the offset absolute values because this allows the

I. METHODS OF POLYNOMIAL CURVE-FITTING 1 By Use of Linear Equations By the Formula of Lagrange By Newton's Formula Curve Fitting by Spiine Functions I I. METHOD OF LEAST SQUARES 24 Polynomials of Least Squares Least Squares Polynomial Approximation with Restra i nts III. A METHOD OF SURFACE FITTING 37 Bicubic Spline Functions

Other documents using least-squares algorithms for tting points with curve or surface structures are avail-able at the website. The document for tting points with a torus is new to the website (as of August 2018). Least-Squares Fitting of Data with Polynomials Least-Squares Fitting of Data with B-Spline Curves

designing, controlling or planning. There are many principles of curve fitting: the Least Squares (of errors), the Least Absolute Errors, the Maximum Likelihood, the Generalized Method of Moments and so on. The principle of Least Squares (method of curve fitting) lies in minimizing the sum of squared errors, 2 2 1 n [ ( , )] i i i s y g x b

Part 5 - CURVE FITTING Describes techniques to fit curves (curve fitting) to discrete data to obtain intermediate estimates. There are two general approaches for curve fitting: Least Squares regression: Data exhibit a significant degree of scatter. The strategy is to derive a single curve that represents the general trend of the data .

Curve fitting by method of least squares for parabola Y aX2 bX c ƩY i aƩX i 2 bƩX i nc ƩX i Y i aƩX i 3 bƩX i 2 cƩX i ƩX i 2Y i aƩX i 4 bƩX i 3 cƩX i 2 P.P.Krishnaraj RSET. Curve fitting by method of least squares for exponential curve Y aebX Taking log on both sides log 10 Y log 10 a bXlog 10 e Y A BX ƩY i nA BƩX i ƩX i Y i AƩX

American National Standards Institute (ANSI) A300 (Part 6) – 2012 Transplanting for Tree Care Operations – Tree, Shrub, and other Woody Plant Maintenance Standard Practices (Transplanting) Drip line The hole should be 1.5-2 times the width of the root ball. EX: a 32” root ball should have a minimum wide 48” hole