>
> 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-
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,
#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
:[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() }
$
-
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
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
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
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()
> 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/
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" <
> > 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
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
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
13 matches
Mail list logo