If an 8 digit number is randomly generated, what are the odds that all 8 digits are different/distinct

combinationspermutationsprobability

If an 8 digit number is randomly generated, what are the odds that all 8 digits are different/distinct?

  • Assume that we can use the 10 numbers 0-9.
    What I got myself is this:

(*) $\frac{10!}{(10-8)!}$=$\frac{10!}{2!}$=1814400

  • The total number of 8 digit numbers is $10^8$=100,000,000.

So dividing those numbers gives:

$\frac{1814400}{100,000,000}$=0,018144

What I'm not sure of is whether all possibilities in the step with the (*) are distinct from each other, so there is no repetition of numbers within an 8-digit number. Could someone explain this to me whether it is or not and why? Then I know that my final answer is correct or incorrect.

Maybe good to know, I am just starting with probability theory…

Thanks in advance for your help!

Best Answer

Think of your numerator as $10\cdot9\cdot8\cdot7\cdot6\cdot5\cdot4\cdot3$; that is, you have $10$ choices for the first digit, but then only $9$ for the second, $8$ for the third, and so on down to $3$ for the eighth digit. The decreasing number of choices reflects the fact that you are not repeating digits that have already been used. Alternatively, $10!/2!$ means you permute the ten digits in any of $10!$ ways, drop the final two digits, and group them in pairs ($2!$) according to the two digits that get dropped. In either interpretation there is no repetition of digits.

In comments below the OP, it's pointed out that you are allowing your eight-digit numbers to begin with a $0$, which may or may not be what the problem poser intended. As it turns out, however, it doesn't matter for the final result. If starting $0$'s are allowed, the probability is

$$10\cdot9\cdot8\cdot7\cdot6\cdot5\cdot4\cdot3\over10\cdot10\cdot10\cdot10\cdot10\cdot10\cdot10\cdot10$$

whereas if starting $0$'s are not allowed, the probability is

$$9\cdot9\cdot8\cdot7\cdot6\cdot5\cdot4\cdot3\over9\cdot10\cdot10\cdot10\cdot10\cdot10\cdot10\cdot10$$

In either case, cancellation leaves

$$9\cdot8\cdot7\cdot6\cdot5\cdot4\cdot3\over10\cdot10\cdot10\cdot10\cdot10\cdot10\cdot10$$