In: Statistics and Probability
Problem statement: To find the probability that someone gets right passcode to un lock an iPhone within 3 attempts.
Given: Someone wants to unlock an iPhone with passcode by guessing it. It is also given that the phone shutdown after 3 wrong attempts and passcode accepts only numeric inputs.
Solution: Iphone getting blocked within 3 attempts means that iPhone getting unlocked in the first attempt or iPhone getting unlocked in the second attempt or iPhone getting unlocked in the third attempt.
So,
Probability of unlocking iPhone within 3 attempts = Probability (unlocking iPhone in first attempt)+Probability (unlocking iPhone in second attempt)+Probability (unlocking iPhone in third attempt)
Since in the question it is given that only numeric values are accepted and length of the passcode is 4, first we have computed the number of passcode possibilities that someone could enter.
Numeric values vary from 0 to 9. So there are 10 possibilities for each passcode digit entry. Since each of the digit entered in passcode is independent of other digits, each of the 4 values of the passcode have 10 possibilities.
So total number of passcode possibilities = 10*10*10*10=10000
Out of all the pass code combinations only 1 combination is the right passcode for the iPhone.
So probability of getting right passcode in first attempt= 1/10000=0.0001
If the entered passcode in the first attempt is wrong , someone trying to access the iPhone wouldn't use the same passcode second time.
So probability of getting right passcode in second attempt= (1/(10000-1))=0.00010001
If even the passcode entered during second attempt is wrong then during third attempt the person wouldn't use the passcode he tried during first two attempts
So probability of getting right passcode in third attempt= (1/(10000-2))=0.00010002
So the total probability that someone would be successful in unlocking my iPhone through a 4 digit passcode within first three attempts is
Probability (unlocking iPhone in first attempt)+Probability (unlocking iPhone in second attempt)+Probability (unlocking iPhone in third attempt)= 0.0001+0.00010001+0.00010002=0.00030003 or 0.03%.