>Episode 2: Hardy and Weinberg to the rescue
Using a chisquare to test for HW genotypic frequencies
Now may be a good time to review the chisquare test if you need to (see the Goodness of Fit module). The table below will help you keep track of the calculations required. You don't need to enter the exact numbers  as long as you are reasonably close, the program will fix the answers and gray them out when you click the "check" buttons.
Remember, you're trying to show that the study's distribution of genotypes (62:36:2) does, in fact, fit the HardyWeinberg model (61:34:5).
group  o  e  oe  (oe)^{2}  (oe)^{2}/e 
Homoz. Brown  
Carriers  
Homoz. Blue  
Total  
New!! Breaking News!! How many degrees of freedom does the test have? NORMALLY, the degrees of freedom in a chisquare test are equal to the number of observations minus 1. (Essentially, if I know total number of observations and how many are in all but 1 group, I can guess how many observations were in the last group, so that group has no 'freedom'). HOWEVER, this is not true for testing the HardyWeinberg equilibrium. INSTEAD, you have to think about how many quantities are really free to vary > remember that we used the population to estimate p and q, then we used p and q to get p^{2}, 2pq, and q^{2}. So really, once we decided on a value for p, everything else was decided for us. Whatever p was, q had to be 1p, and p^{2}, 2pq, and q^{2} were set as well. SO, the moral of the story is, since only p is able to vary, there is ONLY ONE degree of freedom in this chisquare test.* Whew!
Given that df = 1, and based on the lookup table to the right, do the observed proportions fit the Assistant's predictions?

Really Gory Details That You Don't Need to Know But I'm Including for the Sake of Completeness: If you are doing a chisquare test of HardyWeinberg proportions for multiple genes (for example, hair color AND earlobe attachment), there is a general rule for the degrees of freedom, which is:
df = # genotypic combinations  # alleles.
So for 2 genes, there are 9 genotypic combinations (3 genotypes for hair color x 3 genotypes for ear attachment) and 4 associated alleles (2 each for hair color and ear attachment), so df = 9  4 = 5.
Copyright University of Maryland, 2007
You may link to this site for educational purposes.
Please do not copy without permission
requests/questions/feedback email: admin@mathbench.umd.edu