Testing random

Ned Batchelder ned at nedbatchelder.com
Sun Jun 7 17:21:48 EDT 2015


On Sunday, June 7, 2015 at 2:26:02 PM UTC-4, Thomas 'PointedEars' Lahn wrote:
> Chris Angelico wrote:
> 
> > On Mon, Jun 8, 2015 at 2:36 AM, Thomas 'PointedEars' Lahn
> > <PointedEars at web.de> wrote:
> >>> The greater the multiplier, the lower the chance that any element will
> >>> have no hits.
> >> Wrong.
> >>
> >>> [ex falso quodlibet]
> > 
> > Huh. Do you want to explain how, mathematically, I am wrong, or do you
> > want to join the RUE in my ignore list?
> 
> I already did; you have overlooked it.  In a nutshell, the probability of 
> 
>   1 1 1 1 1 1 1 1 1 1 1
> 
> is *the same* as that of
> 
>   1 2 3 4 5 6 7 8 9 1 2
> 
> and the same as that of
> 
>   8 3 6 3 1 2 6 8 2 1 6.
> 

You aren't agreeing because you are arguing about different things.
Thomas is talking about the relative probability of sequences of digits.
Chris is talking about the probability of a single digit never appearing
in the output.

Thomas: let's say I generate streams of N digits drawn randomly from 0-9.  
I then consider the probability of a zero *never appearing once* in my
stream.  Let's call that P(N).  Do you agree that as N increases, P(N)
decreases?

--Ned.



More information about the Python-list mailing list