Python, music, sports, gaming and philosophy.

Main menu

Tag Archives: recessive

I still remember my 10th grade Biology teacher explaining that because blonde hair is a recessive trait it will slowly vanish off the face of the earth. Recently I read a news article with a similar claim, and had an argument with a few other biology and genetic majors. So I wrote a simulation.

TraitSim is an animated toy for exploring random, neutral gene proliferation with brown and blue eyes as an example. I also wrote a python version of the simulation and ran it tens of thousands of times. Thanks pypy for the 8.3x speedup! Surprisingly the chance to win the gene-race is linear with the gene’s initial prevalence as can be seen in the following graph thanks to matplotlib.

The thing with dominance is that it affects the gene expression which can be seen in the following graph: