A "code" is composed of 20 digits (numbers from 0 to 9), and we want to choose a number randomly. What is the possibility that at least one digit will not show up in the code?
What I did:
We have $10^{20}$ possibilities.
Now, I want to choose 9 numbers out of the ten, and choose them randomly, so the possibility is:
$\frac{10\cdot9^{20}}{10^{20}} = \frac{9^{20}}{10^{19}}$
But when I put this in the calculator, I get $1.25\dots$ I thought maybe I need a more precise calculator, but even calculators I found in google returns the same answer.
The possibility isn't supposed to be above 1. What is the problem here?
For any given digit, the probability the "code" does not contain that digit is indeed $(9/10)^{20}$. But computing the probability that any one of the ten digits is missing requires the inclusion/exclusion principle.
The final, correct answer is $0.785262\dots$