Open Book Publishers logo Open Access logo
  • button
  • button
  • button
GO TO...
book cover

Problem 67:  PIN guessing () 2002 Paper I

In order to get money from a cash dispenser I have to punch in a Personal Identification Number. I have forgotten my PIN, but I do know that it is equally likely to be any one of the integers 1, 2, …, n. I plan to punch in integers in ascending order until I get the right one. I can do this at the rate of r integers per minute. As soon as I punch in the first wrong number, the police will be alerted. The probability that they will arrive within a time t minutes is 1 eλt, where λ is a positive constant. If I follow my plan, show that the probability of the police arriving before I get my money is

k=1n1 eλ(k1)r n .

Simplify the sum.

On past experience, I know that I will be so flustered that I will just punch in possible integers at random, without noticing which I have already tried. Show that the probability of the police arriving before I get my money is

1 1 n (n 1)eλr.


This was originally about getting money from a cash dispenser using a stolen card, but it was decided that STEP questions should not be immoral. Hence the rather more improbable scenario.

The exponential distribution, here governing the police arrival time, is often used for failure of equipment (light-bulbs, etc). It has the useful property (not used here) that the reliability for a light bulb (here the probability of the police not coming within a certain time period of duration t) doesn’t depend on which time period you choose; i.e. given that the light bulb has survived to time T, the probability of it surviving until time T + t is independent of T (which doesn’t seem very suitable for light bulbs). This is referred to as the memoryless property.

To simplify the sums, you have to recognise a geometric series where the common ratio of terms is an exponential; not difficult, but easy to miss the first time you see it.

Solution to problem 67

The probability that I get the right number on the kth go is 1n. The time taken to key in k integers33 is (k 1)r. The probability that the police arrive before this is 1 eλ(k1)r so the total probability that the police arrive before I get my money is

k=1n 1 n ×1 eλ(k1)r .

We have

k=1n 1 n ×1 eλ(k1)r = 1 k=1neλ(k1)r n = 1 1 eλnr n(1 eλr),

since the last part of the sum is a geometric progression with common ratio eλr.

This time, the probability of getting my money on the kth go is 1n times the probability of not having punched in the correct integer in the preceding k 1 turns:

P(money on kth go) = 1 n ×n 1 n k1.

Thus the probability of the police arriving before I get my money is

k=11 n ×n 1 n k1 ×1 eλ(k1)r = 1 n × 1 1 (n 1)n 1 n × 1 1 eλr(n 1)n,

which is easily seen to be the given answer.


For each part, you have to calculate the probability of the first success occurring on the kth go. You have to remember to multiply the probability of success on this go by the probability of failure on the preceding k 1 goes — a very typical idea in this sort of probability question. After that, the question is really just algebra. STEP questions on this sort of material nearly always involve significant algebra or calculus.

Car batteries as well as light bulbs often crop up as examples of objects to which exponential reliability can be applied. Suppose your car battery has a guarantee of three years, and your car is completely destroyed after two years. Your insurance company offers to give you one third of the price of the battery. What do you think they would say to your counterclaim for the full price, based on the fact that, given it had lasted two years, the exponential model says that it would have had an expected further three years life in it?

33 Think of fences and posts: k posts here but only k 1 fences.