Allele Frequencies

High schoolBiologyMigration, random mating, viability selection and optional seeded finite-population allele sampling

Unlock this lab with a pass

A pass opens every simulation on the site, including Present mode for class. The teaching notes below stay free for everyone.

One-time payment, no subscription.

About this experiment

Follow a two-allele population through generations and separate the effects of selection, migration and drift. Inspect Hardy-Weinberg genotype expectations while testing which processes alter allele frequency.

Learning goals

  • Calculate expected genotype proportions from allele frequency.
  • Explain how genotype fitness changes the breeding contribution.
  • Compare deterministic frequency changes with seeded finite-population sampling.

How to use it

  1. 1Advance one generation at a time under the starting fitness values.
  2. 2Choose neutral reproduction and verify a constant allele frequency.
  3. 3Choose migration only and follow movement toward the migrant frequency.
  4. 4Enable drift, compare different seeds, and test an all-zero-fitness breeding pool.

The model

Migration changes the breeding allele pool before selection.
Mean fitness weights random-mating genotypes.
The selected allele frequency is undefined when mean fitness is zero.

Assumptions

  • Every step first mixes a fraction of migrant alleles, then forms random-mating genotype expectations, then applies relative viability fitness.
  • The selected A frequency counts both A copies in AA and half the copies in Aa. With finite drift enabled, the next generation samples 2N gene copies independently with replacement.
  • The diagram shows expected genotype fractions for the current allele frequency before the next migration event, not observed finite-population genotype counts.
  • There is no mutation or explicit age structure. Relative fitness values are nonnegative, and a breeding pool with zero total fitness produces no offspring.
  • After reproduction fails, later generations remain undefined. Migration can rescue a missing viable allele only before that failure in the configured generation step.

Try this in class

  1. Q1Why can neutral random mating change genotype proportions without changing allele frequency?
  2. Q2Can migration introduce an allele that selection then favours?

Frequently asked questions

Does the genotype diagram count actual sampled individuals?

No. Its areas show Hardy-Weinberg expectations from the current allele frequency.

Why does a trajectory stop instead of becoming zero?

Zero mean breeding fitness means there is no offspring population. An allele frequency of zero would incorrectly imply a surviving population containing only a alleles.