I was merging onto the freeway near our house. The road was wet and the temperature was a degree or two below freezing. And you can probably see where this is going, right? I fishtailed a little bit, remembered by defensive driving skills, and regained control of the vehicle a few second before the adrenaline even had a chance to circulate all the way through to my heart. A split second no control across a bit of random ice. What a city.
“I wanted to talk to you about random numbers.” I said to Syntax Gull who was sitting nearby reading from a comic book.
“Why?” She asks.
“You sound like my daughter.” I frown, and mimic a two-year-old’s voice. “Why daddy? Why?”
Gull’s look is reproachful but she closes her comic, sets it delicately on the table, and tips her gaze in my direction. “Go on then. What do you want to discuss?”
“No.” Gull says flat, “You wanted to talk. Go.”
“Look.” I plead. “I didn’t want to upset you. It’s only that I’ve been picking away at some ideas and I’ve got no one around who really has that kind of expertise. I thought your interest in information… content… you know…”
Her expression drops a few degrees of sour and she seems a little less peeved as she prods me for more info. She sighs and says. “You’re working with random numbers then?”
I nod. “Trying to… it’s complicated.” I say. “I mean I’ve often used random number generators that have been built into various coding systems. And in one of my little scripts that I’ve set free on the site, well, it is essentially a little randomized database query.”
“The built in stuff… at least as I understand them… should be more than adequate to your purpose. No?”
“Oh, yeah. For that kind of stuff.” I agree. “Sure. I mean we’re not doing anything too complicated nor important for true randomness there. But it did get me thinking…” I shrug. “You know I was hitting the reload on the page over and over, and it started with a kind of test of the system, evolved into a trial to see if I could get certain entries to appear, and eventually…”
“You started noticing patterns?”
I smiled. “My little human brain noticing patterns amongst the noise of random entries? Not really so much patterns, as gaps, I guess.”
“Gaps?” Gull looked puzzled now. Her annoyance with my earlier comments obviously fading quickly away. “How so?”
“Well, it’s funny really.” I started. “You know I would add new entries to the system and then do a rough estaimate on how long… how many page reloads… until I should see it, right? But my math never really matched reality. An entry would either appear far too frequently or.. the other way around.”
“But isn’t that a case for randomness?” Gull smirked. “Doesn’t the lack of predictability lend ot the arguement that the system is random?”
“I don’t know.” I shrug. “But the point of the story is not how random those generators really are, but only that it got me thinking about how one might measure the randomness of a system.”
“This is leading somewhere, isn’t it?”
I nod, grinning. “So, last week I write a little script and plug it into the footer of one of my well-trafficked websites. That site gets about a hundred hits per day from all over the place. The script is fairly innocuous. It uses a few cycles of server processing power to generate a timestamp on every load of the page. The script then takes that timestamp, bites off the least significant digits at the tail end — the microseconds, or something — and spits out a short string of zeros and ones. Those zeros and ones are the binary representation of three numbers it’s clipped off the time. And then that little binary number is appended to a little file I’ve got stuffed away in a nearby directory. It all happens in the blink of an eye and every time the page is loaded.”
“For what purpose?” Gull furrows her brow.
“It’s noise. It’s meaningless numbers generated by the clicks and clacks of humans.” I say. “And it should be random… theoretically. Well, here’s an example of the output.” I call up the text file in the browser and copy a few dozen characters into a local word processor.”
11011010 11001100 11011111 01111001 11001100 00111001 10011111 01100101 00011101 10101100 11001100 00001110 00100000 11100001 01110110 10000000
“This is a bit of sample output from the Noise Collector, as I’ll call it.” I say. “I’ve broken it it into, let’s say arbitrary, eight-bit chunks.”
“Noise Collector? Sure.” Gull smirks. “Now what?”
Well, the trick is to see how numbers start appearing statistically in this data. But eight bit chunks becomes rather cumbersome for this kind of small sample size. A sample spread like that does have more meaning, but one starts looking at 256 data points and that gets complex for an early bit of work. I mean if I could collect ten thousand chunks of that size, well, maybe… but that’s step six or seven. Let’s call this step two.”
“What about step one?”
“Right. Well step one was a quick analysis of the distribution of zeros and ones. I collected about five thousand zeros and ones and found that the distribution was roughly fifty-fifty.”
“Is that good?” Gull asks.
“I don’t know. But it seems logical that in a random spread of data the distribution should be evenly split.”
“Okay.” Gull smiles. “So… in step two you gathered what again?”
“Oh. Well. I used the same data but I broke it into two bit chunks. So the data looks more like this…” I add some spaces to the data in the word processor.
11 01 10 10 11 00 11 00 11 01 11 11 01 11 10 01 11 00 11 00 00 11 10 01 10 01 11 11 01 10 01 01 00 01 11 01 10 10 11 00 11 00 11 00 00 00 11 10 00 10 00 00 11 10 00 01 01 11 01 10 10 00 00 00
“The result here is that we essentially get four options for randomized distribution… and I might add, the very first puzzling result I encountered.”
“So, essentially what I’ve done is I’ve created four options when one converts the binary to decimal.” I type:
00 equals 0
01 equals 1
10 equals 2
11 equals 3
“…and, if the distrubution holds true, what would you expect to see?” I ask.
Gull thinks for a moment and then says matter-of-factly. “One quarter across the board, I guess. Twenty-five percent for each, given the proper sample size.”
“I woud have argued that as well. And maybe there is something quirky or strange going on that I have yet to figure out, but I’ve done the stats on the whole set of about twenty-five hundred points as well as parcelled out sub-sets of that same data. I don’t get 25 percent all around. I get this.” I type again.
00 = 26% frequency
01 = 26% frequency
10 = 26% frequency
11 = 21% frequency
“That doesn’t make sense.” Gull furrows her brow at the screen. “What now?”
“I guess I have some more work to do.” I shrug.