In that calculation you have nothing about possible matching.
You just calculated average distance between 2 neighbor numbers
from sorted list of 100,000 random generated intigers from interval [0, 2,147,483,648]
Lets say person X1 got one of 2,147,483,648 numbers.
Person X2 will get the same number with 1 / 2,147,483,648 chance = 0.0000000004656...
Person X2 will get different number with 2,147,483,64
7 / 2,147,483,64
8 chance = 0.9999999995343...
but we did't test all possible matching.
we tested only person X1 with person X2
we must test:
(X1 with X2) AND (X1 with X3) AND (X1 with X4) AND ... AND (X1 with X100,000)
AND
(X2 with X3) AND (X2 with X34 AND (X2 with X5) AND ... AND (X2 with X100,000)
AND
.
.
.
AND
(X99,999 with X100,000)
There is 4,999,950,000 possible matching (Binomial coefficient "100,000 choose
2")
So,
Probability that
one pair have different numbers is:
2,147,483,64
7 / 2,147,483,64
8 chance = 0.9999999995343
Probability that
all 4,999,950,000 pairs have
different numbers is:
0.9999999995343^4,999,950,000=0.0974
If we take the complement of that:
Probability that
there is at least one pair that have
same numbers is:
1 - 0.0974 = 0.9026 =
90.26 %
Maybe contra intuitive but, like this,
similar "paradox" is that in group of just 23 people
greater chance is that there exist pair of two people that celebrates birthday
on same day than there doesn't exist such pair.
And here is 365 / 23 = 15.87 average days distance between 2 neighbor birthdays
Hope this helps!