Ce 311K - Mckinney Hw-10 Curve Fitting: Regression and Interpolation
Ce 311K - Mckinney Hw-10 Curve Fitting: Regression and Interpolation
Ce 311K - Mckinney Hw-10 Curve Fitting: Regression and Interpolation
x 5 10 15 20 25 30 35 40 45 50
y 16 25 32 33 38 36 39 40 42 42
Use least-squares regression to fit the following equations to the data in the table above
(Compare your results by preparing a plot of the data and each of your equations on a
single graph using Excel).
where a and b are constant coefficients. For example, the following graph shows data
and a saturation – growth curve from the equation above.
This equation is often used to model population growth under conditions where the
population y levels off (saturates) as x increases. To linearize the equation we can invert
it to give
Now, the equation can be written in terms of the new variables Y = 1/y and X = 1/x
Thus a plot of Y versus X is a straight line, with a slope of m = b/a and an intercept of s =
1/a.
2
x y x xy
5 16 25 80
10 25 100 250
15 32 225 480
20 33 400 660
25 38 625 950
30 36 900 1080
35 39 1225 1365
40 40 1600 1600
45 42 2025 1890
50 42 2500 2100
Sums 275 343 9625 10455
so
(b) Parabola
2 3 4 2
x y x X X xy xy
5 16 25 125 625 80 400
10 25 100 1000 10000 250 2500
15 32 225 3375 50625 480 7200
20 33 400 8000 160000 660 13200
25 38 625 15625 390625 950 23750
30 36 900 27000 810000 1080 32400
35 39 1225 42875 1500625 1365 47775
40 40 1600 64000 2560000 1600 64000
45 42 2025 91125 4100625 1890 85050
50 42 2500 125000 6250000 2100 105000
Sums 275 343 9625 378125 15833125 10455 381275
Therefore
2
X=1/x Y=1/y X XY
0.2000 0.0625 0.0400 0.0125
0.1000 0.0400 0.0100 0.0040
0.0667 0.0313 0.0044 0.0021
0.0500 0.0303 0.0025 0.0015
0.0400 0.0263 0.0016 0.0011
0.0333 0.0278 0.0011 0.0009
0.0286 0.0256 0.0008 0.0007
0.0250 0.0250 0.0006 0.0006
0.0222 0.0238 0.0005 0.0005
0.0200 0.0238 0.0004 0.0005
Sums 0.5858 0.3164 0.0620 0.0244