Re: rand() function

2002-01-14 Thread Roger C Haslock
> > Another way to determine how randomly the rand() function is working is to plot > it sorted. A bad random function might predominate in a particular area, so > you want to see a straight diagonal line in this case, meaning the results are > spread throughout the range. (This is drifting off-

RE: rand() function

2002-01-14 Thread Gary Hawkins
n this case, meaning the results are spread throughout the range. Here's what it looks like with @data = sort @data: http://www.eskimo.com/~ghawk/temp/randplotsorted.png Gary > -Original Message- > From: Wagner-David [mailto:[EMAIL PROTECTED]] > Sent: Sunday, January 13,

Re: rand() function

2002-01-13 Thread Roger C Haslock
#x27;" <[EMAIL PROTECTED]>; "Gary Hawkins" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, January 14, 2002 5:19 AM Subject: RE: rand() function > Worked just like stated. I missed that you were pushing on @data and used @dataset when going to the img

RE: rand() function

2002-01-13 Thread Wagner-David
:[EMAIL PROTECTED]] Sent: Saturday, January 12, 2002 08:51 To: Gary Hawkins Cc: [EMAIL PROTECTED] Subject: Re: rand() function You seem to have looked at Chart-Plot. You might try use Chart::Plot; my $img = Chart::Plot->new(400,400); my @data; for (1..1) { push @data, rand() } $

Re: rand() function

2002-01-12 Thread Roger C Haslock
- From: "Wagner-David" <[EMAIL PROTECTED]> To: "'Roger C Haslock'" <[EMAIL PROTECTED]>; "Gary Hawkins" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 10, 2002 8:27 PM Subject: RE: rand() function > What P

Re: rand() function

2002-01-12 Thread Roger C Haslock
be used in a > script. No offense please. My question is reasonable. > > > -Original Message- > > From: Roger C Haslock [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, January 10, 2002 11:56 PM > > To: Gary Hawkins > > Subject: Re: rand() function &g

RE: rand() function

2002-01-10 Thread Wagner-David
What Perl module is needed for plot or is this under the browser or Thanks. Wags ;) -Original Message- From: Roger C Haslock [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 11:36 To: Gary Hawkins; [EMAIL PROTECTED] Subject: Re: rand() function My apologies: a typo

Re: rand() function

2002-01-10 Thread Roger C Haslock
Sent: Wednesday, January 09, 2002 11:49 PM Subject: RE: rand() function > > to take successive pairs, and plot them on a graph. Bad generators would > > show distinct lines after a while. > > > > eg > > > > for (0..1) { > > plot rand(), read()

RE: rand() function

2002-01-09 Thread Gary Hawkins
> to take successive pairs, and plot them on a graph. Bad generators would > show distinct lines after a while. > > eg > > for (0..1) { > plot rand(), read() > } > What would it require to make that do something? >ppm search plot Packages available from http://ppm.ActiveState.com/cgibin/

Re: rand() function

2002-01-09 Thread Roger C Haslock
A simple test I discovered years ago for pseudo-random number generators was to take successive pairs, and plot them on a graph. Bad generators would show distinct lines after a while. eg for (0..1) { plot rand(), read() } - Roger - - Original Message - From: "Robert Howard" <

RE: rand() function

2002-01-07 Thread Gary Hawkins
> > Is there a statistically better solution for generating random numbers than > > Perl's built in rand() function? I noticed a couple modules on CSPAN, but > > are they any better? I haven't done a true test of the spread > regular rand() > > gives, but it seems to me to give numbers closer to t

Re: rand() function

2002-01-07 Thread John W. Krahn
Robert Howard wrote: > > Is there a statistically better solution for generating random numbers than > Perl's built in rand() function? I noticed a couple modules on CSPAN, but > are they any better? I haven't done a true test of the spread regular rand() > gives, but it seems to me to give numbe

RE: rand() function

2002-01-07 Thread McCollum, Frank
I did a random sampling of 10,000 random numbers in two separate groups : for (0..1) { print rand()."\n" } It seemed to consistently revert towards a mean of 0.50 (i.e. results(1) = 0.503; results(2) = 0.498). I also broke those into groups of 100 and seemed to get the same results. That