<Dd> p 2 + 2 p q + q 2 = 1 (\ displaystyle p ^ (2) + 2pq + q ^ (2) = 1 \,) </Dd> <P> where p is the frequency of one allele and q is the frequency of the alternative allele, which necessarily sum to unity . Then, p is the fraction of the population homozygous for the first allele, 2pq is the fraction of heterozygotes, and q is the fraction homozygous for the alternative allele . If the first allele is dominant to the second then the fraction of the population that will show the dominant phenotype is p + 2pq, and the fraction with the recessive phenotype is q . </P> <P> With three alleles: </P> <Dl> <Dd> p + q + r = 1 (\ displaystyle p + q + r = 1 \,) and </Dd> </Dl>

An individual with two of the same alleles for a trait is called