According to the Hardy-Weinberg law,the genotype frequencies of dominant homozygotes,heterozygotes,and recessive homozygotes are represented by p2,q2,and 2pq,respectively,where p is the frequency of the dominant allele and q is the frequency of the recessive allele. Explain how this formula was derived.