4 ms·
This is the occurence of each leter in the message: K = 10; N = 9; A = 9; H = 8; R = 8; F = 7; P = 7; O = 7; D = 6; Q = 6; M = 5; J = 5; G = 5; W = 5; T = 5; X
by tcgv 14y ago
This is the occurence of each leter in the message:
K = 10;
N = 9;
A = 9;
H = 8;
R = 8;
F = 7;
P = 7;
O = 7;
D = 6;
Q = 6;
M = 5;
J = 5;
G = 5;
W = 5;
T = 5;
X = 4;
E = 4;
Z = 4;
I = 4;
C = 3;
B = 3;
L = 3;
Y = 3;
V = 2;
S = 2;
U = 1
Doesn't seem like a trully random (white-noise) distribution.
- imurray 14y agoThose counts look fairly typical from a uniform distribution to me. There are fancy tests you could do, but to get a feel for it, I suggest simulation and eyeballing. Add up the counts after drawing 135 characters from a uniform character distribution 20 times, and compare the sorted lists of counts to this set of numbers after sorting.
- praptak 14y agoSomehow the really random distributions look less random than ones biased towards flattening-out. Within 500 truly random points in a square you'll see suspiciously looking clusters of points, choose 5 in each of the 10x10 subsquares and suddenly it looks much more "random". Edit: A bookmarklet to display some random points in a square, tested in Firefox 10 only: javascript:"<html><body><canvas id=\"tutorial\" width=\"150\" height=\"150\">foo</canvas><script>var canvas = document.getElementById('tutorial');var ctx = canvas.getContext('2d');ctx.fillStyle = \"rgb(000,0,0)\";for (var i=0;i<150;i++) {ctx.fillRect (Math.random() * 150,Math.random() * 150, 2, 2); };</script></body></html>"
- praptak 14y ago...and one showing true random and flattened random side by side: javascript:"<html><body><canvas id=\"tutorial\" width=\"200\" height=\"200\">foo</canvas><-><canvas id=\"tutorial2\" width=\"200\" height=\"200\">foo</canvas><script>var canvas = document.getElementById('tutorial');var ctx = canvas.getContext('2d');ctx.fillStyle = \"rgb(000,0,0)\";for (var i=0;i<400;i++) {ctx.fillRect (Math.random() * 200,Math.random() * 200, 2, 2); };</script><script>var canvas = document.getElementById('tutorial2');var ctx = canvas.getContext('2d');ctx.fillStyle = \"rgb(000,0,0)\";for (var i=0;i<20;i++) for(var j=0;j<20;j++) for(k=0;k<1;k++) {ctx.fillRect (i * 10 + Math.random() * 10, j * 10 + Math.random() * 10, 2, 2); };</script></body></html>"
- TazeTSchnitzel 14y agoWow, you're right. The random distribution looks far more "meaningful".
- keeperofdakeys 14y agoYou might want to look into the "incidence of coincidence", which is the probability that letters from two randomly chosen text's are the same. It can be changed to measure a single message, and gives a distinctive difference for english vs. random texts.