Understand the relationship
The reasoning behind the result
The square connects allele probabilities to genotype expectations
(p+q)² = p² + 2pq + q² = 1
Under the model, independently sampled parental alleles have probabilities p for A and q for a. Two A alleles give p², two a alleles give q², and the two orders A/a and a/A contribute 2pq to heterozygotes. Multiplying these proportions by N produces expected counts.
These are model expectations, not measured genotype frequencies. Hardy–Weinberg reasoning assumes an appropriate randomly mating, diploid, two-allele population model; population structure, related sampling, selection and observation error affect interpretation.
An inverse solve can have two valid answers
Given H=2q(1−q): q=(1±√(1−2H))/2
If the aa proportion is supplied under HWE, q is its nonnegative square root. If the heterozygote proportion H is supplied, the quadratic is symmetric in p and q: H=0.32 supports q=0.2 and q=0.8. The calculator retains both and swaps their homozygote proportions.
H cannot exceed 0.5 in this model. Calling heterozygotes carriers does not choose the rarer-allele branch or establish a disease model; carrier-frequency searches resolve here as explicit heterozygote arithmetic.
Observed data require their own comparison
Observed AA, Aa and aa counts determine the allele frequencies and fitted expected counts. The table reports each observed-minus-expected difference. The exact comparison conditions on the sample size and observed allele-copy totals and considers all compatible heterozygote counts.
The reported two-sided P value adds configurations whose conditional probabilities are no greater than the observed configuration's probability, including ties. It is an ordinary conditional exact P value, with no mid-P adjustment and no automatic pass/fail threshold.
A statistical comparison cannot establish the cause
A small P value describes discordance with the specified null model under its sampling assumptions. It cannot distinguish population mixture, genotype error, related sampling, selection or another cause. A large P value does not prove equilibrium or validate a dataset.
The comparison is for one autosomal, biallelic, diploid record. Multiple-testing control, uncertain genotype likelihoods, sex-chromosome models and related-individual methods require a different analysis. Extremely small P values are accompanied by their base-10 logarithm.
Follow the numbers
A 32% heterozygote expectation has two branches
- Set 2q(1−q)=0.32, so q²−q+0.16=0.
- The discriminant is 1−0.64=0.36 and its square root is 0.6.
- The two solutions are (1−0.6)/2=0.2 and (1+0.6)/2=0.8.
- For 1000 individuals, the first branch expects 640 AA, 320 Aa and 40 aa; the second expects 40 AA, 320 Aa and 640 aa.
The same heterozygote proportion supports different allele identities and homozygote expectations; both solutions must be retained.
Quick guide
How to use this calculator
- Choose an observed-count comparison or an explicitly assumed equilibrium input.
- Enter proportions on a 0–1 scale. Observed-count mode accepts 1–100000 typed individuals in total.
- Inspect both inverse branches when only heterozygote proportion is known. In observed mode, a P value is not the probability that equilibrium is true.
Calculation method
Calculation and interpretation
Distinguish observed genotype counts, equilibrium expectations and statistical evidence about their agreement.
p+q=1; E[AA]=Np², E[Aa]=2Npq, E[aa]=Nq². For observed counts, p=(2nAA+nAa)/(2N); exact-test P sums conditional configurations no more probable than observed.
Worked example
A 32% heterozygote expectation has two branches
The same heterozygote proportion supports different allele identities and homozygote expectations; both solutions must be retained.
p+q=1; E[AA]=Np², E[Aa]=2Npq, E[aa]=Nq². For observed counts, p=(2nAA+nAa)/(2N); exact-test P sums conditional configurations no more probable than observed.
Supported inputs
Precision and limits
Population model, not individual risk
No genotype, clinical carrier status, disease probability, ancestry or reproductive risk is inferred for an individual. Equilibrium assumptions must be justified independently.
Exact comparison scope
One autosomal, biallelic, diploid locus with independent, accurately typed observations. The two-sided conditional test includes equal-probability configurations, uses no mid-P adjustment and supplies no automatic rejection threshold. At most 100000 typed individuals.
Continue calculating
Related calculators