- #1
lavoisier
- 177
- 24
Hi everyone,
I have a question concerning probability.
In short, a guy on TV was betting with people in a bar that they wouldn't be able to guess 3 digits right out of the 8 digits of the serial number of a randomly chosen one dollar bill, and indeed, he won several times. He later explained that 'it isn't so easy to guess 3 digits out of an 8-digit number'.
I was curious to know how difficult it actually was (quantitatively), so I worked on the problem for a while and I found a formula that seemed OK. I used basic set and probability theory.
However, I wasn't very rigorous in deriving it (I'm not a mathematician): when I seemed to spot a pattern (binomial coefficients with alternating signs) I just 'assumed' this could be extended to a more general case. But I'm not sure I was correct in doing so.
This is what I got.
Suppose you pick a random number from the set of all numbers of p digits, each digit taking n possible values (so in the example above, p = 8 and n = 10).
A person (who doesn't know what the picked number is) writes down m distinct digits (obviously, 1≤m≤p, and each digit can only take one of the n defined values).
According to my calculations, the probability that the m digits are all contained (at least once) in the randomly picked number is:
[itex]{{\sum_{i=0}^{m}{\left(-1\right)^{i}\,{m\choose i}\,\left(n-i%
\right)^{p}}}\over{n^{p}}}[/itex]
I tested the formula in the simplified case of p=3, n=10, by actually counting how many numbers contained a given set of m=1, 2 or 3 digits, and it seemed to work there (the probabilities being 27.1%, 5.4% and 0.6%, respectively).
For the original problem (n=10, p=8, m=3), I found a probability of about 15%.
My questions are:
- is the formula correct?
- could it be expressed in a better/more concise form?
Thank you!
L
PS: someone in another forum suggested this problem is already addressed by the binomial distribution, but the numerical results I got from that didn't match the ones above, even for the case of p=3, where I am sure they are correct.
I have a question concerning probability.
In short, a guy on TV was betting with people in a bar that they wouldn't be able to guess 3 digits right out of the 8 digits of the serial number of a randomly chosen one dollar bill, and indeed, he won several times. He later explained that 'it isn't so easy to guess 3 digits out of an 8-digit number'.
I was curious to know how difficult it actually was (quantitatively), so I worked on the problem for a while and I found a formula that seemed OK. I used basic set and probability theory.
However, I wasn't very rigorous in deriving it (I'm not a mathematician): when I seemed to spot a pattern (binomial coefficients with alternating signs) I just 'assumed' this could be extended to a more general case. But I'm not sure I was correct in doing so.
This is what I got.
Suppose you pick a random number from the set of all numbers of p digits, each digit taking n possible values (so in the example above, p = 8 and n = 10).
A person (who doesn't know what the picked number is) writes down m distinct digits (obviously, 1≤m≤p, and each digit can only take one of the n defined values).
According to my calculations, the probability that the m digits are all contained (at least once) in the randomly picked number is:
[itex]{{\sum_{i=0}^{m}{\left(-1\right)^{i}\,{m\choose i}\,\left(n-i%
\right)^{p}}}\over{n^{p}}}[/itex]
I tested the formula in the simplified case of p=3, n=10, by actually counting how many numbers contained a given set of m=1, 2 or 3 digits, and it seemed to work there (the probabilities being 27.1%, 5.4% and 0.6%, respectively).
For the original problem (n=10, p=8, m=3), I found a probability of about 15%.
My questions are:
- is the formula correct?
- could it be expressed in a better/more concise form?
Thank you!
L
PS: someone in another forum suggested this problem is already addressed by the binomial distribution, but the numerical results I got from that didn't match the ones above, even for the case of p=3, where I am sure they are correct.