Crocodilia, the biological order that includes alligators and crocodiles, have the interesting property that the gender of offspring is not determined by random genetics but by the environment of the nesting site. Prime nesting sights, in wet marshes near water sources, produce nearly 80% female hatchlings. The ratio of females decreases to as low as 7% for the less favored nesting sights in dry marshes and levees.
The evolutionary explanation rests on the dynamic that female-dominated populations can grow more rapidly than populations with fewer females. Rapid growth is essential to the survival of populations that have entered a new ecological niche, are recovering from a natural disaster, or recovering from a low point in natural population cycles.
The evolutionary advantage of this form of sex selection is that when the population is small and nesting sites are plentiful, the population members will choose the prime nesting spots, which produce more females, which grows the population faster and makes it better able to dominate the habitat. The effect evens out as the population increases and the utilization of less favorable nesting sites produce more males.
There is, however, a fundamental contradiction in this method having to do with Fisher’s theorem which states that, all else being equal, sex ratios should tend to 50-50. The puzzle is precisely this: suppose that in a small population with plenty of nesting sites, one of the crocs has a genetic mutation that reverses the trend and their hatchlings will be predominately male. These young male offspring will find themselves in a female dominated population with an abundance of reproductive opportunities. Therefore this mutated gene will spread and be more prevalent in subsequent generations, which should have derailed this form nest-specific sex selection long ago.
There is no clear solution to this puzzle, but it most likely has to do with small group size, perhaps enforced the fractal structure of marshland habitats. This type of mutation of a single croc could be so costly to the local group that the group is at significantly higher risk of being wiped out by competing species.
For more on this topic, see J.D. Murray’s Mathematical Biology text, David Sloan Wilson’s work on group selection, or my own work on small at-risk populations.