By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,404 Members | 1,987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,404 IT Pros & Developers. It's quick & easy.

Normal distribution in Java

P: n/a
Hi NG

I need to get a normal distribution based on a mean and variance. How do I
do that in Java?

Is there a standart packet to use?

Christian
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
There is a single, simple formula. Next time try Google. For now take
a look at http://mathworld.wolfram.com/NormalDistribution.html

Christian wrote:
Hi NG

I need to get a normal distribution based on a mean and variance. How do I
do that in Java?

Is there a standart packet to use?

Christian


Jul 17 '05 #2

P: n/a
Did you try java.util.Random? There is a method called nextGaussian that
produced a random value from a normal distribution of mean 0.0 and variance
1.0.

From there, generating numbers from a normal distribution of mean m and
variance v is an easy task.

François Grondin

"Christian" <Do**@dahm.dk> wrote in message
news:pa***************************@dahm.dk...
Hi NG

I need to get a normal distribution based on a mean and variance. How do I
do that in Java?

Is there a standart packet to use?

Christian

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.