Mammals appear to have the ability to select the gender of their offspring for the benefit of their species, according to a new study that followed three generations of more than 2,300 animals from the San Diego Zoo.

It is not a conscious choice, but in some way, a female's biology has the capability to assess her health, the quality of her mate, and her environment to determine which sex to go with, according to study author and Stanford University evolutionary biologist Joseph Garner.

For a lioness, for example, the safest bet would be to have a female. Even if the cub isn't the strongest or highest-ranking female, she will most likely have at least the average number of cubs.