range of values in np.random.randn

I am trying to generate some noise to a data set using np.random.randn. Based on the NumPy documentation randn function generates a random number in the standard distribution of mean 0 and variance 1. But standard distribution extends to infinity on both sides, does this mean there is a very very small chance that this function can generate extremely big/small values?

If so how to limit the values with range. I plan to keep 3*sigma threshold on either side. Are there any better ways to generate random normal distribution values within the given range?

1

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like