Method of least square
Upcoming SlideShare
Loading in...5
×
 

Method of least square

on

  • 571 views

 

Statistics

Views

Total Views
571
Views on SlideShare
571
Embed Views
0

Actions

Likes
0
Downloads
21
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Method of least square Method of least square Presentation Transcript

  • BY: SOMYA BAGAI11CSU148
  •  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.
  •  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
  •  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
  • 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.
  • METHOD OF LEASTSQUAREbxayLET be the straight line togiven data inputs. (1)2^.......2^22^12)^1(2^1)(1111eneeSbxayebxayeytye2^einibxiayiS12)^(
  • 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
  • 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.
  • x y2 1443 172.84 207.45 248.86 298.5Q.FIT A RELATION OF THE FORM ab^xxBnAYxBAYbxayxabylnlnln^2^xBxAxY
  • 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)
  •  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.
  • 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.