5.9 Simulating multiple generations

Currently, we draw once from a binomial distribution to get the number of individuals in one generation who carry the allele of interest. How do we adapt this to simulate multiple generations?


Increasing n (ex: rbinom(n = 10, size = 100, prob = 0.5))

Increasing n only gives you multiple replicate draws from the same distribution.

This doesn’t reflect multiple generations, because the allele frequency doesn’t update between generations based on the new number of alleles – it uses prob = 0.5 every time.