Before we have any digits, it takes 1 pick to get a digit that we don't have yet (assuming that leading zeroes are allowed).
We then start picking hoping to get a 2nd, different, digit. Because 9 of the 10 remaining digits are different from those that we have already, the average number of picks to get a new digit is 10/9.
And after that, the average number of picks to get the 3rd digit is 10/8.
The average number of picks to get all digits is 10/10 + 10/9 + 10/8 + 10/7 + 10/6 + 10/5 + 10/4 + 10/3 + 10/2 + 10/1 = approximately 29.28968254 (more than e and less than Pi). Final answer.
The last digit takes an average of 10 picks, the last two take an average of 15 picks, and that is where half the expected picks and most of the variability comes from.
If we are building a number from left to right, and if leading zeroes are not allowed, then the first pick takes an average of 1.111111 picks, for an adjusted total of 29.39079365 picks, but I don't think that is what Math Man is asking.
Edited on July 6, 2012, 5:23 pm