aspose file tools*
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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
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