Estimate the probability that N random 4-digit pin numbers are all distinct for N=10, 1000, 100

271 Views Asked by At

As per title, the question is "estimate the probability that N random 4-digit pin numbers are all distinct for N=10, 1000, 100".

My current working is as follows:

There are $10^{4}$ total 0-10 4 digit combinations. For N pin numbers, this means a total of $10000^{N}$ total possibilities.

Next, for all pin numbers to be unique, you are essentially sampling without replacement, meaning for the first pin you have $10000$ possibilities, $10000 - 1$ for the second, etc, giving:

\begin{equation} \frac{10000 \cdot (10000-1) \cdot (10000-2) ...(10000-N+1)}{10000^{N}} \end{equation}

Does this seem sensible? The next step of possibly working this out by hand I am a bit lost on though. Any help is appreciated!

2

There are 2 best solutions below

0
On BEST ANSWER

Recall that numerator is $\frac{10000!}{(10000 - N)!}$. As stated by @InterstellarProbe, you can apply the stirling approximation to the denominator and continue from there. Stirling formula

0
On

Yes, that's correct so far. So now the difficulty is estimating the numerator, namely the three products $10000 \cdots 9991$, $10000 \cdots 9901$, $10000 \cdots 9001$. In other words, you're looking for $10000!/9990!, 10000!/9900!, 10000!/9000!$.

Factorials can be approximated using some variant of Stirling's approximation.

Alternatively, if you don't want to use that, you can still get the rough order of magnitude of your values by using the fact that the product of a set of $k$ numbers is equal to the $k$-th power of its geometric mean, and in these cases the geometric mean is very close to the arithmetic mean, so you can just take the $k$-th power of the arithmetic mean as an approximation, and it will still fall within an order of magnitude of the actual value.