# [sdiy] Uniformly distributed noise generator?

Magnus Danielson magnus at rubidium.dyndns.org
Mon Jun 10 23:36:07 CEST 2013

```On 06/10/2013 01:55 PM, Steven Cook wrote:
> Hi,
>
>> gaussian (like normal noise circuits)
>
> Maybe I've not had enough coffee today, but isn't ordinary white noise
> uniformly distributed rather than gaussian?

Get your coffee. White noise is gaussian.

A little exercise:

Take one uniformly distributed noise source, look at it's distribution
and you will find it to be uniform.

Now, add a second uniform distributed noise source (of the same
amplitude), now look at the distribution and you will find that it is in
fact not uniform anymore, it is triangular. If you subtract the two
noises, it will sit neatly around zero (many is normalized between 0 and 1).

Now, build another pair and add, and you start getting somewhat bell-shaped.

As you have taken six pairs, you have a pretty gaussian shaped
distribution, and it has the RMS value of 1.

As you now add more and more pairs you get a more perfect gaussian
distribution bell, and as you go for infinitly many, you get the
gaussian distribution with all it's properties, such as infinite
peak-to-peak value.

As you look at the spectrum analyzer, it will be flat, and as you
integrate over longer and longer time, it will be flatter and flatter.

This trick to build gaussian distribution out of a uniform distribution
is a common trick, if one does not use the Box-Muller approximation
which is another way to do it. The use of 12 noise samples is very
common, as it's RMS value becomes unity, but with some simple scaling
other numbers can be used to achieve the wanted RMS scaling accurately.

Actually adding sines with it's quirky distribution resists this harder,
but after sufficient numbers it also goes gaussian.

Sorry for making some noise.

Cheers,
Magnus

```