How to use this calculator
Iterate deterministic viability selection for a biallelic randomly mating diploid population.
- Enter Initial allele A frequency, Relative fitness AA, Relative fitness Aa, Relative fitness aa, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Diploid viability selection allele recursion explained
How the calculation works
pnext=[p²wAA+p(1−p)wAa]/[p²wAA+2p(1−p)wAa+(1−p)²waa]
Form Hardy–Weinberg genotype proportions from the current allele frequency. Weight AA, Aa, and aa by their relative fitnesses, normalize by mean fitness, and count surviving A alleles. Repeat the same random-mating selection step for the entered number of generations.
Set up the calculation
p— Initial allele A frequency- Starting proportion of A alleles, from 0 to 1. Genotype proportions are formed from this allele frequency under the stated Hardy–Weinberg assumption.
aa— Relative fitness AA- Relative reproductive fitness assigned to AA individuals; only its value relative to the other genotypes affects this deterministic update.
ab— Relative fitness Aa- Relative reproductive fitness assigned to heterozygous Aa individuals.
bb— Relative fitness aa- Relative reproductive fitness assigned to aa individuals.
n— Generations to iterate- Number of selection updates to apply. Zero leaves the starting allele frequency unchanged; use a whole number.
Limits of this model
Hardy–Weinberg zygotes each generation, constant genotype fitness, infinite population, and no mutation, migration, or drift.
Check this example
Initial allele A frequency = 0.2; Relative fitness AA = 1.1; Relative fitness Aa = 1; Relative fitness aa = 0.8; Generations to iterate = 10.
- Allele A frequency after selection: 0.58139521
- Allele a frequency: 0.41860479
Reading the outputs
The displayed frequency is the A-allele share after the requested number of selection generations. Compare it with the starting frequency to see whether the entered genotype fitnesses favor A; equal fitnesses leave the frequency unchanged.
Frequently asked questions
Are fitness values probabilities?
They can be relative nonnegative fitness values; only ratios affect the update.
Does the model include dominance?
The heterozygote fitness explicitly determines its position relative to both homozygotes.
What if all present genotypes have zero fitness?
The next generation is undefined and rejected.
How do I use the Diploid viability selection allele recursion calculator?
Enter Initial allele A frequency, Relative fitness AA, Relative fitness Aa, Relative fitness aa, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Diploid viability selection allele recursion?
Initial allele A frequency = 0.2; Relative fitness AA = 1.1; Relative fitness Aa = 1; Relative fitness aa = 0.8; Generations to iterate = 10. Allele A frequency after selection: 0.58139521 Allele a frequency: 0.41860479
Read our calculation methodology.