Generate a mystery population that may or may not fit Hardy-Weinberg expectations, then use calculations to decide.
Generate genotype counts without knowing the true mode first, then calculate allele frequencies and test the Hardy-Weinberg hypothesis.