Hardy–Weinberg Equilibrium
Biology, Genetics
Intro: From observed counts $n_{AA},\ n_{Aa},\ n_{aa}$ with total $N$, estimate $p=\dfrac{2n_{AA}+n_{Aa}}{2N}$ and $q=1-p$. Under HWE, expected genotype frequencies are $p^2,\ 2pq,\ q^2$, so expected counts are those times $N$. We also report $\chi^2=\sum \dfrac{(O-E)^2}{E}$ with $\mathrm{df}=1$.
Worked example
- AA=45, Aa=30, aa=25
- Total: $N=45+30+25=100$.
- Allele frequencies: $p=\dfrac{2\cdot45+30}{2\cdot100}=\dfrac{120}{200}=0.6$; hence $q=1-p=0.4$.
- Expected frequencies (HWE): $p^2=0.36$, $2pq=0.48$, $q^2=0.16$.
- Expected counts: $E_{AA}=0.36\cdot100=36$, $E_{Aa}=0.48\cdot100=48$, $E_{aa}=0.16\cdot100=16$.
- Chi-square: $\chi^2=\dfrac{(45-36)^2}{36}+\dfrac{(30-48)^2}{48}+\dfrac{(25-16)^2}{16}=2.25+6.75+5.0625=14.0625$.
- Degrees of freedom: $\mathrm{df}=1$.
- Conclusion (e.g., $\alpha=0.05$): $\chi^2=14.0625$ with $\mathrm{df}=1$ indicates significant deviation from HWE (p-value $<0.001$).
- Answer: $\boxed{p=0.6,\ q=0.4;\ E_{AA}=36,\ E_{Aa}=48,\ E_{aa}=16;\ \chi^2=14.0625,\ \mathrm{df}=1}$.
FAQs
How are p and q computed?
Use $p=\dfrac{2n_{AA}+n_{Aa}}{2N}$ and $q=1-p$ for a diploid sample of size $N$.
When is chi-square valid?
Prefer expected counts $\ge 5$ in each cell; for small samples or rare alleles, use an exact test.
Why choose MathGPT?
- Get clear, step-by-step solutions that explain the “why,” not just the answer.
- See the rules used at each step (power, product, quotient, chain, and more).
- Optional animated walk-throughs to make tricky ideas click faster.
- Clean LaTeX rendering for notes, homework, and study guides.
How this calculator works
- Type or paste your function (LaTeX like
\sin,\lnworks too). - Press Generate a practice question button to generate the derivative and the full reasoning.
- Review each step to understand which rule was applied and why.
- Practice with similar problems to lock in the method.