Computationally simple Pseudo-Gaussian Distribution with varying mean and standard deviation?

Posted by mstksg on Stack Overflow See other posts from Stack Overflow or by mstksg
Published on 2010-05-14T06:52:41Z Indexed on 2010/05/14 6:54 UTC
Read the original article Hit count: 349

This picture from wikipedia has a nice example of the sort of functions I'd ideally like to generate

http://en.wikipedia.org/wiki/File:Normal_Distribution_PDF.svg

Right now I'm using the Irwin-Hall Distribution, which is more or less a Polynomial approximation of the Gaussian distribution...basically, you use uniform random number generator and iterate it x times, and take the average. The more iterations, the more like a Gaussian Distribution it is.

It's pretty nice; however I'd like to be able to have one where I can vary the mean. For example, let's say I wanted a number between the range 0 and 10, but around 7. Like, the mean (if I repeated this function multiple times) would turn out to be 7, but the actual range is 0-10.

Is there one I should look up, or should I work on doing some fancy maths with standard Gaussian Distributions?

© Stack Overflow or respective owner

Related posts about random-number-generator

Related posts about pseudo-random-numbers