Population Genetics: Hardy-Weinberg Equilibrium with Two Loci

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

In population genetics, the distribution of genotypes and phenotypes in many instances follows a Hardy-Weinberg equilibrium. If represents the frequency of a dominant allele and is the frequency of the corresponding recessive allele , the genotypes , , and occur in the ratios , persisting from generation to generation. Since both the homozygous phenotype and the heterozygous (hybrid) phenotype will exhibit the dominant trait, the fractional occurrence of the dominant and recessive traits occurs in the ratio . Thus, contrary to some early misconceptions, a recessive trait can persist in a population. The principle was discovered independently by Wilhelm Weinberg, a German physician, and G. H. Hardy, the famous British mathematician (who took pride in the belief that none of his work would ever find practical application). Deviation from H–W equilibrium can be caused by one of several perturbing factors, including constrained mating, occurrence of mutations, random genetic drift, and natural selection.


The Hardy-Weinberg equilibrium can be generalized to haplotypes involving two (or more) loci. When there is no linkage between the alleles, say and with dominant frequencies and , respectively, the genotypes and phenotypes are simply products of two independent H–W distributions. Linkage disequilibrium can occur if the allele frequencies influence one another. This can be quantified by a parameter , such that the composite haplotype frequencies are given by , , , and . If no linkage occurs, . In this Demonstration, the 16 possibilities for offspring genotypes are plotted on a two-dimensional bar chart. Because the maximum possible value for cannot exceed any allele frequency, the slider will sometimes move as you drag an allele frequency slider.

For purposes of illustration, the two traits are chosen to be hair color (brown or blond) and eye color (brown or blue), with brown dominant in both cases. This is actually a gross oversimplification: in real life, the genetics of hair and eye color are much more complex. (For example, coauthor S. M. Blinder, offspring of parents with blue and brown eyes, finds himself with green eyes!)


Contributed by: S. M. Blinder and Amy Blinder (March 2011)
Open content licensed under CC BY-NC-SA



Snapshot 1: a single-locus Hardy-Weinberg distribution pertaining to eye color

Snapshot 2: with equal genetic frequencies, a 9:3:3:1 distribution of phenotypes

Snapshot 3: a possible haplotype distribution in central parts of Norway, Sweden, and Finland, where at least 80% of the population is blond and blue-eyed

References: Hardy-Weinberg Principle, Linkage Disequilibrium

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.