> with(plots):
> with(stats):
Warning, these names have been redefined: anova, describe, fit, importdata, random, statevalf, statplots, transform
> with(fit):
Warning, the names leastmediansquare and leastsquare have been redefined
Data from Exercise 41 page 31 (populations of Mexico).
> d1:=[1950,1960,1970,1980,1990];
> d2:=[25.8,34.9,48.2,66.8,81.1];
> data:=[seq([d1[i],d2[i]],i=1..5)];
> plot(data,style=point);A:=%:
> log_d:=[ln(25.8),ln(34.9),ln(48.2),ln(66.8),ln(81.1)];
> fit[leastsquare[[x,y]]]([d1,log_d]);
>
> M:=x->exp(-54.05960143+.2939833640e-1*x);
> plot(M(x),x=1950..1990);C:=%:
> display(C,A);
In the lynx fur problem, we are trying to fit data to a curve of the form
. We will look for
to be of the form
. In order to reduce this problem to the exponential curve fitting method described above, first subtract the value of the linear model
from the data points. To model the envelop of this data, we onlky need to consider the extrema of this modified data. Since the period of the data has been estimated to be 10 years, the minima and maxima occur every five years. Since
and
oscillate between -1 and 1, to model the envelop, we take the absolute value of these data points (the highs and lows). To this data, we apply the above method of exponential curve fitting.