Parameters of gaussian distribution, which is generated using central limit theorem

51 Views Asked by At

In a software I am working on (sensor simulation), I needed to generate normally distributed noise for simulated sensor signals. I used the central limit theorem. I generated 20 random numbers and built an average out of them to approximate the gaussian distribution.

So I took the "measured" signal and generated 20 numbers from -noiseMax to +noiseMax and averaged them. I added the result to the signal to have noise.

Now, for my university, I have to describe this Gaussian distribution by its mean and variance. Ok, mean will be 0 but I have absolutely no idea how to convert noiseMax in my program into the variance. Googling haven't helped much.

1

There are 1 best solutions below

0
On

I assume that the "random numbers" you used come from the uniform distribution. The variance of the uniform distribution is $$ \frac1{12} (b - a)^2 $$ where $a$ and $b$ are the lower and upper limit, so in your case $$ \frac13 \mathtt{noiseMax}^2. $$ The variance of the sum of independent random variables is the sum of the variances, so for $n$ random variables it is $$ \frac n3 \mathtt{noiseMax}^2; $$ in your case, $n = 20$. But you're interested in the average, which is the sum divided by $n$. For the variance, this makes a factor $\sqrt n$, and the variance of the average is $$ \frac{\sqrt{n}}3 \mathtt{noiseMax}^2. $$

Btw., there are better ways to generate normally distributed random numbers, and most modern programming languages have an implementation of one of these methods.