Math (probablility) Problem

The forum for general posting. Come join the madness. :)
Post Reply
Message
Author
User avatar
BackInTex
Posts: 12780
Joined: Mon Oct 08, 2007 12:43 pm
Location: In Texas of course!

Math (probablility) Problem

#1 Post by BackInTex » 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!
..what country can preserve it’s liberties if their rulers are not warned from time to time that their people preserve the spirit of resistance? let them take arms.
~~ Thomas Jefferson

User avatar
Bob78164
Bored Moderator
Posts: 21626
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: Math (probablility) Problem

#2 Post by Bob78164 » Thu Sep 08, 2022 2:59 pm

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
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
Beebs52
Queen of Wack
Posts: 14890
Joined: Mon Oct 08, 2007 11:38 am
Location: Location.Location.Location

Re: Math (probablility) Problem

#3 Post by Beebs52 » Thu Sep 08, 2022 3:00 pm

I like pizza.
Well, then

User avatar
Vandal
Director of Promos
Posts: 6663
Joined: Mon Oct 08, 2007 6:42 pm
Location: Literary Circles
Contact:

Re: Math (probablility) Problem

#4 Post by Vandal » Thu Sep 08, 2022 3:09 pm

Image


The answer is 42
_________________________________________________________________________________
Available now:
The Secret At Haney Field: A Baseball Mystery
The Right Hand Rule
Center Point
Dizzy Miss Lizzie
Running On Empty
The Tick Tock Man
The Dragon's Song by Binh Pham and R. M. Clark
Devin Drake and The Family Secret

Visit my website: http://www.rmclarkauthor.com

Ready: Devin Drake and The RollerGhoster

User avatar
Beebs52
Queen of Wack
Posts: 14890
Joined: Mon Oct 08, 2007 11:38 am
Location: Location.Location.Location

Re: Math (probablility) Problem

#5 Post by Beebs52 » Thu Sep 08, 2022 3:25 pm

Vandal wrote:
Thu Sep 08, 2022 3:09 pm
Image


The answer is 42
Don't panic.
Well, then

User avatar
BackInTex
Posts: 12780
Joined: Mon Oct 08, 2007 12:43 pm
Location: In Texas of course!

Re: Math (probablility) Problem

#6 Post by BackInTex » Thu Sep 08, 2022 3:36 pm

Bob78164 wrote:
Thu Sep 08, 2022 2:59 pm
x=y/(b+1-a). --Bob
Thanks, that is really helpful!
..what country can preserve it’s liberties if their rulers are not warned from time to time that their people preserve the spirit of resistance? let them take arms.
~~ Thomas Jefferson

User avatar
silverscreenselect
Posts: 23175
Joined: Mon Oct 08, 2007 11:21 pm
Contact:

Re: Math (probablility) Problem

#7 Post by silverscreenselect » 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?
Check out our website: http://www.silverscreenvideos.com

User avatar
BackInTex
Posts: 12780
Joined: Mon Oct 08, 2007 12:43 pm
Location: In Texas of course!

Re: Math (probablility) Problem

#8 Post by BackInTex » 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.
..what country can preserve it’s liberties if their rulers are not warned from time to time that their people preserve the spirit of resistance? let them take arms.
~~ Thomas Jefferson

User avatar
Bob78164
Bored Moderator
Posts: 21626
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: Math (probablility) Problem

#9 Post by Bob78164 » Fri Sep 09, 2022 11:33 am

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
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
Estonut
Evil Genius
Posts: 10495
Joined: Sat Oct 13, 2007 1:16 am
Location: Garden Grove, CA

Re: Math (probablility) Problem

#10 Post by Estonut » Sat Sep 10, 2022 1:23 am

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.
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx

User avatar
tlynn78
Posts: 8652
Joined: Tue Oct 09, 2007 9:31 am
Location: Montana

Re: Math (probablility) Problem

#11 Post by tlynn78 » Fri Oct 28, 2022 9:05 pm

Vandal wrote:
Thu Sep 08, 2022 3:09 pm
Image


The answer is 42
It's always 42. And pizza.
To argue with a person who has renounced the use of reason is like administering medicine to the dead. -Thomas Paine
You can ignore reality, but you can't ignore the consequences of ignoring reality. -Ayn Rand
Those who can make you believe absurdities, can make you commit atrocities. -Voltaire

User avatar
triviawayne
Posts: 678
Joined: Fri Jul 10, 2015 6:38 am

Re: Math (probablility) Problem

#12 Post by triviawayne » 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%?

User avatar
Bob78164
Bored Moderator
Posts: 21626
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: Math (probablility) Problem

#13 Post by Bob78164 » 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
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
triviawayne
Posts: 678
Joined: Fri Jul 10, 2015 6:38 am

Re: Math (probablility) Problem

#14 Post by triviawayne » Sun Oct 30, 2022 7:55 am

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).

Post Reply