When geneticists compare the genomes of different populations, they look at which variants — which alleles — are present at different frequencies in different groups.

If two populations share a particular variant at a higher frequency than would be expected by chance, that “excess allele sharing” or “affinity” is evidence of a closer genetic relationship between those populations than between each of them and a third population used as a reference.

The statistical tool most commonly used to detect these patterns is called the D-statistic or ABBA-BABA test (the names refer to the specific pattern of allele frequencies being counted).

This test was developed specifically to detect patterns of excess allele sharing that indicate genetic mixing — admixture — between populations.