Logistic Curves: An Interactive Demonstration

This applet is designed to provide hands-on understanding of logistic curves. There are instructions below.

How to use this applet:

On the bottom panel, you will see the current values for the following parameters:
  1. or K = Saturation, or the level at which the curve levels off. This represented by the blue line on the graph.
  2. or tm = Midpoint, or "turning point" of the curve, or the time at which growth begins to decrease. In analytical terms, tm is the inflection point of the curve. This is represented by the purple circle on the graph.
  3. or Dt = Growth Time, or the time during which the curve grows from 10% to 90% of its saturation level. When Dt is negative, the curve decreases over time. This is represented by the green hash marks on the graph.
Changing parameters: To change a parameter, click on the corresponding button on the right panel. The button will turn red, as will the parameter's marker on the graph, which means you can change the value of that parameter.

Fitting curves: Finally, you can do a least-squares regression to find the best-fitting curve by dragging the ''F'' onto the graph. This regression method is taken from Numerical Recipes by Press, et. al. Note that the algorithm is iterative, so if the curve doesn't look right, you may need to do this a few times before the parameters converge to their best values.

Locking parameters: Because sometimes a parameter will not converge, it may be useful to lock some of the parameters to a constant value while fitting the others. To do this, drag the key onto the lock icon next to the parameter you wish to lock. When you try to fit a curve, the algorithm will hold constant the parameters that you have locked. Naturally, if you wish to unlock a parameter, drag the key onto the lock icon again.

Browsing through data sets: There are four sets of data to explore; to look at the other sets, select one from the selection bar at the top of the applet.

What is a logistic curve?

Logistic curves are used to model growth and diffusion, like the height of a sunflower, the aggregate length of railroads, or the cumulative works of an author. Such curves are S-shaped, following the equation
y(t) = K / exp( (-ln(81)/Dt) * (t-tm)) )

Logistic curves can be fit to time-series data using Levenberg-Marquardt least-squares regression. In simple terms, this method works by taking initial values for the three parameters we described above, and adjusts them according to their derivatives. After a number of iterations, the parameters converge to some final values. (Because of arbitrary limits on the number of iterations, sometimes the fitting algorithm must be run more than once; i.e., you may need to drag the "F" more than once before the values converge.)

For a detailed description of the mathematics of logistic curves, see our Loglet web page.

For more applications of logistic curves, see our paper on modelling populations.

For a more formal treatment of the Levenberg-Marquardt method, read the relevant sections of Chapter 15 in Numerical Recipes, from which the code originates. (I went through the small trouble writing Java wrapper class for it) You will need either a PostScript viewer (like Ghostview) or Acrobat Reader to browse the book on-line; these viewers are freely available.

Written by Jason Yung, December 1997


Welcome What's New Publications Index Online Publications
PHE Staff Directions
to PHE Other links RU Home

Maintained by psm/jwy