Ultimately, the distribution is shaped and determined by your distribution function.
In your bell curve, you need to reduce the size of the standard deviation, that is, sigma in the exponent. You can do that fairly simply by simply making the guassian standard deviation sigma an input parameter into your randomizing function. The smaller the standard deviation, the tighter the bell curve. Definately not a perl specific question. -~.-~.-~.-~.-~.-~.-~.-~.-~.-~ -~ -~ Cliff Frensley -~ [EMAIL PROTECTED] -~ Seattle, WA -~ -~ -. On Tue, 28 Jan 2003, Russ Foster wrote: > I'm looking to generate a bunch of random information to be used for > testing. > > Right now, my script accepts three parameters, quantity, a central point, > and a deviation range and then generates [quantity] numbers ranging from > [central point - deviation range] to [central point + deviation range]. > > so it looks like this: > > perl GenNumbers.pl 10 100 5 > 95 > 102 > 99 > 100 > . > . > 101 > > Unfortunately this generates a rather flat distribution--numbers evenly > distributed from 95-105. Ideally, I'd like the majority of numbers to be > "closer" to the central point, with relatively few at the extremes. > > Any ideas on how to go about doing this? > > Now that I've written this up, I suppose it may be more of a math question > and Perl related. The only statistic related modules I can find are more > formulae based and don't help in generating numbers. > > If it matters, I'm using perl v5.6.1 for Cygwin. I do have access to > ActiveState perl if it's necessary. > > Thanks. > > -r > > Russell J Foster > Senior Systems Engineer > Subject, Wills, and Company > _______________________________________________ > Perl-Win32-Admin mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs