This is purely for interest.
So I received from my bank a randomly generated (?) login code which is a string of 9 numerical digits (0-9). 5 of these 9 digits were the same number (but not in any particular order).
I am trying to work out the probability in any 9 digit number of 5 of these digits being the same. (and generalising this).
I have tried to work this out as I believe the answer to be of the form
$$\binom{9}{5}0.1^50.9^410$$
But my formula doesn't seem to work when I generalise this to the probability of getting say, 2 digits the same within the string of 9 - as then it give a nonsensical answer.
Am I going wrong somewhere? I am more interested in understanding the theory rather than just the actual solution.