Test randomness from STD deviation

1 visualizzazione (ultimi 30 giorni)
joy
joy il 8 Nov 2012
Hello
If I have a random seq of 50,000 data and all the data ranging between 0 to 255..then is it possible to test the true randomness by measuring std deviation......
X = randi(256,1,50000)-1;
P = histc(X,0:255);
what shall be next,how to measure if the data are uniformly random in nature by measuring std deviation....

Risposte (1)

José-Luis
José-Luis il 8 Nov 2012
Modificato: José-Luis il 8 Nov 2012
No, the standard deviation by itself will tell you next to nothing about the nature of the distribution. Something like the two-sample Kolmogorov-Smirnov test might help you.
doc kstest2
The problem remains of defining what true randomness is. If your numbers are generated by a computer, then what you get are pseudo-random numbers. For such numbers, the "randomness" breaks down once you have very many samples, or when you consider many dimensions. No all random numbers are created equal.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by