This graph simulates random genetic drift in a population of 20 haploid individuals. At each generation, the number of offspring an individual has can be 0, 1, 2, 3, etc. As a result of this, the allele frequency will change randomly over time, even though there's no difference in fitness between the alleles.
Twenty generations of random drift
The second graph models random drift as well, only it gives you the chance to try different combinations of initial allele frequency and population size. The graph shows the frequency of the red allele over time.
One result of the neutral theory is that eventually, one allele or the other will get fixed in the population--it will go to a frequency of 1.0. Pick an initial allele frequency and make the population size fairly small, like 100, and set the number of generations to 5 times the population size. Set the number of replications to a large number, such as 100 or 1000. You should see that the red allele either becomes fixed or lost. Sometimes this happens quickly, and sometimes it happens slowly. You may have a small number of replicates which remain polymorphic to the end of the time you've graphed, but you should be able to see that if you ran the simulations for more generations, eventually, they'd reach fixation too.
Another result from the neutral theory is that the probability of fixation of an allele is equal to its frequency. For example, if you set the initial red allele frequency to 0.40 and ran a large number of replicates, the red allele should become fixed in about 0.40 of the replicates, and it should become lost in about 0.60.
This page was last revised March 6, 2009. Its address is http://udel.edu/~mcdonald/evoldrift.html.
©2009 by John H. McDonald. You can probably do what you want with this content; see the permissions page for details.