Hardy Weinberg
Hardy-Weinberg: expected genotype frequencies from p, or compare observed counts with an exact equilibrium test.
About this tool
Allele frequency p for A gives q = 1−p for a. Hardy-Weinberg genotype frequencies are AA: p², Aa: 2pq and aa: q²; the table shows percentages. Two alleles and three genotypes refer to a biallelic autosomal locus in diploid individuals.
For counts, enter whole observed numbers. N is their sum and p = (2×AA+Aa)/(2N). The table compares counts with N×p², N×2pq and N×q². Expectations need not be integers. Results update for valid inputs; CSV exports the displayed frequencies or observed and expected counts.
P is the two-sided exact test conditional on allele counts described by Wigginton et al. (2005): it sums all possible genotype configurations with probability no greater than the observed one. It is neither mid-P nor twice a one-sided test. χ² = Σ(O−E)²/E has one degree of freedom here; its approximation is unreliable with small expected counts. With only one allele, no informative test is shown.
A small P indicates a departure from the model; a large P does not prove equilibrium. The model assumes independent individuals and random mating. Genotyping errors, population mixtures or other influences can cause departures. This tool does not model individual inheritance, multiple alleles or sex chromosomes.
At most one million individuals in total. No significance decision or multiple-testing correction. Extremely small P values below numerical representability appear as <1e−300. Output is rounded; very small positive values use scientific notation. Local processing without storage.