UNIT-4 Material 02
UNIT-4 Material 02
UNIT – IV
(CURVE FITTING)
Syllabus:
➢ Scatter diagram,
➢ Method of least squares,
➢ Fitting of a straight line,
➢ Fitting of second degree and kth degree polynomial,
➢ Fitting of exponential curve,
➢ Conversion of data to linear form,
➢ Selection of the type of curve to be fitted.
CURVE FITTING:
Generally, curve fitting falls into two main categories based on how we handle the observed
data:
Scatter diagram: The graphs that present the relationship between two variables in a data-set.
It represents data points on a two-dimensional plane or on a Cartesian system. The independent
variable or attribute is plotted on the X-axis, while the dependent variable is plotted on the Y-axis.
These plots are often called scatter graphs or scatter diagrams.
A scatter plot is also called a scatter chart, scattergram, or scatter plot, XY graph.
The scatter diagram graphs numerical data pairs, with one variable on each axis, show their
relationship.
In general, the least squares method uses a straight line in order to fit through the given points
which are known as the method of linear or ordinary least squares. This line is termed as the
line of best fit from which the sum of squares of the distances from the points is minimized.
Geometrical interpretation of least squares:
The graphical method has the drawback in that the straight line drawn may not be unique, but
the principle of least squares provides a unique set of values to the constants and hence suggests
a curve of best fit to the given data. The method of least squares is probably the most systematic
procedure to fit a unique curve through the given data points.
Example-1:
By the method of least squares find the straight line to the data given below:
.
Example-2:
Home-Work-1:
Home-Work-2:
Home-Work-3:
Home-Work-4:
Let
Which are the normal equations for the fitting of the second order-parabola.
Home-Work-1:
Home-Work-2:
--------------
---------------
----------------
-------------
-----------------
Solving the above equations from the given tabular values, we get a, b, c, and d….values and after
that submit these values in kth degree polynomial.
Home-Work-1:
Home-Work-2:
We write Y = log y and X = log x. Then y = bX + log a which is a linear equation of the form
y = mx + c where m = b and c ='log a. If we plot values of Y (= log y) and X (= log x) and the
graph is a straight line, then the relationship is valid.
Selection of the type of curve to be fitted: There are two types, such are:
(i) The exponential equation 𝑦 = 𝑎𝑏 𝑥 taking logarithms on both sides, we get
Home-Work-1:
Home-Work-2:
Home-Work-3:
(ii) The Power fit calculates the least squares fit through points by using the following
equation:
where a and b are unknown constants, y be a dependent variable, and x-is an independent
variable. This model requires that x>0 for all data points, and either that all y>0 or all y<0.
Spotfire uses a nonlinear regression method for this calculation. This will result in better
accuracy of the calculation compared to using linear regression on transformed values only.
Taking logarithm on both sides, we get
Which is linear in Y and X.
Hence required.
x 2 3 4 5
y 27.8 62.1 110 161
Substituting these values in the normal equations
4A+2.0792b=7.4854
2.0792A+1.1693b=4.0618
Solving these two equations
2.0792A+1.1693b=4.0618
Hence Required.
Home-Work-1:
x 3 5 7 9 11
y 2.3 2.6 2.8 3.2 3.5
Home-Work-2:
Prepared By: