Icon for AP® Biology

AP® Biology

Hardy-Weinberg Equation: AP® Biology Crash Course

Hardy-Weinberg Equation - AP® Biology Crash Course

On the AP® Biology exam, you may be asked to predict the frequency of specific genetic traits in a given population. To determine this frequency, we use what is known as the Hardy-Weinberg equation. This equation is a mathematical expression that illustrates the relationship between the frequencies of all genotypes present in the population in question.

Before we get into exactly how the Hardy-Weinberg equation is used to solve genetic word problems on the AP® Biology test, let’s take a look at some of the important elements that play into gene expression and genetic calculations (you’ll be introduced to the actual algebra later on in this crash course).

Phenotypes and Genotypes

A phenotype is a visible, outward-appearing physical characteristic—like freckles, for example. The genotype, one the other hand, is the genetic basis of that physical characteristic. For our freckles example, the specific combination of dominant and recessive alleles that is expressed as either freckled or non-freckled skin would be considered the genotype.

It is important to note here that many human traits are not simply governed by a single gene, and some traits that were previously assumed to be basic single-gene traits (tongue rolling, for example) may even be affected by non-genetic environmental factors. For this crash course, however, we are assuming a simple, single-gene basis for our examples.

In general, there are three kinds of genotypes: homozygous dominant, homozygous recessive, and heterozygous dominant.

A homozygous dominant genotype is one in which both alleles are dominant (homo = same). Likewise, a homozygous recessive genotype is one in which both alleles are recessive. Finally, a heterozygous dominant genotype is one that contains both a dominant and a recessive gene (hetero = different). Because a heterozygous dominant genotype includes a dominant gene, it will be expressed as the dominant phenotype in a homozygous dominant individual.

Because freckles are a dominant trait in our example, it would be impossible to tell just from looking whether the freckled person’s genotype is homozygous dominant or heterozygous dominant. Similarly, genetic diseases and disorders can be absent in a phenotype (with the individual presenting as healthy and asymptomatic) but be present in the recessive form in that person’s genotype. In these cases, that person is considered a carrier of the disease.

Alleles AP® Bio
Image Source: Wikimedia Commons

One simple way to mentally visualize how alleles work is to imagine them as socks. In this analogy, let’s say a red sock represents the recessive allele for non-freckled skin and a black sock represents the dominant allele for freckles. A recessive red sock is always tucked into the other sock, regardless of whether it is a dominant black sock or a recessive red sock. If both socks are red, it doesn’t matter which sock is tucked into the other; in either case, the sock showing on the outside will be a recessive red one. If both socks are black, the situation is the same; the sock showing on the outside will always be black. If there is one red sock and one black sock, however, the recessive red sock will be tucked inside the black one, and the sock that shows will be the dominant black sock.

It’s the same with the actual alleles: if both alleles are recessive non-freckle alleles, the result will be a person without freckles. If both alleles are dominant freckle alleles, the result will be a person with freckles. If one allele is dominant and one allele is recessive, the recessive non-freckle allele will be metaphorically “tucked” inside the other, resulting in a person with freckles.

Representing Genotypes in Genetic Problems

Genotypes in genetic problems are represented by a pair of letters with each letter either capitalized or in lowercase. A capital letter represents a dominant allele while a lowercase letter represents a recessive allele.

For our freckles example, let’s use the letter “f.” A capital “F” represents the presence of the dominant allele for freckles, while a lowercase “f” represents the presence of the recessive allele for non-freckled skin. The three possible genotypes, then, would be represented as follows:

  • Homozygous dominant = FF
  • Homozygous recessive = ff
  • Heterozygous dominant = Ff

The Hardy-Weinberg Equation

The Hardy-Weinberg equation states that the frequency at which a specific genotype occurs can be expressed as a ratio of the genotype in question to the total number of alleles in the population.

Algebraically, the equation is expressed as:

p^2 + 2pq + q^2 =1

The terms of this equation are defined as follows:

  • p = the frequency of the dominant allele in a population
  • q = the frequency of the recessive allele in a population
  • 2pq = the frequency of the heterozygous dominant genotype
  • p^2 = the frequency of homozygous dominant genotype
  • q^2 = the frequency of homozygous recessive genotype

Because the set of all alleles in the population is made up of one part dominant alleles and one part recessive alleles, the sum of p and q will always equal 1.

If we have a group of 10 people with 20 total alleles (2 alleles per person), and we are told that the frequency of the dominant allele is 6 out of 20, we can say that p = \frac{6}{20}, or 0.3.

Since we know that p + q = 1, we can also say that 0.3 + q = 1.

Finally, we solve for q by subtracting 0.3 from 1, leaving 0.7.

Now, we know that the ratio of dominant alleles is 0.3, and the ratio of recessive alleles is 0.7. In other words, 30\% of the alleles in the population are dominant and 70\% are recessive.

Although allele and genotype frequencies can technically be expressed as fractions, decimals, or percentages, you should always represent p and q values as decimals on the AP® Biology exam.

phenotype genotype structure
Image Source: SchoolWorkHelper

Genotype Practice Problem

Let’s try a full genotype problem in which we use the Hardy-Weinberg equation to calculate the frequency of a specific genotype. The equation may look intimidating, but don’t get too nervous about your algebra skills—the math involved is much simpler than it might seem at first glance.

Let’s say that 60\% of humans do not have freckles. Because freckles are a dominant trait, this means that only those with the homozygous recessive genotype will not have them. Therefore, our homozygous recessive frequency—or q^2—is 0.6. How can we determine the frequency of the heterozygous dominant genotype in the human population?

First, we start with the basic Hardy-Weinberg equation, adding in our known q^2 value of 0.6.

p^2 + 2pq + 0.6 = 1

Next, we determine the value of q by taking the square root of q^2.

\sqrt{0.6} = 0.77

Using the knowledge that p + q = 1, we can then subtract to solve for p.

1 - 0.77 = 0.23

Recall that we are solving for the frequency of the heterozygous dominant genotype, which is represented by the term 2pq in the Hardy-Weinberg equation. Since we already know the values of p and q, we can now calculate the frequency of this genotype.

2pq = 2(0.23)(0.77) = 0.35

At the conclusion of all our number-crunching, we find that the frequency of the heterozygous dominant genotype for freckles in this population is 0.35, or 35\%. Again, remember that for the AP® Biology exam, this frequency should be written as the decimal 0.35.

Necessary Assumptions

It is important to note that the Hardy-Weinberg equation operates under the following assumptions:

  • The population contains only diploid organisms that reproduce sexually.
  • Generations do not overlap and mating occurs randomly.
  • The population size is infinitely large.
  • Allele frequencies are roughly equal between the sexes.
  • There is no mutation, migration, or selection occurring in the population.

Because populations in reality cannot meet all of these assumptions, the Hardy-Weinberg equation won’t necessarily provide the true frequencies of genotypes in real-world applications. Instead, the equation simply predicts theoretical genotype frequencies for single-gene traits.

Review

 What have we learned?

  • A phenotype is a visible physical trait, while a genotype is a non-visible genetic code.
  • There are three kinds of genotypes: homozygous dominant, homozygous recessive, and heterozygous dominant.
  • The Hardy-Weinberg equation is p^2 + 2pq + q^2 =1 and is used to determine the frequency of genotypes in a given population.
  • To solve for the frequency of a specific genotype, start by replacing the appropriate terms with the known values you’ve been given. From there, it’s Algebra 101.

So long as you are given sufficient information to determine at least one of the terms of the Hardy-Weinberg equation, you should now be prepared to predict the frequencies of all three genotypes as well as those of the dominant and recessive alleles. Try coming up with your own hypothetical genotype problems for even more AP® Biology practice!

Need help preparing for your AP® Biology exam?

AP® Biology practice questions

Albert has hundreds of AP® Biology practice questions, free response, and full-length practice tests to try out.

Interested in a school license?​

Bring Albert to your school and empower all teachers with the world's best question bank for:

➜ SAT® & ACT®
➜ AP®
➜ ELA, Math, Science, & Social Studies
➜ State assessments

Options for teachers, schools, and districts.