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.



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.)


  • $\begingroup$ It's not at all clear what you're asking. What's the question? Are you defining "peak-peak variation" as max(rn)-min(rn) for a given sample size? It looks like you're comparing real world noise to ideal Gaussian noise? What's meant by "generate noise"? Is this a noise process or do you just mean the output of randn? How do you calculate "variation (peak to peak for consecutive values)"? Also, unless you have a very old version of Matlab, you should never use randn('state',0)see this article. $\endgroup$ – horchler Oct 29 '13 at 20:01
  • $\begingroup$ That is what I am confused about. 1. Is the peak-peak variation calculated as max(rn)-min(rn) 2. I mean the output of randn. $\endgroup$ – AAP Oct 29 '13 at 20:16

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.