I'm trying to calculate some simple probability.
Let's create a scenario at our fake company 'ABC Corp.'. ABC Corp. generates debit card numbers where the first 6 digits of the number can only be a small combination of digits and the last 10 are randomly assigned. Now, let's assume since ABC Corp. is a great company they don't store full debit card numbers (often). What they do store is the first 6 (small-combo) numbers and the last 4 of the debit card number. The middle six are 'masked'.
I need to prove that the probability of this outcome is not 0 even if it's infinitely small. Unfortunately the memory of my statistics courses at school is nil.
ABC Corp has 7 numbers that constitute the small combination:
410385 (.25% - 0.0025)
640419 (9.87% - 0.0987)
407847 (2.83% - 0.0283)
684707 (16.83% - 0.1683)
878074 (55.84% - 0.5584)
897047 (2.01% - 0.0201)
274427 (12.38% - 0.1238)
Each of the above numbers has a different weight assigned that is shown in parenthesis next to the value.
The last 4 numbers at ABC Corp. can be any combination of digits 0-9, so 10^4 = 10,000 possible outcomes.
The last piece of this equation relates to a unique identifier for an individual that resides in any country where ABC Corp. operates. Let's use the United State's Social Security Number as an example. There are 745,395,453 possible assignments of SSN.
The problem: I want to calculate the likelihood that someone at ABC Corp., for example, has one SSN, with a unique combination of 16-digit debit card number, but a non-unique combination of the masked (I.E. First 6 + Last 4) debit card number at ABC. Corp.
That is to say, when would we ever possibly run into a scenario where, without a different unique identifier to ABC Corps. masked debit card combination, we would run into issues identifying a card number that a customer had, assuming they could have, or could have >1 card.
The equation I've written: 7 * 10,000 * 745,395,453 = 52,177,681,710,000
Example:
John Doe has two cards:
Card Number 1: 4103856549871234
Card Number 2: 4103857894561234
SSN: 123-45-6789
Masked Number: 410385******1234
John Doe shares 1 SSN, two different card numbers, but when truncated appears to have the same card number.
The interpretation would be that the maximum number of these combinations ABC Corp. could have before running into issues (assuming a customer could have any given SSN out of the maximum possible) would be 7.5 trillion, but that it's not the say it could have already happened at ABC Corp. before.
I could be interpreting and calculating this the completely wrong way so please advise.
I think the question you are trying to ask is if you generate two full card numbers for the same person, what is the chance they will match the short-codes. If you call the probability of each of the six prefixes $p_1$ through $p_6$ the chance that two card numbers will match the first six is $\sum_{i=1}^6p_i^2$, which will about $0.35$, dominated by the $0.55^2$ term. The chance the last four digits match is $\frac 1{10\ 000}$ so the overall chance two cards match is about $30$ in a million. The number of SSNs does not matter-you can consider that you give each customer an ID number and you can make sure they don't match.