The actual frequency calculations depend on the
ploidy of the species for autosomal genes.
Monoploids The frequency (
p) of an allele
A is the fraction of the number of copies (
i) of the
A allele and the population or sample size (
N), so :p = i/N.
Diploids If f(\mathbf{AA}), f(\mathbf{AB}), and f(\mathbf{BB}) are the frequencies of the three genotypes at a locus with two alleles, then the frequency
p of the
A-allele and the frequency
q of the
B-allele in the population are obtained by counting alleles. :p=f(\mathbf{AA})+ \frac{1}{2}f(\mathbf{AB})= \mbox{frequency of A} :q=f(\mathbf{BB})+ \frac{1}{2}f(\mathbf{AB})= \mbox{frequency of B} Because
p and
q are the frequencies of the only two alleles present at that locus, they must sum to 1. To check this: :p+q=f(\mathbf{AA})+f(\mathbf{BB})+f(\mathbf{AB})=1 :q=1-p and p=1-q If there are more than two different allelic forms, the frequency for each allele is simply the frequency of its homozygote plus half the sum of the frequencies for all the heterozygotes in which it appears. (For 3 alleles see ) Allele frequency can always be calculated from
genotype frequency, whereas the reverse requires that the
Hardy–Weinberg conditions of random mating apply.
Example Consider a locus that carries two alleles,
A and
B. In a diploid population there are three possible genotypes, two
homozygous genotypes (
AA and
BB), and one
heterozygous genotype (
AB). If we sample 10 individuals from the population, and we observe the genotype frequencies • freq (
AA) = 6 • freq (
AB) = 3 • freq (
BB) = 1 then there are 6\times2 + 3 = 15 observed copies of the
A allele and 1\times2 + 3 = 5 of the
B allele, out of 20 total chromosome copies. The frequency
p of the
A allele is
p = 15/20 = 0.75, and the frequency
q of the
B allele is
q = 5/20 = 0.25. ==Dynamics==