Statistics/Normal distribution: Difference between revisions

(Added Julia language)
Line 1,571:
<lang Lua>function gaussian (mean, variance)
return math.sqrt(-2 * variance * math.log(math.random())) *
math.cos(2 * variance * math.pi * math.random()) + mean
end
Anonymous user