4. Introduction
Least Square Methods (LSM) is probably the
most popular technique in statistics for
modelling.
With applications in fields as diverse as
statistics, finance, medicines, economics &
psychology.
Least squares is a way to use data to make
quantitative predictions.
5. History
Gauss
Legendre
First published by Legendre in 1805’s
paper ‘New Methods for Determination
of the Orbits of Comets’.
In 1809, Gauss published a memoir in
which he mentioned that he had
previously discovered LSM and it as
early as 1795 in estimating the orbit of
an asteroid.
Both Gauss and Legendre used the
method of least squares to understand
the orbits of comets, based on inexact
measurements of the comets’ previous
locations.
6. Curve Fitting
What is curve fitting?
capturing the trend in the data by assigning a
single function across the entire range.
For example…
x
y
Approximate fitting of a straight line
7. f(x) = ax + b
For each line
Interpolation
x
f(x)
8. f(x) = ax + b
For each line
Curve Fitting
f(x) = ax + b
For entire range
x
f(x)
9. The straight line,
𝒇 𝒙 = 𝒂𝒙 + 𝒃
should be fitted through the given points
𝒙 𝟏, 𝒚 𝟏 , … , (𝒙 𝒏, 𝒚 𝒏) so that the sum of the squares of the
distances of those points from the straight line is
minimum, where the distance is measured in the vertical
direction (the y-direction).
The distance between the observed
point and expected point is called
‘error’ or ‘residual’;
𝒆𝒊 = 𝒚𝒊 − 𝒇(𝒙𝒊)
Least Squares Method
The ‘best’ line has minimum error between line and data points.
x
y 𝒙𝒊, 𝒚𝒊
𝒚𝒊 − 𝒂 − 𝒃𝒙𝒊
𝒂 + 𝒃𝒙𝒊
𝒚 = 𝒂 + 𝒃𝒙
𝒙𝒊
18. Limitations
Most serious limitation: The determination of the
type of the trend curve to be fitted, whether we
should fit a linear or a parabolic trend or some
other more complicated trend curve.
The addition of single new observation
necessitates all the calculations to be done
afresh.
This method requires more calculations and
quite tedious and time consuming as compared
with other methods.
19. If P is the pull required to pull the load W by means of a pulley
block, find a linear law of the form P=mW+ c connecting P and
W (in kg.wt), using the following data
Compute P when W=150 kg.wt
Sol- The corresponding normal Equations are
𝑃 = 4𝑐 + 𝑚 𝑊 ; 𝑊𝑃 = 𝑐 𝑊 + 𝑚 𝑊2
P= 12 15 21 25
W=50 70 100 120
W P W² WP
50
70
100
120
12
15
21
25
2500
4900
10000
14400
600
1050
2100
3000
Total =340 73 31800 6750
Example
20. Substituting the values
73 = 4c + 340m ;
6750 = 340c + 31800m
Example contd…
With little algebra,
we get
m = 0.1879 & c = 2.2785
Hence the line if best fit is
P = 2.2759 + 0.1879 W
When W= 150 kg,
P= 2.2785 + 0.1879 X 150 = 30.4635
0
5
10
15
20
25
30
0 50 100 150
P
W
P vs W
P
0
5
10
15
20
25
30
0 50 100 150
P
W
P vs W
P(expected)
21. References
https://priceonomics.com/the-discovery-of-statistical-regression/
http://web.iitd.ac.in/~pmvs/courses/mel705/curvefitting.pdf
Least Squares Fitting of Data to a Curve/ Gerald Recktenwald/
Portland State University/ Department of Mechanical Engineering
Fundamentals of Statistics, S.C. Gupta
Higher Engineering Methods, Dr. B.S. Grewal
Advanced Engineering Method, ERWIN KREYSZIG
http://mathworld.wolfram.com/LeastSquaresFittingLogarithmic.htm
l
http://mathworld.wolfram.com/LeastSquaresFittingExponential.html
http://mathworld.wolfram.com/LeastSquaresFittingPowerLaw.html