χ² HW test
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
Formula
Σ(O-E)²/E
About this calculator
The Hardy-Weinberg χ² test is a statistical tool that checks if allele frequencies in a population are in equilibrium according to Hardy-Weinberg principles. It compares observed genotype frequencies with those expected under ideal conditions (large population, random mating, no mutation, migration, or selection).
The formula used is χ² = Σ(O-E)²/E, where O is the observed genotype frequency and E is the expected frequency calculated from allele frequencies. The result is compared to a χ² distribution table to determine if the observed deviations are statistically significant.
This test is commonly used in population genetics to identify factors disrupting equilibrium. It's applied in genetic diversity studies, epidemiology, and evolutionary analysis. Requires count data of genotypes from a representative sample.
Precautions: small sample sizes may lead to errors; the assumption of codominant alleles is critical; and the presence of natural selection, migration, or other evolutionary forces can invalidate results. Significant outcomes suggest at least one Hardy-Weinberg assumption was violated.
Frequently asked questions
What is the purpose of the Hardy-Weinberg χ² test?
It checks if a population's genetic distribution matches Hardy-Weinberg expectations, helping identify evolutionary forces like selection or migration.
What data is needed for this calculator?
Observed genotype frequencies from a population sample and theoretically calculated expected allele frequencies are required.
How do I interpret the test results?
If the calculated χ² value exceeds the critical value from the table, reject the equilibrium hypothesis due to evolutionary influences.
When should I avoid using this test?
Avoid with small samples (<50 individuals) or when artificial selection, recent mutations, or non-codominant alleles are present.