Biology
Hardy-Weinberg Sampling Calculator
Calculate q, expected pp, pq, and qq shares and counts, observed sample p, and a binomial sampling standard-error reference.
Decision view
Expected and observed genotype sample
| Sample size | Allele q frequency | Expected pp share | Expected pq share | Expected qq share | Sample size bounded by population | Expected pp in effective sample | Expected pq in effective sample | Expected qq in effective sample | Observed sample p frequency | Finite-population correction | Finite-population adjusted p standard error |
|---|
How to use Hardy-Weinberg Sampling Calculator
- Enter reference p and sample size.
- Enter the three observed genotype counts.
- Check expected shares sum to one.
- Compare expected and observed endpoints.
Calculator guide
Understanding Hardy-Weinberg Sampling Calculator
Hardy-Weinberg proportions provide an expected genotype composition from allele frequencies. A sample can differ from that expectation, so expected and observed counts must remain separate.
Calculation method
How the calculation works
Detailed calculation process
Compare expected genotype counts with the observed sample
The default uses p = 0.62, a 400-individual sample, and observed counts of 150 pp, 190 pq, and 60 qq.
What each symbol means
Worked substitution with the default inputs
The default expected counts are 153.76 pp, 188.48 pq, and 57.76 qq; observed p is 0.6125 versus the entered 0.62.
Purpose-built visual
Compare genotype counts with a grouped dumbbell
Each genotype has one expected and one observed endpoint on the same count scale, while the allele-frequency reference stays in a separate summary.
Worked situations
Practical examples
- Expected heterozygotes are 188.48.
- Observed p is 0.6125.
- Expected and observed counts use different information.
Better inputs
Useful tips
- Validate genotype coding.
- Use a formal goodness-of-fit test when inference is required.
- Interpret population structure before attributing a deviation.
Before relying on the result
Limitations and common mistakes
- Hardy-Weinberg assumptions may fail under selection, migration, mutation, nonrandom mating, drift, or structure.
- The standard error is only an approximate reference.
- This page does not perform a chi-square significance test.
Reference
Key terms
- Allele frequency
- Share of gene copies carrying an allele.
- Genotype frequency
- Share of individuals with a genotype.
- Heterozygote
- Individual carrying one p and one q allele.
- Expected count
- Sample size multiplied by expected share.
Important note
Calculated from the entered values using the displayed biological or statistical model. Study design, sampling, measurement quality, and biological variation affect interpretation.
Frequently asked questions
Why can expected counts be decimals?
They are probability-based averages, not literal partial individuals.
Must observed counts equal the sample-size field?
They should describe the intended sample; the observed-frequency denominator uses their actual sum.
Is a visible gap statistically significant?
Not necessarily; use an appropriate inferential test.
Why is heterozygote share 2pq?
pq and qp are the two allele-order combinations.