Simulate Wright–Fisher generations and see random sampling push an allele toward fixation or loss.
In a finite population, the next generation is a random sample of gene copies from the current generation. This sampling noise causes genetic drift. Selection biases the sampling probability, but drift is strongest when population size is small.