If i have a $20$ digit number, what are the chances I get the same randomly generated number?

141 Views Asked by At

I've gotten a bit mixed up here, if you have a number comprised of $20$ digits and need to find the possibility of a randomly generated number ending up the same, do I consider each digit independent? I keep thinking the answer should be $\frac{1}{10^{20}}$ but that seems wrong somehow?

1

There are 1 best solutions below

0
On

If the first digit can't be $0$, then we have $$\frac1{9\cdot 10^{19}}$$

If the first digit can be $0$, then we have $$\frac1{10^{20}}.$$

We can assume independence of digit, otherwise, it won't be uniformly distributed.