From: "Mauricio Fernández" Date: 2005-07-17T19:18:29+09:00 Subject: Re: [QUIZ] Sampling (#39) On Sun, Jul 17, 2005 at 05:45:10PM +0900, ruby quiz wrote: > > > 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. > > > > Paolo > 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, > or thereabouts :-) I believed it was PI(i*200, i=1..20) / 4000^20 = PI(i, i=1..20) / 20^20 >> 1.0 * (1..20).inject(1){|s,x| s * x * 200} / 4000**20 => 2.32019615953125e-08 -- Mauricio Fernandez