342 Curve Fitting and Biological Modeling
a. From the graphs these command produce, why does it seem most
reasonable to fit the data with a cubic?
b. From SSEs computed by these commands, why does it seem rea-
sonable to fit the data with a cubic?
8.3.7. Running aidsdata creates a variable cmlJan1982
-
Dec1987
with monthly data on cumulative AIDS cases that is more detailed
than that in Table 8.4. Modify the commands in the last problem to fit
polynomials of various degrees to this data. Based on both the graphs
and SSE, what degree polynomial do you think is a good one to fit
this data? Is a cubic polynomial still a reasonable choice to model it?
8.3.8. Consider the three data points (1, 3), (2, 5), and (3, 10), and the prob-
lem of fitting a horizontal line of the form y = c to them.
a. What matrix equation would have a solution if all these points were
on a horizontal line? What is the associated normal equation? What
is the least-squares, best-fit horizontal line?
b. Show the result in part (a) could be found by averaging the y-
coordinates of the data.
c. Show that, for any set of data points, the least-squares, best-fit
horizontal line is always given by y =
¯
y, where
¯
y is the average
y-coordinate of the data.
8.3.9. The CDC’s AIDS data provides a good example of why caution is
necessary in extrapolating. In MATLAB, type aidsdata to de-
fine the variables cmlJan1982
-
Dec1987, the monthly cumulative
number of AIDS cases from January 1982 to December 1987, and
cmlJan1982
-
Dec2000, the monthly cumulative number of cases
from January 1982 to December 2000.
a. Use MATLAB to plot cmlJan1982
-
Dec1987, find the best-fit
cubic modeling that data, and plot the cubic with the data. Does
the cubic seem to be an adequate fit?
b. Plot the data cmlJan1982
-
Dec2000, along with the prediction
of the data given by the cubic you found in part (a). Are they close?
c. What biological, medical, or social factors might be responsible
for what you observed in part (b)?
d. What degree polynomial is needed to provide a reasonable model
of the data cmlJan1982
-
Dec2000? Find a good polynomial
model and graph it along with the data.
8.3.10. Simple infectious disease models result in approximately exponential
growth of the number of infectives in the early stages of an epidemic.