Upcoming SlideShare
×
Like this presentation? Why not share!

Like this? Share it with your network

Share

# Method of least square

• 695 views

More in: Technology
• Comment goes here.
Are you sure you want to
Be the first to comment
Be the first to like this

Total Views
695
On Slideshare
695
From Embeds
0
Number of Embeds
0

Shares
29
0
Likes
0

No embeds

### Report content

No notes for slide

### Transcript

• 1. BY: SOMYA BAGAI11CSU148
• 2.  A LAW THAT CONNECTSTHETWOVARIABLE OF AGIVEN DATA IS CALLED EMPIRICAL LAW. SEVERALEQUATIONS OF DIFFERENT TYPE CAN BE OBTAINEDTO EXPRESS GIVEN DATA APPROX. A CURVE OF “BEST FIT “WHICH CAN PASSTHROUGHMOST OFTHE POINTS OF GIVEN DATA (OR NEAREST)IS DRAWN .PROCESS OF FINDING SUCH EQUATIONIS CALLED AS CURVE FITTING . THE EQ’N OF THE CURVE IS USED TO FINDUNKNOWN VALUE.
• 3.  To find a relationship b/w the set of pairedobservations x and y(say), we plot theircorresponding values on the graph , taking oneof the variables along the x-axis and other alongthe y-axis i.e. (x1,y1) (X2,Y2)…..,(xn,yn). The resulting diagram showing a collection ofdots is called a scatter diagram. A smooth curvethat approximate the above set of points isknown as the approximate curve
• 4.  LET y=f(x) be equation of curve to be fitted to given datapoints at theexperimental value of PM is and the correspondingvalue of fitting curve is NM i.e .),)....(2,2(),1,1( ynxnyxyx xixyi)1(xf
• 5. THIS DIFFERENCEIS CALLED ERROR.Similarly we say:To make all errorspositive ,we squareeach of them .eMINMIPPN 11)()2(22)1(11xnfynenxfyexfye2^.........2^32^22^1 eneeeSTHE CURVE OF BEST FIT IS THAT FOR WHICH THE SUM OFSQUARE OF ERRORS IS MINIMUM .THIS IS CALLED THEPRINCIPLE OF LEAST SQUARES.
• 6. METHOD OF LEASTSQUAREbxayLET be the straight line togiven data inputs. (1)2^.......2^22^12)^1(2^1)(1111eneeSbxayebxayeytye2^einibxiayiS12)^(
• 7. For S to be minimum(2)(3)On simplification of above 2 equations(4)(5)0)(0)1)((21bxayorbxiayiaSni0)2^(0))((21bxaxyorxibxiayibSnixbnay2^xbxaxyEQUATION (4) &(5) ARE NORMAL EQUATIONSSOLVINGTHEMWILL GIVE USVALUE OF a,b
• 8. To fit the parabola: y=a+bx+cx2 : Form the normal equations ∑y=na+b∑x+c∑x2 , ∑xy=a∑x+b∑x2 +c∑x3 and∑x2y=a∑x2 + b∑x3 + c∑x4 . Solve these as simultaneous equations for a,b,c.Substitute the values of a,b,c in y=a+bx+cx2 , whichis the required parabola of the best fit. In general, the curve y=a+bx+cx2 +……+kxm-1 canbe fitted to a given data by writing m normalequations.
• 9. x y2 1443 172.84 207.45 248.86 298.5Q.FIT A RELATION OF THE FORM ab^xxBnAYxBAYbxayxabylnlnln^2^xBxAxY
• 10. x y Y xY X^22 144 4.969 9.939 43 172.8 5.152 15.45 94 207.4 5.3346 21.3385 165 248.8 5.5166 27.5832 256 298.5 5.698 34.192 3620 26.6669 108.504 9026.67=5A +B20, 108.504=20A+90BA=4.6044 & B=0.1824Y=4.605 + x(0.182)ln y =4.605 +x(0.182)y= e^(4.605).e^(0.182)
• 11.  The most important application is in data fitting.The best fit in the least-squares sense minimizesthe sum of squared residuals, a residual being thedifference between an observed value and thefitted value provided by a model. The graphical method has its drawbacks of beingunable to give a unique curve of fit .It fails to giveus values of unknown constants .principle of leastsquare provides us with a elegant procedure to doso.
• 12. When the problem has substantial uncertainties inthe independent variable (the x variable), thensimple regression and least squares methods haveproblems; in such cases, the methodology required forfitting errors-in-variables models may be consideredinstead of that for least squares.