1, assume that there are two alleles, from the individuals' phenotype constitution, we can get the allele proportion:
alleles: A a; constitution: AA-x Aa-y aa-z
A proportion: pro(A)=(2*x+1*y)/2*(x+y+z) #AA has 2 A,so one AA contributes 2 A.
a proportion: pro(a)=(2*z+1*y)/2*(x+y+z)
note that x y z can be any positive variables between zero and 1 provided x+y+z=1, in other word, these three variables has 2 freedom.
2, hardy-weinberg equilibrium
hardy-weinberg equilibrium says that ,without external disturbance, with random mating rate, the proportion of each allele, as well as the individuals' phenotype constitution remains the same generation after generation.
3, given the allele constitution of a population, the individual proportion under equilibrium state is fixed.
thus calculate the difference between the expected(situtation under equilibrium state) constitution and the real constitution of the population
can give us an implication that whether this population eveloted under the hardy weinberg assumption.
4, one more point:
given allele frequency of A(x) and a(y) of a population, one should not use the multiply rule to get the proportion of genotype Aa(this is not independent events), one should use the multiply table instead.