Invertebrates are more polymorphic than vertebrates. The variation provided by genetic polymorphism is a significant source of raw material upon which natural selection can act. Migration, mutation, genetic drift, nonrandom mating, and selection will cause a shift in the Hardy-Weinberg equilibrium. Gene flow is the movement of genes from one population to another through migration or hybridization. Gene flow is affected by the distance between populations, how much individuals move during or before they reach reproductive age, and the distance over which mating takes place.
Genetic drift is loss of an allele from a population.
This is more likely to occur if a population is small because the loss of a single breeding individual will greatly affect gene frequencies. Nonrandom mating increases the proportion of homozygotes. Inbreeding has no effect on allele frequencies. Inbreeding tends to throw deleterious recessive alleles together, which is typically not favored by natural selection. Marriage between close relatives contributes to inbreeding.