Connecting Tech Pros Worldwide Forums | Help | Site Map

Normal distribution in Java

Christian
Guest
 
Posts: n/a
#1: Jul 17 '05
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

Mihai Osian
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Normal distribution in Java


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

Christian wrote:
[color=blue]
>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
>
>[/color]

François Grondin
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Normal distribution in Java


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" <Doom@dahm.dk> wrote in message
news:pan.2004.02.09.11.34.50.54497@dahm.dk...[color=blue]
> 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[/color]


Closed Thread


Similar Java bytes