Hardy–Weinberg Equilibrium
Compare observed genotype counts at one locus with expected frequencies under Hardy–Weinberg equilibrium.
Results
—
- Allele A frequency p
- —
- Allele a frequency q
- —
- Observed heterozygosity Hobs
- —
- Expected heterozygosity Hexp
- —
- Heterozygote deficit coefficient F
- —
- χ² statistic (when χ² test selected)
- —
- Number of individuals N
- —individuals
Results update automatically when the required values are entered.
Method, applicability and sources
Calculation method
N=AA+Aa+aa, p=(2AA+Aa)/(2N), q=1−p. Expected counts under equilibrium are N×p², N×2pq, and N×q². Hobs=Aa/N, Hexp=2pq, and F=1−Hobs/Hexp (undefined if Hexp=0). The exact test enumerates the conditional distribution of heterozygote counts with observed allele counts fixed. Its two-sided p-value sums probabilities of configurations no more probable than the observed configuration, without mid-p adjustment. χ²=Σ(observed−expected)²/expected, with 1 degree of freedom because p is estimated from the data. The χ² approximation is calculated only when every expected count is at least 5.
Worked example (hypothetical values)
For AA=60, Aa=30, aa=10, and N=100, p=0.75 and q=0.25. Expected counts are 56.25, 37.5, and 6.25; Hobs=0.3, Hexp=0.375, and F=0.2. χ²=4, with a p-value of approximately 0.04550026 at 1 degree of freedom.
Applicability and limitations
A single diploid biallelic locus in individuals sampled independently from the same population. Enter only individuals with confirmed genotypes. Excludes multiallelic, sex-linked, haploid or polyploid loci; family data; duplicate individuals; missing-data imputation; population-structure correction; multiple-testing correction; one-sided tests; mid-p; and disease diagnosis.
Method and sources
Method: Wigginton, Cutler & Abecasis (2005), probability-ordered two-sided exact; Pearson χ² df=1 (estimated allele frequency). Data recorded: 2026-11-14.
- American Phytopathological Society: Hardy-Weinberg Equilibrium (biallelic and expected frequencies)
- Wigginton, Cutler, Abecasis (2005):A Note on Exact Tests of Hardy-Weinberg Equilibrium
- University of Michigan CSG: SNP-HWE exact test (conditional distribution and resources)
- Distributions of Hardy-Weinberg Equilibrium Test Statistics (2008):χ² df=1