# PRNG for a gaussian distribution?

I need a Pseudo random number generator algorithm that will produce a near gaussian distribution (bell curve) for automated test data purposes. I know that some PRNG will produce patterns, but none seem gaussian. Do you have an recommendations, ideally I will get several suggestions, usable for multiple automated tests.

New contributor
Martin of Hessle is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• You'd have got your answer 48 minutes faster by just Googling "pseudorandom gaussian"... – David Richerby Jan 11 at 12:07
• @DavidRicherby, I did, there was nothing useful on the first couple of pages of Google, which is why I asked here. Most of the non uniformity was patterns not gaussian. – Martin of Hessle Jan 11 at 14:05
• Perhaps your problem was using words like "pattern". I realize search results can vary depending on circumstances, but the first hit I get for the search term I suggested is Wikipedia's page on PRNGs, which has a section on non-uniform distributions, which mentions the general case and the Gaussian. The Wikipedia page on the Gaussian also has a section on how to generate samples computationally. And it's always worth checking Wikipedia for mathematics and algorithms questions. – David Richerby Jan 11 at 15:26

You can generate any distribution by using a standard PRNG to choose $$X$$ uniformly from the interval $$[0,1]$$ and then returning $$F^{-1}(X)$$, where $$F$$ is the cumulative distribution function of the distribution you're interested in.