*
The moose likes Java in General and the fly likes random number from a normal/lognormal distribution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "random number from a normal/lognormal distribution" Watch "random number from a normal/lognormal distribution" New topic
Author

random number from a normal/lognormal distribution

Tim Cao
Ranch Hand

Joined: Jul 26, 2004
Posts: 37
hi all,

Could anyone tell me how to generate a sequence of random numbers
drawn from a normal (or lognormal) distribution. All the random
generators in JFC are from uniform distribution. Do I need some
stat package for this?

Thanks for reading,

T.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

See the nextGaussian method in the Random class of java.util.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Tim Cao
Ranch Hand

Joined: Jul 26, 2004
Posts: 37
thanks marc
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: random number from a normal/lognormal distribution
 
Similar Threads
How to print out string at random interval
Generating random numbers with given properties
how to run a servletrunner
how many questions in scjp
Random number without dublicate