Talk:Random numbers: Difference between revisions

From Rosetta Code
Content added Content deleted
m (New page: sorry for editing without logging in - that was me all along...~~~~)
 
(Normal Distribution)
Line 1: Line 1:
sorry for editing without logging in - that was me all along...[[User:Sgeier|Sgeier]] 00:57, 7 April 2007 (EDT)
sorry for editing without logging in - that was me all along...[[User:Sgeier|Sgeier]] 00:57, 7 April 2007 (EDT)

== Normal Distribution ==

The Java and IDL examples do not appear to create normally distributed numbers, just uniformly distributed numbers over a given range (1 to 1.5 in the Java case).

The numbers generated will also not have the correct mean and standard deviation. The expected value of the Java example, for instance, will be 1.25 instead of 1. The standard deviation will be .144 instead of 0.5.

For an example of the algorithm, check out http://en.wikipedia.org/wiki/Normal_distribution#Generating_values_for_normal_random_variables

--[[User:Nachtrabe|Nachtrabe]] 13:53, 31 May 2007 (EDT)

Revision as of 17:53, 31 May 2007

sorry for editing without logging in - that was me all along...Sgeier 00:57, 7 April 2007 (EDT)

Normal Distribution

The Java and IDL examples do not appear to create normally distributed numbers, just uniformly distributed numbers over a given range (1 to 1.5 in the Java case).

The numbers generated will also not have the correct mean and standard deviation. The expected value of the Java example, for instance, will be 1.25 instead of 1. The standard deviation will be .144 instead of 0.5.

For an example of the algorithm, check out http://en.wikipedia.org/wiki/Normal_distribution#Generating_values_for_normal_random_variables

--Nachtrabe 13:53, 31 May 2007 (EDT)