< change language
It has become quite common for online services to provide some form of 2-factor authentication when logging in from unknown devices. For example, whenever I try to access my Gmail account from a computer I never used, I get a text message with a one-time use 6-digit code.
One day I was using that same service to log in into my email, when I noticed that one of the digits in the security code appeared twice, like the 1 in 315641. But when I read the other text messages from Google, I noticed that there were plenty more security codes with repeated digits than security codes that had six different digits. I found that weird and then decided to compute the probabilities of these events, just to check whether my intuition was tricking me or not...
We are about to compute some probabilities regarding these 6-digit codes - which I will start calling PINs for the sake of brevity - with the rather intuitive formula P(some property A)=# PINs that satisfy property# of existing PINs
Below you can find a table with some properties listed and the probability that the next PIN you will receive on your cellphone satisfies that probability.
(if you find any mistake on the calculations, suspect one of the numbers is wrong or want to know how I computed a specific probability, leave a comment below!)
After all, having a 6-digit code with a repeated digit is much more common than having a 6-digit code where every digit is different!!
One day I was using that same service to log in into my email, when I noticed that one of the digits in the security code appeared twice, like the 1 in 315641. But when I read the other text messages from Google, I noticed that there were plenty more security codes with repeated digits than security codes that had six different digits. I found that weird and then decided to compute the probabilities of these events, just to check whether my intuition was tricking me or not...
We are about to compute some probabilities regarding these 6-digit codes - which I will start calling PINs for the sake of brevity - with the rather intuitive formula P(some property A)=# PINs that satisfy property# of existing PINs
It is easy to see that there are a total of 106 valid PINs, so for the different properties we only need to compute the total number of PINs that satisfy it.
Below you can find a table with some properties listed and the probability that the next PIN you will receive on your cellphone satisfies that probability.
(if you find any mistake on the calculations, suspect one of the numbers is wrong or want to know how I computed a specific probability, leave a comment below!)
Property | Probability (up to 2 decimal places) |
---|---|
6 unique digits (e.g. 123456) | 15.12% |
5 or less unique digits (e.g. 525678) | 84.88% |
5 unique digits, repeated digit is consecutive (e.g. 551234) | 18.14% |
5 unique digits, no restrictions on repeated digit (e.g. 024328) | 45.36% |
4 or less unique digits (e.g. 235293) | 39.52% |
4 unique digits, repeated ones are together (e.g. 226997) | 3.02% |
3 or less unique digits (e.g. 123231) | 6.76% |
2 or less unique digits (e.g. 111331) | 0.28% |
After all, having a 6-digit code with a repeated digit is much more common than having a 6-digit code where every digit is different!!
- RGS
Pocket maths: your verification code is 446267
Reviewed by Unknown
on
September 12, 2018
Rating:

No comments: