A simple way go get a normally distributed random number:
- accumulate
N
uniformly distributed numbers, say in range
0
..
R
.
- substract the mean,
NR/2
.
- divide by the standard deviation,
Sqrt(NR^2/12)
.
The larger
N
, the better the approximation. Use
N=10
.
Also see
http://en.wikipedia.org/wiki/Box-Muller_transformation[
^].