Re: Test a random function

2009-08-07 Thread Stuart Sierra
Generally, if you're testing something that is supposed to be truly random (like shuffle and rand-elt), you do a large sample and make sure the distribution of results is truly (close to) uniform. -SS On Aug 7, 9:17 pm, Sean Devlin francoisdev...@gmail.com wrote: Ok, I need some help.  I'm

Re: Test a random function

2009-08-07 Thread Sean Devlin
The problem is how do you define close to uniform? All I remember my signals noise classes is that this really hard, and Zed Shaw's rant has convinced me that in order to do this right it takes time. I'm going to punt on the issue for now. Quick, is there a statistician in the house? Sean

Re: Test a random function

2009-08-07 Thread Andy Fingerhut
On Aug 7, 6:17 pm, Sean Devlin francoisdev...@gmail.com wrote: Ok, I need some help.  I'm writing some tests for c.c.seq-utils, and I ran into a problem defining a test for both shuffle and rand-elt. Does anyone here have any experience writing tests for random functions?  Am I going to need