how unique is my random number We use a random number generator to create numbers in the format of {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}. where the X represents a digit which is base 16 (hexadecimal). that's 0-9,A-F
The hexadecimal digits are grouped in a format that is 36 characters long -- 32 hexadecimal characters grouped as 8-4-4-4-12 and separated by four hyphens: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.
So right now the permutations of the number are 16^32 (thanks @henry) - right?
We generated 2000 of these numbers.
What I want do is just take the last 12 digits from each number and I need them to be unique. (the last part after the hyphen)
what's the probability that there would be collisions (or repeats) between those 2000 numbers?
 A: There are $N=16^{12}$ possibilities for the last number. Conversely, each number has a probability $p=\frac 1N = 16^{-12}$ of being picked. Let $P_n$ denote the probability that there are no collisions between $n$ numbers sampled this way.
Imagine generating the $2000$ samples sequentially:

*

*Having picked the first number, the probability of a collision of the $2$rd number with the first one is $p$. Thus, $P_2=1-p$.

*Having picked the first two numbers without a collision, the probability of a collision of the $3$rd number with the first $2$ numbers is $2p$. Thus, $P_3=P_2(1-2p)=(1-p)(1-2p)$.

*Having picked the first $i$ numbers without a collision, the probability of a collision of the $i+1$ number with the first $i$ numbers is $ip$. Thus, $P_{i+1}=(1-ip)P_i=\prod_{j=1}^i (1-jp)$.

Thus, the probability of having some repeats in $2000$ samples is given by $1-P_{2000}$, i.e. $$1-\prod_{j=1}^{1999} (1-jp)$$
(Edit: See comments to my answer for an approximation to this expression.)
Also, see Collisions in a sample of uniform distribution.
