I had a strange experience in a cafe recently. When paying for coffee, I asked to use the toilet. After I tapped my PIN into the card reader, the barista handed me a slip of paper that was blank apart from a single number – the same one I had just tapped into the keypad! It turned out that this was also the entry code for the bathroom door.
Was this evidence of a shadowy plot by the agents of Big Caffeine? No, it was just a fluke, but the event got me thinking about coincidences more generally. Occasionally, we are faced with events that seem so improbable we can’t help but feel the universe is sending us a message. As a mathematician, I know that coincidences are often far more likely to occur than we think – and this fact can have serious consequences everywhere from the science lab to lottery kiosks and the law courts.
My coffee shop experience is a good place to start because we can calculate the exact probability of it happening by chance. There are 10,000 possible four-digit numbers, meaning a 1 in 10,000 probability that the door code matches my PIN. Unlikely, yes, but let us put it in context. The cafe was in York, UK – a…