## File: VisualizationHistogram.htm

package info (click to toggle)
cain 1.10+dfsg-2
• area: main
• in suites: stretch
• size: 29,856 kB
• sloc: cpp: 49,612; python: 14,988; xml: 11,654; ansic: 3,644; makefile: 133; sh: 2
 file content (62 lines) | stat: -rw-r--r-- 2,012 bytes parent folder | download | duplicates (4)
 `1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162` `````` Histogram Distance

Histogram Distance

In the previous section we studied the transient behavior of the Schlogl model by recording the populations in a series of histograms. We saw that the populations settled into a bi-modal distribution. The plot showing the probability distributions for the species population is reproduced below.

The total variation metric may be used to measure the distance between two probability distributions. For two histograms (with the same lower bound and bin width) having bin values of xi and yi, this metric is half the sum of the absolute values of the bin differences.

D = Σ|xi - yi| / 2

Because the histogram represents a probability distribution, the sum of the bins is unity, Σ xi = 1. The factor of 1/2 in the distance metric normalizes the distance to be between 0 and 1.

Hitting the histogram distance button   in the simulation output panel will bring up a window that allows us to select a pair of histograms. (One may also select a set of histograms, in which case the average distance will be computed. In this way one may, for instance, determine the average distance for a set of species.) Below we see that as time advances the distance beween successive frames decreases.

``````