The issue is that grandom doesn't work properly on integer types, since it makes a distribution with mean 0 and stddev 1. It's a bit awkward, but you can use
$vals = (grandom($n) * $stdev + $mean)->rint->byte instead. On Nov 11, 2013, at 8:59 AM, mraptor <[email protected]> wrote: > Is there are way to generate random values based on Normal distribution. > The same like rnorm() in R-language. > >> round( rnorm(3,mean=2^n/2,sd=sqrt(2^n)/2) ) > [1] 524758 524540 524647 > > I see there is grandom() funtion, but it requires some sort of lib (ndtri) ? > > pdl> p grandom(byte,1) > > ndtri domain error > [0] > > > thanks > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
