Models and tests for departure from Hardy-Weinberg equilibrium