Statistics/Normal distribution: Difference between revisions

m
(Rust Implementation)
Line 1,773:
Histogram( X );</lang>
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>x:= RandomReal[1]
SampleNormal[n_] := (Print[#//Length, " numbers, Mean : ", #//Mean, ", StandardDeviation : ", #//StandardDeviation];
Histogram[#, BarOrigin -> Left,Axes -> False])& [(Table[(-2*Log[x])^0.5*Cos[2*Pi*x], {n} ]]
 
Invocation:
SampleNormal[ 10000 ]
1,111

edits