Generate a population that violates Hardy-Weinberg expectations, calculate allele frequencies, expected genotypes, and interpret χ².
Generate genotype counts, estimate p and q, calculate Hardy-Weinberg expectations, and detect deviation from equilibrium.