Population Growth Models
Part 4.5: Fitting a Logistic Model to Data, I
In the figure below, we repeat from Part 4.1 a plot of the actual U.S. census data through 1940, together with a fitted logistic curve. (Recall that the data after 1940 did not appear to be logistic.)
In this part, we will use the differential equation
- to tell whether a given set of data is reasonably logistic,
and, if so,
- to decide what parameters r and K will give a good fit.
In Part 4.6 we will use the known form of the solution rather than the differential equation to fit a model function. In this part, we will only use the differential equation itself. Our test case will be the U.S. Census data, first up to 1940, then up to 1990.
To determine whether a given set of data can be modeled by the logistic differential equation,

we have to estimate values of the derivative dP/dt from the data. We will do that by symmetric differences, as shown in the following figure. (Symmetric difference approximations to derivatives are discussed in more detail in Part 2 of this module.) So the slope dP/dt at a given census year t is approximated by the slope of the line joining the points 10 years earlier and 10 years later. See the figure below.
Symmetric Difference Approximation

For example, the growth rate dP/dt in 1900 was approximately

Of course, for the period from 1790 through 1940, we can calculate these slope estimates only from 1800 through 1930, because we need a data point before and after each point at which we are estimating the slope.
In the original form of the logistic differential equation

the right-hand side is a quadratic function of P. Now, we rewrite the logistic equation in terms of the productivity rate (i.e., the ratio of dP/dt to P)

- In this form, the equation says that the productivity rate is a linear function of P, i.e., the graph of the proportional growth rate versus P is a straight line. Find the slope and vertical intercept of this line.
The observation in step 1 gives us a test of logistic behavior:
- Calculate the approximate ratios of dP/dt to P.
- Plot these ratios against the corresponding values of P.
- If the resulting plot is approximately linear, then a logistic model is reasonable.
The same graphical test tells us how to estimate the parameters:
- Fit a line of the form y = mx + b to the plotted points. The slope m of the line must be -r and the vertical intercept rK must be b.
- Take r to be -m and K to be b/r.
Let's apply this approach to the U. S. population data.
- Use the commands in your worksheet to construct symmetric difference estimates of dP/dt for the U.S. population data, to find ratios of dP/dt to the populations P, and to plot these ratios against P. You should find that the plot is roughly linear -- but only roughly.
- Estimate the slope and vertical intercept of a line that will reasonably fit the plotted points.
- Use the numbers in the preceding step to estimate r and K.
- Check your work by plotting r (K - P) on top of the plotted points. If necessary, adjust r and/or K until you are satisfied with the fit.
- Interpret your final parameter values in terms of early growth of the U.S. population and ultimate size of the population. Are these numbers realistic? Why or why not?
- Use the next set of commands in your worksheet to extend the logistic test to U.S. population data through 1990. In what way does the plot tell you that a logistic model for this data would not be reasonable? (Click here to see the census data again.)