SlideShare a Scribd company logo
1 of 13
BY: SOMYA BAGAI
11CSU148
 A LAW THAT CONNECTSTHETWOVARIABLE OF A
GIVEN DATA IS CALLED EMPIRICAL LAW. SEVERAL
EQUATIONS OF DIFFERENT TYPE CAN BE OBTAINED
TO EXPRESS GIVEN DATA APPROX.
 A CURVE OF “BEST FIT “WHICH CAN PASSTHROUGH
MOST OFTHE POINTS OF GIVEN DATA (OR NEAREST)
IS DRAWN .PROCESS OF FINDING SUCH EQUATION
IS CALLED AS CURVE FITTING .
 THE EQ’N OF THE CURVE IS USED TO FIND
UNKNOWN VALUE.
 To find a relationship b/w the set of paired
observations x and y(say), we plot their
corresponding values on the graph , taking one
of the variables along the x-axis and other along
the y-axis i.e. (x1,y1) (X2,Y2)…..,(xn,yn).
 The resulting diagram showing a collection of
dots is called a scatter diagram. A smooth curve
that approximate the above set of points is
known as the approximate curve
 LET y=f(x) be equation of curve to be fitted to given data
points at the
experimental value of PM is and the corresponding
value of fitting curve is NM i.e .
),)....(2,2(),1,1( ynxnyxyx xix
yi
)1(xf
THIS DIFFERENCE
IS CALLED ERROR.
Similarly we say:
To make all errors
positive ,we square
each of them .
eMINMIPPN 11
)(
)2(22
)1(11
xnfynen
xfye
xfye
2^.........2^32^22^1 eneeeS
THE CURVE OF BEST FIT IS THAT FOR WHICH THE SUM OF
SQUARE OF ERRORS IS MINIMUM .THIS IS CALLED THE
PRINCIPLE OF LEAST SQUARES.
METHOD OF LEAST
SQUARE
bxayLET be the straight line to
given data inputs. (1)
2^.......2^22^1
2)^1(2^1
)(1
111
eneeS
bxaye
bxaye
ytye
2^ei
n
i
bxiayiS
1
2)^(
For S to be minimum
(2)
(3)
On simplification of above 2 equations
(4)
(5)
0)(0)1)((2
1
bxayorbxiayi
a
S
n
i
0)2^(0))((2
1
bxaxyorxibxiayi
b
S
n
i
xbnay
2^xbxaxy
EQUATION (4) &(5) ARE NORMAL EQUATIONS
SOLVINGTHEMWILL 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 , which
is the required parabola of the best fit.
 In general, the curve y=a+bx+cx2 +……+kxm-1 can
be fitted to a given data by writing m normal
equations.
x y
2 144
3 172.8
4 207.4
5 248.8
6 298.5
Q.FIT A RELATION OF THE FORM ab^x
xBnAY
xBAY
bxay
xaby
lnlnln
^
2^xBxAxY
x y Y xY X^2
2 144 4.969 9.939 4
3 172.8 5.152 15.45 9
4 207.4 5.3346 21.3385 16
5 248.8 5.5166 27.5832 25
6 298.5 5.698 34.192 36
20 26.6669 108.504 90
26.67=5A +B20, 108.504=20A+90B
A=4.6044 & B=0.1824
Y=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 minimizes
the sum of squared residuals, a residual being the
difference between an observed value and the
fitted value provided by a model.
 The graphical method has its drawbacks of being
unable to give a unique curve of fit .It fails to give
us values of unknown constants .principle of least
square provides us with a elegant procedure to do
so.
When the problem has substantial uncertainties in
the independent variable (the 'x' variable), then
simple regression and least squares methods have
problems; in such cases, the methodology required for
fitting errors-in-variables models may be considered
instead of that for least squares.
Method of least square

More Related Content

What's hot

Regression analysis
Regression analysisRegression analysis
Regression analysis
saba khan
 
Chapter 2 part3-Least-Squares Regression
Chapter 2 part3-Least-Squares RegressionChapter 2 part3-Least-Squares Regression
Chapter 2 part3-Least-Squares Regression
nszakir
 
Linear regression
Linear regressionLinear regression
Linear regression
Tech_MX
 
Simple linear regression (final)
Simple linear regression (final)Simple linear regression (final)
Simple linear regression (final)
Harsh Upadhyay
 

What's hot (20)

Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Regression analysis.
Regression analysis.Regression analysis.
Regression analysis.
 
Curve fitting
Curve fittingCurve fitting
Curve fitting
 
Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
 
Regression
RegressionRegression
Regression
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Multiple linear regression
Multiple linear regressionMultiple linear regression
Multiple linear regression
 
Least square method
Least square methodLeast square method
Least square method
 
Curve fitting
Curve fittingCurve fitting
Curve fitting
 
Presentation On Regression
Presentation On RegressionPresentation On Regression
Presentation On Regression
 
Regression
RegressionRegression
Regression
 
Chapter 2 part3-Least-Squares Regression
Chapter 2 part3-Least-Squares RegressionChapter 2 part3-Least-Squares Regression
Chapter 2 part3-Least-Squares Regression
 
Least Squares Fitting
Least Squares Fitting Least Squares Fitting
Least Squares Fitting
 
Correlation and Regression
Correlation and RegressionCorrelation and Regression
Correlation and Regression
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-Step
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Curve fitting - Lecture Notes
Curve fitting - Lecture NotesCurve fitting - Lecture Notes
Curve fitting - Lecture Notes
 
Simple linear regression (final)
Simple linear regression (final)Simple linear regression (final)
Simple linear regression (final)
 

Viewers also liked

The least square method
The least square methodThe least square method
The least square method
kevinlefol
 
Hotspots of biodiversity
Hotspots of biodiversityHotspots of biodiversity
Hotspots of biodiversity
Somya Bagai
 
Evolution & structure of erp
Evolution & structure of erpEvolution & structure of erp
Evolution & structure of erp
Somya Bagai
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis ppt
Elkana Rorio
 
Application of least square method
Application of least square methodApplication of least square method
Application of least square method
are you
 
Lesson 8 Linear Correlation And Regression
Lesson 8 Linear Correlation And RegressionLesson 8 Linear Correlation And Regression
Lesson 8 Linear Correlation And Regression
Sumit Prajapati
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
Khalid Aziz
 
Physical and Conceptual Identifier Dispersion: Measures and Relation to Fault...
Physical and Conceptual Identifier Dispersion: Measures and Relation to Fault...Physical and Conceptual Identifier Dispersion: Measures and Relation to Fault...
Physical and Conceptual Identifier Dispersion: Measures and Relation to Fault...
ICSM 2010
 
A tree kernel based approach for clone detection
A tree kernel based approach for clone detectionA tree kernel based approach for clone detection
A tree kernel based approach for clone detection
ICSM 2010
 
Excel Shotcuts
Excel ShotcutsExcel Shotcuts
Excel Shotcuts
Raghu nath
 

Viewers also liked (20)

The least square method
The least square methodThe least square method
The least square method
 
Applied Numerical Methods Curve Fitting: Least Squares Regression, Interpolation
Applied Numerical Methods Curve Fitting: Least Squares Regression, InterpolationApplied Numerical Methods Curve Fitting: Least Squares Regression, Interpolation
Applied Numerical Methods Curve Fitting: Least Squares Regression, Interpolation
 
Ordinary least squares linear regression
Ordinary least squares linear regressionOrdinary least squares linear regression
Ordinary least squares linear regression
 
Curve fitting
Curve fittingCurve fitting
Curve fitting
 
Hotspots of biodiversity
Hotspots of biodiversityHotspots of biodiversity
Hotspots of biodiversity
 
Evolution & structure of erp
Evolution & structure of erpEvolution & structure of erp
Evolution & structure of erp
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis ppt
 
Application of least square method
Application of least square methodApplication of least square method
Application of least square method
 
Random scan displays and raster scan displays
Random scan displays and raster scan displaysRandom scan displays and raster scan displays
Random scan displays and raster scan displays
 
Regression
RegressionRegression
Regression
 
Lesson 8 Linear Correlation And Regression
Lesson 8 Linear Correlation And RegressionLesson 8 Linear Correlation And Regression
Lesson 8 Linear Correlation And Regression
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 
Simpson’s rule short answer question
Simpson’s rule short answer questionSimpson’s rule short answer question
Simpson’s rule short answer question
 
Least Squares
Least SquaresLeast Squares
Least Squares
 
Romberg
RombergRomberg
Romberg
 
Physical and Conceptual Identifier Dispersion: Measures and Relation to Fault...
Physical and Conceptual Identifier Dispersion: Measures and Relation to Fault...Physical and Conceptual Identifier Dispersion: Measures and Relation to Fault...
Physical and Conceptual Identifier Dispersion: Measures and Relation to Fault...
 
A tree kernel based approach for clone detection
A tree kernel based approach for clone detectionA tree kernel based approach for clone detection
A tree kernel based approach for clone detection
 
Excel Shotcuts
Excel ShotcutsExcel Shotcuts
Excel Shotcuts
 
Lesson 3 simpsons rule
Lesson 3 simpsons ruleLesson 3 simpsons rule
Lesson 3 simpsons rule
 

Similar to Method of least square

02.21.2020 Algebra I Quadraic Functions.ppt
02.21.2020  Algebra I Quadraic Functions.ppt02.21.2020  Algebra I Quadraic Functions.ppt
02.21.2020 Algebra I Quadraic Functions.ppt
jannelewlawas
 
4 pages from matlab an introduction with app.-2
4 pages from matlab an introduction with app.-24 pages from matlab an introduction with app.-2
4 pages from matlab an introduction with app.-2
Malika khalil
 
Simple Linear Regression
Simple Linear RegressionSimple Linear Regression
Simple Linear Regression
Sharlaine Ruth
 
6. 1 graphing quadratics
6. 1 graphing quadratics6. 1 graphing quadratics
6. 1 graphing quadratics
Jessica Garcia
 
4.2 stem parabolas revisited
4.2 stem parabolas revisited4.2 stem parabolas revisited
4.2 stem parabolas revisited
math123c
 
Families of curves
Families of curvesFamilies of curves
Families of curves
Tarun Gehlot
 
Pptpersamaankuadrat 150205080445-conversion-gate02
Pptpersamaankuadrat 150205080445-conversion-gate02Pptpersamaankuadrat 150205080445-conversion-gate02
Pptpersamaankuadrat 150205080445-conversion-gate02
MasfuahFuah
 

Similar to Method of least square (20)

02.21.2020 Algebra I Quadraic Functions.ppt
02.21.2020  Algebra I Quadraic Functions.ppt02.21.2020  Algebra I Quadraic Functions.ppt
02.21.2020 Algebra I Quadraic Functions.ppt
 
Unit v
Unit vUnit v
Unit v
 
4 pages from matlab an introduction with app.-2
4 pages from matlab an introduction with app.-24 pages from matlab an introduction with app.-2
4 pages from matlab an introduction with app.-2
 
Simple Linear Regression
Simple Linear RegressionSimple Linear Regression
Simple Linear Regression
 
6. 1 graphing quadratics
6. 1 graphing quadratics6. 1 graphing quadratics
6. 1 graphing quadratics
 
4.2 stem parabolas revisited
4.2 stem parabolas revisited4.2 stem parabolas revisited
4.2 stem parabolas revisited
 
Lesson 8
Lesson 8Lesson 8
Lesson 8
 
maths convergence.pdf
maths convergence.pdfmaths convergence.pdf
maths convergence.pdf
 
1525 equations of lines in space
1525 equations of lines in space1525 equations of lines in space
1525 equations of lines in space
 
Grph quad fncts
Grph quad fnctsGrph quad fncts
Grph quad fncts
 
Linear equation in two variables
Linear equation in two variablesLinear equation in two variables
Linear equation in two variables
 
Regression Analysis.pdf
Regression Analysis.pdfRegression Analysis.pdf
Regression Analysis.pdf
 
Families of curves
Families of curvesFamilies of curves
Families of curves
 
Quadratic equations
Quadratic equationsQuadratic equations
Quadratic equations
 
Curve fitting
Curve fittingCurve fitting
Curve fitting
 
Pptpersamaankuadrat 150205080445-conversion-gate02
Pptpersamaankuadrat 150205080445-conversion-gate02Pptpersamaankuadrat 150205080445-conversion-gate02
Pptpersamaankuadrat 150205080445-conversion-gate02
 
Calc 7.1b
Calc 7.1bCalc 7.1b
Calc 7.1b
 
Interpolation.pptx
Interpolation.pptxInterpolation.pptx
Interpolation.pptx
 
Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...
Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...
Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...
 
Math project
Math projectMath project
Math project
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Method of least square

  • 2.  A LAW THAT CONNECTSTHETWOVARIABLE OF A GIVEN DATA IS CALLED EMPIRICAL LAW. SEVERAL EQUATIONS OF DIFFERENT TYPE CAN BE OBTAINED TO EXPRESS GIVEN DATA APPROX.  A CURVE OF “BEST FIT “WHICH CAN PASSTHROUGH MOST OFTHE POINTS OF GIVEN DATA (OR NEAREST) IS DRAWN .PROCESS OF FINDING SUCH EQUATION IS CALLED AS CURVE FITTING .  THE EQ’N OF THE CURVE IS USED TO FIND UNKNOWN VALUE.
  • 3.  To find a relationship b/w the set of paired observations x and y(say), we plot their corresponding values on the graph , taking one of the variables along the x-axis and other along the y-axis i.e. (x1,y1) (X2,Y2)…..,(xn,yn).  The resulting diagram showing a collection of dots is called a scatter diagram. A smooth curve that approximate the above set of points is known as the approximate curve
  • 4.  LET y=f(x) be equation of curve to be fitted to given data points at the experimental value of PM is and the corresponding value of fitting curve is NM i.e . ),)....(2,2(),1,1( ynxnyxyx xix yi )1(xf
  • 5. THIS DIFFERENCE IS CALLED ERROR. Similarly we say: To make all errors positive ,we square each of them . eMINMIPPN 11 )( )2(22 )1(11 xnfynen xfye xfye 2^.........2^32^22^1 eneeeS THE CURVE OF BEST FIT IS THAT FOR WHICH THE SUM OF SQUARE OF ERRORS IS MINIMUM .THIS IS CALLED THE PRINCIPLE OF LEAST SQUARES.
  • 6. METHOD OF LEAST SQUARE bxayLET be the straight line to given data inputs. (1) 2^.......2^22^1 2)^1(2^1 )(1 111 eneeS bxaye bxaye ytye 2^ei n i bxiayiS 1 2)^(
  • 7. For S to be minimum (2) (3) On simplification of above 2 equations (4) (5) 0)(0)1)((2 1 bxayorbxiayi a S n i 0)2^(0))((2 1 bxaxyorxibxiayi b S n i xbnay 2^xbxaxy EQUATION (4) &(5) ARE NORMAL EQUATIONS SOLVINGTHEMWILL 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 , which is the required parabola of the best fit.  In general, the curve y=a+bx+cx2 +……+kxm-1 can be fitted to a given data by writing m normal equations.
  • 9. x y 2 144 3 172.8 4 207.4 5 248.8 6 298.5 Q.FIT A RELATION OF THE FORM ab^x xBnAY xBAY bxay xaby lnlnln ^ 2^xBxAxY
  • 10. x y Y xY X^2 2 144 4.969 9.939 4 3 172.8 5.152 15.45 9 4 207.4 5.3346 21.3385 16 5 248.8 5.5166 27.5832 25 6 298.5 5.698 34.192 36 20 26.6669 108.504 90 26.67=5A +B20, 108.504=20A+90B A=4.6044 & B=0.1824 Y=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 minimizes the sum of squared residuals, a residual being the difference between an observed value and the fitted value provided by a model.  The graphical method has its drawbacks of being unable to give a unique curve of fit .It fails to give us values of unknown constants .principle of least square provides us with a elegant procedure to do so.
  • 12. When the problem has substantial uncertainties in the independent variable (the 'x' variable), then simple regression and least squares methods have problems; in such cases, the methodology required for fitting errors-in-variables models may be considered instead of that for least squares.