[Haskell-cafe] Splittable random numbers

wren ng thornton wren at freegeek.org
Fri Nov 12 18:26:18 EST 2010


On 11/12/10 5:33 AM, Richard Senington wrote:
> It does not give the results you would want. This may have something to
> do with picking "good" parameters for the mkLehmerTree function.
> For example, using a random setup, I just got these results
> result expected range
> 16.814 expected = 16.0 (1,31)
> 16.191 expected = 16.5 (1,32)
> 16.576 expected = 17.0 (1,33)
> 17.081 expected = 17.5 (1,34)
> 17.543 expected = 18.0 (1,35)

Have you run any significance tests? I wouldn't be surprised to see 
+/-0.5 as within the bounds of expected randomness. I'm more worried 
about it seeming to be consistently on the -0.5 end of things, than I am 
about it not matching expectation (how many samples did you take 
again?). For small ranges like this, a consistent -0.5 (or +0.5) tends 
to indicate off-by-one errors in the generator.

-- 
Live well,
~wren


More information about the Haskell-Cafe mailing list