CE 205: Numerical Methods: Curve-Fitting (Linear and Non-Linear Regression)
CE 205: Numerical Methods: Curve-Fitting (Linear and Non-Linear Regression)
Interpolation
-for very precise data
- Ex: density of water at different temp.
Least-squares Regression
-for imprecise/noisy data
- Purpose is trend analysis
Least-square regression
Visually sketch a line that conforms to the
data
Linear interpolation
Connect the data points consecutively by
lines segments
Polynomial interpolation
Connect the data points consecutively by
simple curves
n xi yi xi yi
a1
n x x
2
2
i i
a0 y a1 x
Sr
Standard error of the estimate: s y/ x
n2
(a) the spread of data around the (b) the spread of the data around
mean of the dependent data the best fit line:
i 1 i 1
St Sr
r
2
St
i1 i1
a0 a1x1 a2 x2 am xm
y
i1 i1
power : y 2 x 2
x
saturation - growth - rate : y 3
3 x
exponential : y 1e1 x ln y ln 1 1 x