how can variation of traits in a population help in the adaption of the population to its enviornment