[Math] Standard deviation of Matlab ‘randn’ function

MATLABnoise

A quick and simple check (using code in MATLAB) shows that the numbers generated by MATLAB's randn function have a standard deviation that is one-fifth of the peak-peak variation.

MATLAB CODE:
randn('state',0);
rn = randn(100,1);
(max(rn)-min(rn))/std(rn)

I have researched, and people have used this rule for practical purposes.

http://terpconnect.umd.edu/~toh/spectrum/SignalsAndNoise.html

http://www.princetonmeasurements.com/whichsys.htm

However, when I generate noise using MATLAB's randn function, and observe it by plotting the numbers, the variation (peak to peak for consecutive values) is 3 times the standard deviation, whereas the above articles use the max and min of the generated random values (which may not be consecutive)

I am not sure what the theory behind this is. (I do know that for Gaussian random variable, the values are within 3 std.)

Thanks!!

Best Answer

Peak-to-peak variation of sample values is itself a random variable. In the Gaussian case it can be arbitrarily large, although with diminishing probability. You could obtain 3*sigma, 5*sigma or any other value. It probably doesn't make much sense to define a peak-to-peak variation of a random variable with infinite support, such as the Gaussian.

Related Question