Tutorials › Statistical Genetics › Heterozygosity And Homozygosity Under Hardy–Weinberg Equilibrium

Mendelian Probability and Allele Frequencies · Tutorial 9 of 989

Heterozygosity And Homozygosity Under Hardy–Weinberg Equilibrium

Calculate the probability of heterozygosity or homozygosity from allele frequencies, then interpret what the values say about variation at a locus.

Beginner 9 min read

What You'll Learn

  • Define expected heterozygosity and homozygosity at a locus with multiple alleles
  • Calculate each quantity from allele frequencies under Hardy–Weinberg equilibrium
  • Check the calculations by summing the genotype probabilities
  • Compare heterozygosity across loci with different allele-frequency distributions
  • Explain how allele-frequency evenness affects expected heterozygosity
  • Distinguish a model-based expectation from an observed sample proportion

Introduction

A locus can have several alleles, and their frequencies determine how likely two randomly combined alleles are to match or differ under Hardy–Weinberg equilibrium. The probability of a match is the expected homozygous fraction; the probability of a difference is the expected heterozygous fraction. These are complementary quantities, so keeping their definitions distinct is essential.

Expected heterozygosity also summarizes how evenly allele frequency is distributed at a locus. A locus dominated by one allele tends to have lower expected heterozygosity than a locus with the same number of alleles at more similar frequencies. The calculations below use population allele frequencies and the Hardy–Weinberg model; they do not, by themselves, describe the observed proportion in a finite sample.

Definition: At a locus with \(K\) possible alleles and allele frequencies \(p_1,\ldots,p_K\), where \(p_i\geq 0\) and \(\sum_{i=1}^{K}p_i=1\), expected heterozygosity under Hardy–Weinberg equilibrium is the probability that the two alleles in a randomly formed genotype differ: $$ H_E=1-\sum_{i=1}^{K}p_i^2. $$ The expected homozygous fraction is the probability that the two alleles match: $$ C=\sum_{i=1}^{K}p_i^2. $$ Thus \(H_E+C=1\).

Why Squared Allele Frequencies Appear

Under Hardy–Weinberg equilibrium, the two alleles in a genotype are modeled as independent draws from the population allele frequencies. The probability that both draws are allele \(i\) is \(p_i\times p_i=p_i^2\). Because a homozygote can be formed for any of the \(K\) alleles, adding these mutually exclusive probabilities gives the expected homozygous fraction \(C=\sum_i p_i^2\).

A heterozygote has two different alleles. For any pair of distinct alleles \(i\) and \(j\), the unordered genotype has probability \(p_i p_j+p_j p_i=2p_i p_j\). Adding these probabilities over all distinct pairs gives \(H_E=2\sum_{i<j}p_i p_j\). This equals one minus the homozygous fraction because every genotype is either homozygous or heterozygous.

$$ \left(\sum_{i=1}^{K}p_i\right)^2 =\sum_{i=1}^{K}p_i^2+2\sum_{i<j}p_i p_j =1 $$

Rearranging the identity gives \(2\sum_{i<j}p_i p_j=1-\sum_i p_i^2\), which is the stated formula for expected heterozygosity. The factor of 2 matters: for two distinct alleles, the genotype can arise from either order of the allele draws. The formula also provides a useful check: the heterozygous and homozygous genotype probabilities must each be between 0 and 1 and must sum to 1.

Worked Example: A Locus With Two Alleles

Suppose a hypothetical locus has alleles \(A\) and \(a\), with frequencies \(p_A=0.70\) and \(p_a=0.30\). Assume the population follows Hardy–Weinberg equilibrium, so the two alleles of a genotype are independently drawn from these frequencies. Find expected heterozygosity and homozygosity.

The allele frequencies are nonnegative and sum to one: \(0.70+0.30=1\). The formula for expected heterozygosity gives

$$ H_E=1-(p_A^2+p_a^2) =1-(0.70^2+0.30^2) =1-(0.49+0.09) =0.42. $$

Thus 42% is the expected fraction of genotypes that are heterozygous. The homozygous fraction is \(C=1-H_E=1-0.42=0.58\), or 58%. As a direct check, the Hardy–Weinberg genotype probabilities are \(P(AA)=0.49\), \(P(Aa)=2(0.70)(0.30)=0.42\), and \(P(aa)=0.09\); they sum to \(0.49+0.42+0.09=1.00\). The two homozygote probabilities sum to 0.58.

Calculating With Multiple Alleles

With more than two alleles, the same rule applies: square each allele frequency, sum the squares, and subtract that sum from one to obtain expected heterozygosity. The sum of squares itself is expected homozygosity. Listing individual genotype probabilities is not required to calculate \(H_E\), but doing so can make the result easier to verify and interpret.

Worked Example: Three Alleles and Both Genotype Classes

Consider a hypothetical locus with three alleles \(A_1,A_2,A_3\), having frequencies 0.50, 0.30, and 0.20. Assume Hardy–Weinberg equilibrium. Calculate expected heterozygosity and homozygosity, and verify them using the genotype probabilities.

The frequencies are nonnegative and sum to \(0.50+0.30+0.20=1.00\). First calculate the homozygous fraction from the squared frequencies:

$$ C=(0.50)^2+(0.30)^2+(0.20)^2 =0.25+0.09+0.04 =0.38. $$

Therefore expected heterozygosity is \(H_E=1-C=1-0.38=0.62\), or 62%. To check, the three homozygous genotype probabilities are 0.25, 0.09, and 0.04. The heterozygous probabilities are

$$ P(A_1A_2)=2(0.50)(0.30)=0.30,\qquad P(A_1A_3)=2(0.50)(0.20)=0.20,\qquad P(A_2A_3)=2(0.30)(0.20)=0.12. $$

Their sum is \(0.30+0.20+0.12=0.62\). All six genotype probabilities sum to \(0.38+0.62=1.00\), confirming the calculation. In particular, 0.62 is the expected heterozygous fraction; 0.38 is the expected homozygous fraction.

Comparing Loci

When comparing loci, calculate the expected heterozygosity separately from the allele frequencies at each locus. The locus with the larger \(H_E\) has the greater model-based probability that a randomly formed genotype is heterozygous. This comparison concerns expected fractions under the stated model, not a claim that every finite sample will show those exact fractions.

Worked Example: Comparing Two Three-Allele Loci

Two hypothetical loci each have three alleles. At locus A, their frequencies are 0.50, 0.30, and 0.20. At locus B, they are 0.80, 0.10, and 0.10. Assume Hardy–Weinberg equilibrium at both loci and compare their expected heterozygosities.

For locus A:

$$ H_{E,A}=1-(0.50^2+0.30^2+0.20^2) =1-(0.25+0.09+0.04) =0.62. $$

For locus B:

$$ H_{E,B}=1-(0.80^2+0.10^2+0.10^2) =1-(0.64+0.01+0.01) =0.34. $$

Locus A has the larger expected heterozygosity: \(0.62-0.34=0.28\), a difference of 28 percentage points. The corresponding expected homozygous fractions are \(1-0.62=0.38\) at locus A and \(1-0.34=0.66\) at locus B. Both loci have three alleles, but locus B is more concentrated in one allele, so its probability of drawing the same allele twice is higher. The comparison follows from the supplied frequencies; it does not establish that one locus has a larger observed heterozygous proportion in any particular sample.

How Allele-Frequency Balance Affects Heterozygosity

For a fixed number \(K\) of possible alleles, expected heterozygosity is greatest when the frequencies are equal. To see why, write each frequency as its deviation from \(1/K\). Since the deviations sum to zero, expanding their squared sum gives

$$ \sum_{i=1}^{K}\left(p_i-\frac{1}{K}\right)^2 =\sum_{i=1}^{K}p_i^2-\frac{1}{K}\geq 0. $$

Consequently, \(\sum_i p_i^2\geq 1/K\), so \(H_E=1-\sum_i p_i^2\leq 1-1/K\). Equality occurs when every \(p_i=1/K\). For example, with three equally frequent alleles, \(H_E=1-3(1/3)^2=1-1/3=2/3\), approximately 0.667. If one allele has frequency 1 and all others have frequency 0, then \(H_E=0\): two draws must match. This result explains why allele count alone is insufficient for comparing loci; the distribution of frequencies also matters.

Interpreting the Quantity and Avoiding Common Errors

Expected heterozygosity is a probability, or equivalently an expected fraction of genotypes, under the Hardy–Weinberg model at the specified allele frequencies. For example, \(H_E=0.62\) means the model assigns probability 0.62 to a randomly formed genotype being heterozygous. It does not mean that the heterozygosity of a particular finite sample must equal 62%, and it is not an estimate of uncertainty about the allele frequencies.

The calculation depends on the Hardy–Weinberg genotype model: the two alleles are combined as independent draws with the stated frequencies. Allele frequencies alone do not specify genotype frequencies in every possible population model. If observed genotype counts are provided, their heterozygous fraction is calculated from those counts; it should not be silently substituted for the model-based \(H_E\).

  • Reversing the quantities. The sum of squared frequencies is homozygosity \(C\), not heterozygosity. Subtract it from one to obtain \(H_E\).
  • Omitting the factor of 2 for a heterozygote genotype. The genotype with alleles \(i\) and \(j\) can arise in either draw order, so its probability is \(2p_i p_j\).
  • Comparing loci by allele count alone. Two loci with the same number of alleles can have quite different \(H_E\) if their allele frequencies differ.
  • Calling the expectation an observed sample result. A model-based expected fraction and the fraction counted in a sample are different quantities; they need not be numerically identical.
Key takeaway: Under Hardy–Weinberg equilibrium, expected homozygosity is the sum of squared allele frequencies, \(C=\sum_i p_i^2\), and expected heterozygosity is its complement, \(H_E=1-C\). Calculate both from the same allele frequencies, and keep the model-based expectation distinct from an observed sample proportion.

Check Your Understanding

Use the allele frequencies and Hardy–Weinberg model specified in each question.

  1. A two-allele locus has frequencies 0.60 and 0.40. Calculate its expected heterozygosity and expected homozygous fraction.
  2. For three alleles with frequencies 0.50, 0.30, and 0.20, which quantity is 0.38: expected heterozygosity or expected homozygosity? What is the other quantity?
  3. Explain why the genotype probability for a heterozygote with alleles \(A_i\) and \(A_j\) is \(2p_i p_j\), rather than \(p_i p_j\).
  4. Two loci each have three alleles. Why is it not enough to know only that both loci have three alleles when comparing their expected heterozygosities?
  5. In one sentence, distinguish an expected heterozygous fraction under Hardy–Weinberg equilibrium from the heterozygous fraction counted in a finite sample.
Clinical Biostats