Assume a population of four individuals T1, T2, T3, and T4. The Euclidean distance is calculated for each pair of the four individuals. I would like to calculate the average of all pairwise distances between all individuals. I found one paper calculating the average as:
$$\frac{\sum_{i=0}^{\mid P \mid }\sum_{j=0,j\neq i}^{\mid P \mid } dist(x_i,x_j)}{\mid P \mid(\mid P \mid - 1)}$$
where P is the number of individuals (4 in the example shown above).
I can't understand why the total distance is divided by $\mid P \mid(\mid P \mid - 1)$. I was expecting the distance to be divided by the number of combinations (6 in the example shown above).
Is there a reason why all pairwise distances between all individuals is divided by that?