Testing random

Steven D'Aprano steve at pearwood.info
Sun Jun 7 14:28:46 EDT 2015


On Mon, 8 Jun 2015 02:36 am, Thomas 'PointedEars' Lahn wrote:

> Chris Angelico wrote:

>> The greater the multiplier, the lower the chance that any element will
>> have no hits.
> 
> Wrong.

No, Chris is correct. The "multiplier" increases the number of samples. The
larger the number of samples, the lower the chance that any element is not
represented.

If my previous post didn't convince you, consider an even simpler random
distribution: tossing a fair coin. The probability of getting a head is
exactly 1/2 whether you toss the coin once or a thousand times. But if you
toss the coin once, your chances of getting "no heads" is 1/2. If you toss
it a thousand times, your chances of getting "no heads" is 1/2**1000.



-- 
Steven




More information about the Python-list mailing list