Curve Fitting and The Method of Least Squares
Curve Fitting and The Method of Least Squares
CURVE FITTING
To aid in determining an equation connecting variables, a
first step is the collection of data showing corresponding
values of the variables under consideration.
For example, suppose X and Y denote respectively the
height and weight of adult males. Then a sample or N
individuals would reveal the heights XI,X2, . ., Xn and the
corresponding weights YI, Y2, . Yn. A next step is to
plot the points (XI, YI), (X2,Y2),..,(Xn,Yn) on a
rectangular co-ordinate system. The resulting set of
points is sometimes called a scatter diagram.
From the scatter diagram it is often possible to visualize
a smooth curve approximating the data. Such, a curve is
called an approximating curve.
DATA ANALYSIS & QUALITY CONTROL
CURVE FITTING
In Fig. 13-1, for example. the data appear to be approximated well
by a straight line and we say that a linear relationship exists
between the variables. In Fig. 13-2, however, although a relationship
exists between the variables it is not a linear relationship and so we
call it a non-linear relationship. The general problem of finding
equations of approximating curves which fit given sets of data is
called curve fitting.
DATA ANALYSIS & QUALITY CONTROL
EQUATIONS OF APPROXIMATING
CURVES
For purposes of reference below are listed several common types of
approximating curves and their equations. All letters other than X
and Y represent constants. The variables X and Y are often referred
to as independent and dependent variables respectively, although
these roles can be interchanged.
The right sides of the above equations are called polynomials of the
first, second, third, fourth and nth degree respectively. The functions
defined by the first four of these equations are sometimes called
linear, quadratic. cubic and quartic functions respectively.
DATA ANALYSIS & QUALITY CONTROL
FREEHAND METHOD OF CURVE
FITTING
Individual judgment can often be used to draw
an approximating curve to fit a set of data. This
is called a freehand method of curve fitting.
If the type of equation of this curve is known, it is
possible to obtain the constants in the equation
by choosing as many points on the curve as
there are constants in the equation. For
example, if the curve is a straight line, two points
are necessary: if it is a parabola, three points are
necessary. The method has the disadvantage
that different observers will obtain different
curves and equations.
DATA ANALYSIS & QUALITY CONTROL
PROBLEM 13.8
DATA ANALYSIS & QUALITY CONTROL
PROBLEM 13.11
DATA ANALYSIS & QUALITY CONTROL
PROBLEM 13.11
DATA ANALYSIS & QUALITY CONTROL
PROBLEM 13.11
DATA ANALYSIS & QUALITY CONTROL
PROBLEM 13.12
DATA ANALYSIS & QUALITY CONTROL
PROBLEM 13.13
DATA ANALYSIS & QUALITY CONTROL
EXAMPLE
Measured
7
Applied Time to 6 y = 0.1868x - 1.5825
5
Stress Failure 4 Series1
3 Linear (Series1)
Pa Seconds
2
x y 1
0
10 0.95 0 10 20 30 40
12 1.05
15 1.25
17 1.41
20 1.73 50
y = 4.7891x + 9.9257
40
22 2
30 Series1
25 2.53 20 Linear (Series1)
27 2.98 10
30 3.85 0
0 2 4 6 8
32 4.59
DATA ANALYSIS & QUALITY CONTROL
REGRESSION
Often, on the basis of sample data, we wish to estimate
the value of a variable Y corresponding to a given value
of a variable X. This can be accomplished by estimating
the value of Y from a least square curve which fits the
sample data. The resulting curve is called a regression
curve of Y on X, since Y is estimated from X.
If we desired to estimate the value of X from a given
value of Y we would use a regression curve of X on Y,
which amounts to interchanging the variables in the
scatter diagram so that X is the dependent variable and
Y is the independent variable.
This is equivalent to replacing vertical deviations in the
definition of least square curve by horizontal deviations,
In general the regression line or curve of Y on X is not
the same as the regression line or curve of X on Y.
DATA ANALYSIS & QUALITY CONTROL
PROBLEM NO.13.23
DATA ANALYSIS & QUALITY CONTROL
PROBLEM NO.13.23
DATA ANALYSIS & QUALITY CONTROL
PROBLEM NO.13.23
DATA ANALYSIS & QUALITY CONTROL
PROBLEM NO.13.23
DATA ANALYSIS & QUALITY CONTROL
PROBLEM NO 13.39