S2 HWpower projects


S2 HWpower by SilvaSquare is a program to help study the power of χ2 tests of the Hardy-Weinberg hypothesis for an autosomal gene with two alleles.

Here are some of the kinds of projects you can use it for:



Can the program be trusted? Can the tests be trusted?

HWpower - HW model n=1000 nr=10000

looks pretty good, except for extreme values of p. why do you think that is?


how does statistical power vary with the Wahlund variance?

HWpower - Wahlund p=0.4 n=100 nr=10000

it varies a lot, doesn't it? why is the impact of the significance level greatest at intermediate values of the variance?


how does statistical power vary with sample size, with different selection scenarios?

HWpower - Selection W11=W12=1 W22=0.9 p=0.4 nr=10000

seems to increase pretty much linearly, over this range. can it go on like this forever? what is the power of the test for a (very reasonable) sample size of 1000? not very impressive, is it?


HWpower - Selection W11=1.1 W12=1 W22=0.9 p=0.4 nr=10000

looks very different: sample size has no effect at all! do you know why?