```Graeme Defty <ruby_quizzer / yahoo.com> writes:

> Sorry, all. New to the list. I accidentally posted my
> previous under a nonsense user id :-)
>
>> > Unless I'm mistaken, in the 5e6-from-1e9 sampling,
>> the probability
>> > that a sampling contains exactly one number from a
>> given 200-numbers
>> > interval is 200.0*(1/200)*(199.0/200)**199 =
>> 0.3688. The probability
>> > that this happens for 20 such 200-numbers
>> intervals is
>> > 0.3688**20 = 2.1e-09.
>>
>> I think you are wrong. A rough estimates of this
>> probability gives me
>> 1e-2171438.
>> Actually, it should be a bit smaller, but at least
>> the order of
>> magnitude of the order of magnitude is right :)
>> Quite impressive...
>>
>> Paolo
>>
>>
> I think he is wrong too (sorry. Missed the previous
> post, so I don't know who it was)

Me.

> but I think I think
> it's wrong for a different reason.
>
> I got the probability of getting exactly one number in
> a specific interval to be as follows:
> Probability of one *specific* number in the interval
> 1/20
> Probability of all the other 19 OUT of that interval
> (19/20)**19
> But we have 20 specific numbers to consider, so:
> 20 * 1/20 * (19/20)**19
> or
> (19.0/20)**19

Right, that's what I did too, but I was talking about a 200-numbers
interval, not a 20-numbers one :)

> which gives a remarkably similar 0.3773536 (don't know
> if this is a co-incidence.

It isn't. ((x-1)/x)**(x-1) converges for x->Infinity.

= lim_{x->\inf} ((x-1)/x)**(x-1)
= lim_{x->\inf} (1-1/x)**(x-1)
= lim_{x->\inf} (1-1/x)**x * lim_{x->\inf} (1-1/x)**-1
= lim_{x->\inf} (1-1/x)**x * 1
= lim_{x->\inf} (1-1/x)**x
= lim_{x->\inf} (1/(1+1/x))**x
= lim_{x->\inf} 1/((1+1/x)**x)
= 1 / lim_{x->\inf} ((1+1/x)**x)
= 1/E
= 0.3678794...

>
> Where I think this goes wrong is in assuming that
> expanding this to 20 intervals just needs a **20.
>
> After we get exactly one number in the first interval,
> we then are looking for exactly one number in the
> second interval, which is only one interval out of 19.
> In other words, the probability should
> be(18.0/19)**18. and so forth. The overall probability
> therefore is
> (19.0/20)**19 * (18.0/19)**18 * ... * (2.0/1)**1
> which my RubyShell informs me is 0.377353602535307e-8,