Resource Image

Hardy-Weinberg Equilibrium: a swirl resource

Author(s): Abigail E. Cahill

Albion College

1232 total view(s), 395 download(s)

0 comment(s) (Post a comment)

Students will use swirl to understand Hardy-Weinberg equilibrium. The lesson starts with observed numbers of individuals for each genotype, and students will work through a number of steps to assess whether or not the population is in equilibrium.


This lesson will allow students to test a population to see if it meets Hardy Weinberg expectations starting with observed numbers of individuals in each genotype within the population. It will require them to calculate observed allele frequencies, expected genotype frequencies, and use a chi-square test to get (and then interpret) a p-value.

Students should have a basic knowledge of HWE and its equations (p+q=1 and p2+2pq+q2=1) and should know how to assign objects in R.

The lesson was designed as a part of an upper-level Ecological Genetics class, to be completed within a 45-minute class period as a complement to material about HWE.

By the end of this swirl lesson, students will be able to

  1. Test a population for Hardy-Weinberg equilibrium when given observed genotype data (numbers of individuals of each genotype)
  2. Use the chisq.test() function in R and interpret a p-value

Cite this work

Researchers should cite this work as follows:


There are no comments on this resource.