Population genetics Hardy-Weinberg equilibrium solver and clinical pedigree inheritance simulator.
Hardy-Weinberg Principle: In an infinitely large, panmictic (random-mating) population with no mutation, migration, or natural selection, allele and genotype frequencies remain constant across generations: $p + q = 1$ and $p^2 + 2pq + q^2 = 1$.
Chi-Square ($\chi^2$) Goodness-of-Fit: $\chi^2 = \sum \frac{(O - E)^2}{E}$ test with $1$ degree of freedom ($\text{critical value } = 3.841\text{ at }\alpha=0.05$) evaluates deviation from equilibrium.
Pedigree Inheritance Patterns: Autosomal Dominant (vertical transmission, no skipped generations), Autosomal Recessive (horizontal clustering in siblings, $25\%$ recurrence risk for carrier parents), and X-Linked Recessive (predominantly affects hemizygous males via carrier mothers).
Operating Instructions: Switch between Hardy-Weinberg population calculator and Pedigree tree simulator in the tabs below.
Click any individual in the tree to toggle their phenotype status between Unaffected, Carrier, and Affected.
| Genotype | Observed (O) | Expected (E = N·freq) | (O - E)² / E |
|---|