| Thread Closed |
M random numbers from 1,2,...,N |
Share Thread | Thread Tools |
| Mar19-10, 05:54 PM | #1 |
|
|
M random numbers from 1,2,...,N
Suppose we have a random number generator which gives a random numbers from a set {1,2,3,...,N}, and any single number of these comes out with probability 1/N.
Then fix some number M > N, and take M random numbers out from the generator. What is the probability, that these M numbers include each one of the numbers 1,2,3,...,N at least once? --- I know one person who buys some kind of candy where a small toy always comes with the candy. There is some number of different kind of toys out there, and this person became interested to know how many candy he/she should buy before getting them all. I found myself unable to answer it. |
| Mar19-10, 07:34 PM | #2 |
|
|
|
| Mar19-10, 07:51 PM | #3 |
|
|
I told the background about toys and candy for sake of motivation, but in the end I'm interested in the mathematical problem which I outlined.
If a simple mathematical model for a real world problem is too difficult, then it doesn't make sense to seek for more complicated models either. It's better to solve models one step at a time. |
| Mar19-10, 11:10 PM | #4 |
|
|
M random numbers from 1,2,...,N
Well, I can model how many numbers I would have to draw from a set of 10 to get at least 1 of each (a mean of 29.5).
|
| Mar20-10, 08:22 AM | #5 |
|
|
|
| Mar20-10, 10:16 AM | #6 |
|
|
Your first question is easy to turn into balls and boxes:
We have M balls and N boxes, with M > N. We want to know
I claim the first one is easy. I think the second one can be transformed into an easy problem, but I'm having a mental block on the details. Your second question is a famous problem -- the coupon collector's problem. |
| Mar20-10, 10:44 AM | #7 |
|
|
I see. So the collector's problem can be solved without solving the problem I described, although my problem would give one way of approaching the collector's problem.
|
| Mar20-10, 12:27 PM | #8 |
|
|
|
| Mar20-10, 12:32 PM | #9 |
|
|
The second one is simply (M-1) choose (N-1). (This turns up in the Collatz Conjecture.) |
| Mar20-10, 12:39 PM | #10 |
|
|
[tex] 10\cdot\Big(1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{10}\Big) \approx 29.29 [/tex]
|
| Mar21-10, 02:31 AM | #11 |
|
|
|
| Mar21-10, 09:06 AM | #12 |
|
Recognitions:
|
|
| Mar21-10, 11:39 AM | #13 |
|
|
|
| Mar21-10, 01:37 PM | #14 |
|
|
I would not see it as exactly splitting hairs.
Euler has a formula for the harmonic series http://en.wikipedia.org/wiki/Harmonic_number: [tex] In(n) +\gamma +1/2n -1/(12n^2)+ 1/(12n^4)- +-[/tex] Letting gamma be .5772 and dropping terms past the square factor gives about 29.29 after multiplication by 10. It is rather useful to get a handle on the degree of error. I prefer such a calculation to a computer devised answer that does not tell us about the error involved. |
| Mar21-10, 02:48 PM | #15 |
|
|
|
| Mar21-10, 08:24 PM | #16 |
|
|
My gosh! I must add that my TI-86 can sum up the 50 case IN FOUR SECONDS! giving 224.96.
As far as this 10 case, why plain arithmetic will do here: 1+.5+.3333+.2500 + .2000+.1667+.1429+.1250 +.1111+.1000 = 2.9290. 2.929x10 = 29.290. This can be summed in about 30 seconds. If very careful probably around 45 seconds. |
| Thread Closed |
| Thread Tools | |
Similar Threads for: M random numbers from 1,2,...,N
|
||||
| Thread | Forum | Replies | ||
| Random Numbers | Linear & Abstract Algebra | 2 | ||
| True random numbers | General Math | 13 | ||
| random numbers | Programming & Comp Sci | 13 | ||
| random numbers | Calculus & Beyond Homework | 2 | ||