The coefficient of inbreeding (F) is the probability that the two alleles of a gene in an individual are identical because they are descended from the same allele in an ancestor.

In this example for the offspring between first cousins, first measure the probability that she will be homozygous for the recessive allele a inherited from her great-grandmother.

Each generation has a 1/2 probability of inheriting the a allele.

The probability that all 6 inheritances contain the a allele is (1/2)6 = 1/64.

Since she can also be homozygous for any of the other 3 alleles in her great-grandparents, F = 4 x (1/64) = 1/16.