The Hardy-Weinberg Principle is an impossible principle that states a population will remain constant from generation to generation in the absence of other evolutionary influences.
Hardy-Weinberg Equations
p = frequency of allele 1 in a population
q = frequency of allele 2 in a population
p^2 + 2pq + q^2 = 1 p + q = 1
The Hardy-Weinberg equations are used to predict genotypes in an entire population.
For a given trait, there are three possible genotypes: homozygous dominant (AA), heterozygous (Aa), and homozygous recessive (aa).
Within a gene pool, there is a proportion of each genotype. For example, there might be 100 AA giraffes in a population of 1000 giraffes, making the AA genotype frequency 10%, or 0.1.
There is an allele frequency for both the dominant and recessive allele. For example, if a certain population consists of 100 tigers, there are 100 * 2 = 200 alleles. Out of these alleles, there might be 120 dominant alleles and 80 recessive alleles. The dominant allele frequency would then be 120/200 = 0.6 while the recessive allele frequency would be 80/200 = 0.4. Note that 120 + 80 = 200 and 0.6 + 0.4 = 1 since every allele (for the purposes of Hardy-Weinberg) is either dominant or recessive (complications like multiple alleles don’t factor into Hardy-Weinberg).
The dominant allele frequency is called p. The recessive frequency is called q. Because all alleles are either dominant or recessive for the purposes of Hardy-Weinberg, p + q = 1.
Using algebra, we know that you can square both sides of an equation. Therefore, (p + q)^2 = 1^2, so p^2 + 2pq + q^2 = 1
p^2 is the frequency of the homozygous dominant genotype. 2pq is the frequency of the heterozygous genotype. q^2 is the frequency of the homozygous recessive genotype. Adding the dominant and recessive frequencies, p^2 + q^2 is the frequency of the homozygous genotype in general.
Using algebra, you can convert between allele frequencies and genotype frequencies. For example, if the dominant allele frequency (A) is 0.6 (recall that this value is p), then the homozygous dominant genotype frequency (AA) is p^2 = 0.6^2 = 0.36. Using more steps, you could find other genotype frequencies. The recessive allele frequency is 1 - q = 1 - 0.6 = 0.4, so the heterozygous genotype frequency is 2pq = 2(0.6)(0.4) = 0.48 while the homozygous genotype frequency is q^2 = 0.4^2 = 0.16.
Most real-world populations actually living on Earth are not in Hardy-Weinberg equilibrium. This is because Hardy-Weinberg equilibrium requires five conditions to be satisfied all at once, which rarely happens in reality. Rather, Hardy-Weinberg is primarily theoretical tool to understand the genetic distribution of unchanging populations.