Pertemuan ke-6
Introduction
Data is often given for discrete values along a continuum. However,
you may require estimates at points between the discrete values
Describes techniques to fit curves to such data to obtain intermediate
estimates
General
eneral approaches for curve fitting :
where the data exhibits a significant degree of error or noise, the strategy is to
derive a single curve that represents the general trend of the data.
data One approach of
this nature is called least-squares
squares regression
where the data is known to be very precise, the basic approach is to fit a curve or a
series of curves that pass directly through each of the points.
points The estimation of
values between well-known discrete points is called interpolation
(b)
b) linear interpolation,
Linear Regression
e = y - a0 - a1x
The
he error, or residual, is the discrepancy between the true value of y and the
approximate value, a0 + a1x , predicted by the linear equation
Linear Regression
Criteria for a "Best" Fit
minimize the sum of the residual errors for all the available data
Linear Regression
Criteria for a "Best" Fit
(b)
b) minimizes the sum of the absolute
values of the residuals,
Linear Regression
Criteria for a "Best" Fit
A third strategy for fitting a best line is the minimax criterion. In this
technique, the line is chosen that minimizes the maximum distance that an
individual point falls from the line
Linear Regression
Minimize the sum of the squares of the residuals between the
measured y and the y calculated with the linear model
Linear Regression
Least-Squares
Squares Fit of a Straight Line
To determine values for a0 + a1
Example
Fit a straight line to the x and y
values in the first two columns
SOLUTION
Xi
Yi
1
0.5
2
2.5
3
2
4
4
5
3.5
6
6
7
5.5
ml X 28 jml Y 24
jml Xi^2
ata X 4
rata Y 3.428571
Xi^2
1
4
9
16
25
36
49
140
Polynomial Regression
For example, suppose that we fit a second-order
second
polynomial or
quadratic
where all summations are from i = 1 through n. Note that the above
three equations are linear and have three unknowns: a0, a1, and a2.
The coefficients of the unknowns can be calculated directly from the
observed data.
The two-dimensional
dimensional case can be easily extended to an mth-order
polynomial as
mth
mth-order
polynomial
EXAMPLE
Fit a second-order
order polynomial to the data in the first
two columns
SOLUTION