Page 1 of 1
Math (probablility) Problem
Posted: Thu Sep 08, 2022 2:57 pm
by BackInTex
I need the formula to calulate x where x is the probablity that a randomly generated number between and including 0 and 9999 already exists in a population of y distinct numbers between 0 and 9999.
Real world explanation:
We issue company credit cards to employees. They are tracked/identified in the system by the last four digits. When requesting new cards from randomly generated card numbers, what is the probability that the next card issued will end in the same four digits of a card already in use by another employee?
If you can write the formula with the following, that will help:
x = probablity
y = number of existing distinct values
a = floor of values (currently zero)
b = ceiling of values (currently 9999)
e.g. a + b = number of possible distinct values
Top prize of "Thanks, that is really helpful!" will be awarded to the first correct response.
Go!
Re: Math (probablility) Problem
Posted: Thu Sep 08, 2022 2:59 pm
by Bob78164
BackInTex wrote: ↑Thu Sep 08, 2022 2:57 pm
I need the formula to calulate x where x is the probablity that a randomly generated number between and including 0 and 9999 already exists in a population of y distinct numbers between 0 and 9999.
Real world explanation:
We issue company credit cards to employees. They are tracked/identified in the system by the last four digits. When requesting new cards from randomly generated card numbers, what is the probability that the next card issued will end in the same four digits of a card already in use by another employee?
If you can write the formula with the following, that will help:
x = probablity
y = number of existing distinct values
a = floor of values (currently zero)
b = ceiling of values (currently 9999)
e.g. a + b = number of possible distinct values
Top prize of "Thanks, that is really helpful!" will be awarded to the first correct response.
Go!
x=y/(b+1-a). --Bob
Re: Math (probablility) Problem
Posted: Thu Sep 08, 2022 3:00 pm
by Beebs52
I like pizza.
Re: Math (probablility) Problem
Posted: Thu Sep 08, 2022 3:09 pm
by Vandal
The answer is 42
Re: Math (probablility) Problem
Posted: Thu Sep 08, 2022 3:25 pm
by Beebs52
Vandal wrote: ↑Thu Sep 08, 2022 3:09 pm
The answer is 42
Don't panic.
Re: Math (probablility) Problem
Posted: Thu Sep 08, 2022 3:36 pm
by BackInTex
Bob78164 wrote: ↑Thu Sep 08, 2022 2:59 pm
x=y/(b+1-a). --Bob
Thanks, that is really helpful!
Re: Math (probablility) Problem
Posted: Thu Sep 08, 2022 3:44 pm
by silverscreenselect
BackInTex wrote: ↑Thu Sep 08, 2022 2:57 pm
What is the probability that the next card issued will end in the same four digits of a card already in use by another employee?
If you're the person in charge of handing out these credit cards and you're going to get in trouble if there's a screwup, then the probability of there being one sometime while you're responsible is 100% (or 1 as we like to refer to it in probability language).
The probability of your continuing to be in charge after that is 0.
Isn't probabibility simple?
Re: Math (probablility) Problem
Posted: Fri Sep 09, 2022 10:42 am
by BackInTex
silverscreenselect wrote: ↑Thu Sep 08, 2022 3:44 pm
BackInTex wrote: ↑Thu Sep 08, 2022 2:57 pm
What is the probability that the next card issued will end in the same four digits of a card already in use by another employee?
If you're the person in charge of handing out these credit cards and you're going to get in trouble if there's a screwup, then the probability of there being one sometime while you're responsible is 100% (or 1 as we like to refer to it in probability language).
The probability of your continuing to be in charge after that is 0.
Isn't probabibility simple?
I'm not in charge of the cards, just the system that processes the charges. The software only uses the 4 digits to identtify the card holder. We are getting duplicates and the charges are going to whomever has those 4 digits assigned to them. I needed the probabilities to convince the software developer we need additonal identifers such as employee number included in the design.
Re: Math (probablility) Problem
Posted: Fri Sep 09, 2022 11:33 am
by Bob78164
BackInTex wrote: ↑Fri Sep 09, 2022 10:42 am
silverscreenselect wrote: ↑Thu Sep 08, 2022 3:44 pm
BackInTex wrote: ↑Thu Sep 08, 2022 2:57 pm
What is the probability that the next card issued will end in the same four digits of a card already in use by another employee?
If you're the person in charge of handing out these credit cards and you're going to get in trouble if there's a screwup, then the probability of there being one sometime while you're responsible is 100% (or 1 as we like to refer to it in probability language).
The probability of your continuing to be in charge after that is 0.
Isn't probabibility simple?
I'm not in charge of the cards, just the system that processes the charges. The software only uses the 4 digits to identtify the card holder. We are getting duplicates and the charges are going to whomever has those 4 digits assigned to them. I needed the probabilities to convince the software developer we need additonal identifers such as employee number included in the design.
Then you actually wanted the probability that if z numbers are randomly assigned, at least two of them are duplicates. That's much, much higher than most people realize. For example, the solution to the birthday problem tells you that if b=365 and a=1, then once you've assigned 23 numbers the odds are better than 50-50 that you've assigned at least one pair of duplicates. (The probability that you've avoided duplication is (365*364*363* . . . * 343)/365^23, which turns out to be less than 0.5.) For your actual problem, my intuition is that your odds of a duplicate reach 50-50 at around 300 assignments, but it's easy enough to set up a spreadsheet to figure out the actual number. --Bob
Re: Math (probablility) Problem
Posted: Sat Sep 10, 2022 1:23 am
by Estonut
BackInTex wrote: ↑Fri Sep 09, 2022 10:42 am
I'm not in charge of the cards, just the system that processes the charges. The software only uses the 4 digits to identify the card holder. We are getting duplicates and the charges are going to whomever has those 4 digits assigned to them. I needed the probabilities to convince the software developer we need additional identifiers such as employee number included in the design.
Just the fact that you are getting duplicates should be enough to convince a good software developer that additional identifiers are required for uniqueness. It was a lame idea to use only the last 4 digits and expect to tie back to a single card holder.
Re: Math (probablility) Problem
Posted: Fri Oct 28, 2022 9:05 pm
by tlynn78
Vandal wrote: ↑Thu Sep 08, 2022 3:09 pm
The answer is 42
It's always 42. And pizza.
Re: Math (probablility) Problem
Posted: Sat Oct 29, 2022 12:15 pm
by triviawayne
Not being a math genius, I need to ask:
Wouldn’t the probability be as simple as if there are 10,000 combinations available, and let’s say 1000 employees have the cards already, there is a 1,000 of 10,000 chance the next issued card would be duplicated, or 10%?
Re: Math (probablility) Problem
Posted: Sat Oct 29, 2022 2:38 pm
by Bob78164
triviawayne wrote: ↑Sat Oct 29, 2022 12:15 pm
Not being a math genius, I need to ask:
Wouldn’t the probability be as simple as if there are 10,000 combinations available, and let’s say 1000 employees have the cards already, there is a 1,000 of 10,000 chance the next issued card would be duplicated, or 10%?
You also need to include the probability that there’s already a duplication among the first 1000 cards. —Bob
Re: Math (probablility) Problem
Posted: Sun Oct 30, 2022 7:55 am
by triviawayne
Bob78164 wrote: ↑Sat Oct 29, 2022 2:38 pm
triviawayne wrote: ↑Sat Oct 29, 2022 12:15 pm
Not being a math genius, I need to ask:
Wouldn’t the probability be as simple as if there are 10,000 combinations available, and let’s say 1000 employees have the cards already, there is a 1,000 of 10,000 chance the next issued card would be duplicated, or 10%?
You also need to include the probability that there’s already a duplication among the first 1000 cards. —Bob
I did mean if those 1000 employees each had a different 4-digit combo, but at least it is that simple. Even more simple is if the card numbers would've been issued in order to prevent duplication, and as long as the company doesn't expect to have more than 10,000 employees (pretty realistic for most companies, and I would suspect the one in question as they didn't bother to have a better system in the first place).