The Hardy Weinberg equation refers to the calculation of the genetic variation of a population at an equilibrium state.
The equation is expressed as, p2 + 2pq + q2 = 1
Let's suppose a height-determining gene is expressed by two alleles ‘L’ and ‘l’, where p is the frequency of the “L” allele and q is the frequency of the ‘l'' allele.
p2 represents homozygous genotype “LL”
q2 represents homozygous genotype ‘ll’
The pq in the equation represents heterozygous genotype Ll.
According to the equation, p+q=1.
If the allele frequencies are known, then the gene frequencies can be calculated from the equation if there is no mutation, gene flow, random mating, and selection occurred. It is just a theoretical approach to predicting gene frequency.