## Math (probablility) Problem

- BackInTex
**Posts:**12075**Joined:**Mon Oct 08, 2007 12:43 pm**Location:**In Texas of course!

### Math (probablility) Problem

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!

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

~~ Thomas Jefferson

- Bob78164
- Bored Moderator
**Posts:**20928**Joined:**Mon Oct 08, 2007 12:02 pm**Location:**By the phone

### Re: Math (probablility) Problem

x=y/(b+1-a). --BobBackInTex wrote: ↑Thu Sep 08, 2022 2:57 pmI 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!

"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

- Beebs52
- Queen of Wack
**Posts:**13312**Joined:**Mon Oct 08, 2007 11:38 am**Location:**Location.Location.Location

- Vandal
- Director of Promos
**Posts:**5965**Joined:**Mon Oct 08, 2007 6:42 pm**Location:**Literary Circles-
**Contact:**

### Re: Math (probablility) Problem

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

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

Ready: Devin Drake and The Family Secret

Working on:

Devin Drake and The RollerGhoster

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

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

Ready: Devin Drake and The Family Secret

Working on:

Devin Drake and The RollerGhoster

- Beebs52
- Queen of Wack
**Posts:**13312**Joined:**Mon Oct 08, 2007 11:38 am**Location:**Location.Location.Location

### Re: Math (probablility) Problem

**Well, then**

- BackInTex
**Posts:**12075**Joined:**Mon Oct 08, 2007 12:43 pm**Location:**In Texas of course!

### Re: Math (probablility) Problem

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

~~ Thomas Jefferson

- silverscreenselect
**Posts:**21112**Joined:**Mon Oct 08, 2007 11:21 pm-
**Contact:**

### Re: Math (probablility) Problem

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

- BackInTex
**Posts:**12075**Joined:**Mon Oct 08, 2007 12:43 pm**Location:**In Texas of course!

### Re: Math (probablility) Problem

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.silverscreenselect wrote: ↑Thu Sep 08, 2022 3:44 pmIf 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?

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

~~ Thomas Jefferson

- Bob78164
- Bored Moderator
**Posts:**20928**Joined:**Mon Oct 08, 2007 12:02 pm**Location:**By the phone

### Re: Math (probablility) Problem

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. --BobBackInTex wrote: ↑Fri Sep 09, 2022 10:42 amI'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.silverscreenselect wrote: ↑Thu Sep 08, 2022 3:44 pmIf 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?

"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

- Estonut
- Evil Genius
**Posts:**10365**Joined:**Sat Oct 13, 2007 1:16 am**Location:**Garden Grove, CA

### Re: Math (probablility) Problem

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.BackInTex wrote: ↑Fri Sep 09, 2022 10:42 amI'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.

A child of five would understand this. Send someone to fetch a child of five.

*Groucho Marx*