Sample genotype dataset
| Population | AA | Aa | aa | N | p (A) | q (a) |
|---|---|---|---|---|---|---|
| Island birds | 490 | 420 | 90 | 1000 | 0.700 | 0.300 |
| River fish | 160 | 320 | 120 | 600 | 0.533 | 0.467 |
| Forest beetles | 81 | 198 | 121 | 400 | 0.450 | 0.550 |
Hardy–Weinberg relationships for a bi-allelic locus
- p + q = 1 where p is allele A and q is allele a.
- Expected genotype frequencies: AA = p², Aa = 2pq, aa = q².
- Expected counts: multiply each expected frequency by population size N.
- From genotype counts: p = (2·AA + Aa) / (2·N) and q = 1 − p.
- Chi-square test (df=1): χ² = Σ (O − E)² / E using AA, Aa, aa.
Steps to run a reliable equilibrium check
- Select an input mode: counts, frequencies, or allele frequencies.
- Enter N and choose an α level for the test.
- Provide values for the selected mode, then press Calculate.
- Review p, q, expected frequencies, and expected counts above the form.
- If observed data are available, interpret χ² and the p-value.
- Use the download buttons to export results as CSV or PDF.
Why equilibrium checks matter in field samples
Hardy–Weinberg expectations provide a fast baseline for real populations. When observed counts drift from expected counts, it can signal selection, migration, non-random mating, or genotyping error. In a sample of N = 1,000 with p = 0.70, expected AA = 490, Aa = 420, aa = 90. Deviations should be interpreted in context, not as an automatic failure of study quality.
Converting counts into allele frequencies
The calculator estimates p from observed genotypes using p = (2·AA + Aa) / (2·N). For example, AA = 160, Aa = 320, aa = 120 gives p = 0.533 and q = 0.467 at N = 600. These values then drive the expected genotype frequencies p², 2pq, and q², allowing consistent comparison across datasets.
Expected counts and carrier frequency interpretation
Expected genotype counts are frequency × N, which helps planning and reporting. The heterozygote term 2pq is also the carrier frequency for a recessive allele in an ideal population. If q = 0.10, then 2pq ≈ 0.18 and q² = 0.01, meaning about 18% carriers and 1% affected under equilibrium assumptions.
Chi-square decision and practical thresholds
The chi-square statistic sums (O − E)² / E across AA, Aa, and aa. With one bi-allelic locus, df = 1 is common because p is estimated from the data. Using α = 0.05, a p-value below 0.05 suggests a measurable deviation. When expected counts fall below 5, treat chi-square results cautiously and consider exact methods.
Using modes for different study designs
Counts mode supports equilibrium testing and best matches lab outputs. Frequencies mode is useful for reports where proportions are published, while allele mode helps when only p and q are known from prior studies. Normalization is applied if p + q is close but not exactly 1, reducing rounding issues in classroom datasets.
Export-ready outputs for documentation
CSV exports support quick spreadsheet checks, while PDF exports provide a portable snapshot of inputs, allele estimates, expected values, and the equilibrium decision. Use consistent decimal settings across comparisons to avoid confusing rounding differences in audits and publications.
1) What does “fail to reject equilibrium” mean?
It means your data do not show strong evidence of deviation at the chosen α. The population may still deviate slightly, but the test did not detect it.
2) Why is the chi-square test set to df = 1?
For a bi-allelic locus, p is estimated from the sample, reducing one degree of freedom. Many teaching and reporting workflows use df = 1 for this scenario.
3) Can I use frequencies instead of counts?
Yes. Enter genotype frequencies and N. The tool converts them to observed counts for comparison, then computes expected values using the derived p and q.
4) What if my p and q do not sum to 1?
The calculator normalizes p and q when the sum is close to 1, which helps with rounding. Large mismatches should be corrected at the source.
5) When should I avoid chi-square interpretation?
If expected counts are very small (often below 5), the chi-square approximation can be unreliable. Consider larger samples or an exact test approach.
6) Does equilibrium prove no evolution is happening?
No. It only suggests genotype proportions match the equilibrium model for that locus and sample. Other loci, timepoints, or forces can still indicate change.