java – Random. Problems with nextgaussian()

Random. Nextgaussian () should give a random number no.s, with a mean of 0 and an STD deviation of 1.0

Solution

A Gaussian distribution with a mean value of 0 and a standard deviation of 1 means that the mean value of the distribution is 0 and about 70% of the population is in the range of [- 1,1] Ignore out of range numbers – they form an edge of about 16% on either side

Perhaps a better solution is to generate distributions with mean = 0 and std.dev = 0.5 This will give you a distribution of values in the [- 1,1] range of about 96%

A better solution is to work backwards as described above and use approximately the same idea 99.7% of the values are in the 3-sigma range: use std.dev = 1 / 3 This will almost invalidate the less useful quantity you get When you get one, omit it

Of course, if you're studying math intensive products, none of this is of any value

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>