# Average Number of PIN Code Attempts

If I want the average number of PIN code attempts for a PIN of length 4 using the numbers 0-9, would I have to half my answer? So $$10^4 = 10 000$$ possible combinations, but the average number of attempts needed to guess correctly would be $$5 000$$?

• Are the successive failures leading to an ultimate success coordinated? Would a failed attempt be repeated? – DJohnM Jul 10 at 22:05
• Are you essentially asking how many different guesses are required in order for the probability to be .5 that you have guessed the correct PIN? – mlchristians Jul 10 at 23:17
• None of the answers have appropriate justification. Consider this post math.stackexchange.com/questions/206798/… – Dayton Jul 10 at 23:50
• It should probably be noted that in practice you can expect to only have to guess about $1800$ times per PIN in the long run, with a typical number of guesses around $400$ and the most likely number of guesses being $1$. datagenetics.com/blog/september32012 – K B Dave Jul 11 at 0:02

If I am correct in interpreting the problem as how many different attempts are required in order that the probability is $$1/2$$ that you will have guess the correct PIN, then your answer of $$5000$$ attempts is correct, as you would multiply the probability of guessing the PIN correctly on one attempt, which is $$\frac{1}{10000}$$ by that number $$x$$ whose product is $$.5$$; that is, we solve
$$\frac{1}{10,000} x = .5$$
$$x = 5000$$
$$\begin{array}{ll} \text{Combinations} & \text{Average number of attempts} \\ 1 & 1 \\ 2 & \frac32 \\ 3 & 2 \\ 4 & \frac52 \\ \dots & \dots \end{array}$$