0
$\begingroup$

I want to sample a 1-dimensional Gaussian, for this I need to generate random numbers in a certain range which will be used as function input.

The function is $\mathcal{N}(x|0,1) = \frac{1}{(|2 \pi|)^\frac{1}{2}} \cdot exp(- \frac{1}{2} x^2)$

Plotting it I get the following result:

plotting gaussian N(x|0,1)

This however does not help me in the decision in which number range I should use, maybe $[-2,2]$? This seems too arbitrary, what is the correct approach here?


In my programming langauge I have a random generator for generating normal variates.

  • 0
    @AndréNicolas Okay then I got it! – 2012-05-29

1 Answers 1

0

If this is a standard normal [-2, 2] only contains 95.4 percent of the data [-4, 4} puts it well over 99%. Six sigma would be [-6, 6].