Nemo's bash challenge for the day

Michael Still mikal at stillhq.com
Sun Mar 31 12:48:19 EST 2002


On Sun, 31 Mar 2002, Martijn van Oosterhout wrote:

> On Fri, Mar 29, 2002 at 10:14:17AM +1100, Michael Still wrote:
> > PS: How good is the bash random? See the attachment output.count for a
> > summary of 100,000 numbers between 1 and 10 being generated with the
> > default seed. It's probably good enough for most people.
>
> > 1: 9964
> > 2: 10009
> > 3: 9978
> > 4: 10015
> > 5: 9997
> > 6: 10020
> > 7: 10011
> > 8: 10008
> > 9: 10006
> > 10: 9992
>
> You do realise that if they were all exactly 10,000 that would be a definite
> sign of non-randomness!

Ummm, surely for an extremely large sample you would expect to see an
equal frequency for all of the options?

Mikal

-- 

Michael Still (mikal at stillhq.com)     UMT+11hrs





More information about the linux mailing list