What Is a Random Number, Really?
How random is random?
First up, If you’d like to support our equipment fundraiser, you’ll find the link here. And now, today’s post!
Your computer lies to you constantly, and mostly you are grateful for it. One of its most persistent, necessary, and surprisingly deep deceptions concerns randomness. Every time a piece of software generates a “random” number say to shuffle a playlist, deal a hand of cards, or secure a password is almost certainly not doing anything random at all. It is following a recipe. A very long, very complicated, carefully designed recipe, but a recipe nonetheless.
These are called pseudorandom number generators, and understanding why they exist, and why they are not the same thing as true randomness, opens up questions that go all the way down to the foundations of physics.
A random number generator needs to produce a sequence of numbers that is, for most practical purposes, unpredictable. The most common algorithms do this by starting with a seed, a single number, and then running it through a deterministic mathematical function over and over, producing a sequence that looks chaotic but is entirely determined by that initial seed. Use the same seed, get the same sequence, every time. This is enormously useful for reproducibility in science, where you might want to rerun a simulation with the same “random” inputs. It is considerably less useful if you need randomness for cryptography, where a predictable sequence is essentially an open door.
The Mersenne Twister, developed in 1997, remains one of the most widely used algorithms of this type. It has a period of 2^19937 − 1, which means it produces more than 4 million digits worth of numbers before it repeats. For most uses such as simulations, games, statistical sampling, this is more than adequate. For cryptography, it is known to be unsuitable.
But what actually is a random number? Mathematically, a sequence is considered random if it passes a battery of statistical tests. The numbers should be uniformly distributed, there should be no detectable auto correlation between consecutive values, no patterns exploitable by compression algorithms, and so on. A sequence can pass all of these tests and still have been generated by a completely deterministic process. In this sense, “random” is a property of how a sequence looks and behaves, not of how it was produced.
Philosophically, this runs into the hard question of whether true randomness exists at all. In classical physics, the answer is arguably no. Given the complete state of a system, classical mechanics determines its future evolution with perfect precision. A coin flip is not truly random. It is determined by the initial angular velocity of the coin, the air currents in the room, and the surface properties of the table. We call it random because we cannot track all those variables.
Quantum mechanics changes this. The collapse of a wave function, as best we understand it, is genuinely irreducibly random. When a radioactive atom decays, or when a photon hits a beam splitter and either passes through or reflects, there is, according to standard quantum theory, no prior fact of the matter about which outcome will occur. This is not ignorance of hidden variables. Bell’s theorem, and the experiments testing it, have made the hidden-variable loophole extraordinarily small. The randomness appears to be fundamental.
This has given rise to quantum random number generators, devices that use physical quantum processes to produce genuinely random bits. Some use the timing of radioactive decay events. Others use the shot noise in a laser. Some use vacuum fluctuations in a photonic system. All of them harvest the irreducible unpredictability of quantum mechanics to produce bit streams that, unlike pseudorandom sequences, cannot be reproduced from any seed, because there is no seed and the outcome simply was not determined before it occurred.
These devices are increasingly commercially available, and they feed into cryptographic systems that require true randomness. Key generation for encryption, randomized trials in clinical research, and lotteries where auditability matters. There is something philosophically vertiginous about this. We are using the most fundamental randomness in the universe to shuffle a deck of cards or generate a password.
The practical world sits somewhere in the middle. Modern operating systems collect entropy, genuine unpredictability, from sources like keyboard timing, mouse movement, network packet arrival times, and hardware noise. This is pooled into a randomness reservoir that feeds a cryptographically secure pseudorandom generator. You end up with something seeded by real-world chaos and stretched by mathematics, which is good enough for almost everything and provides no exploitable pattern to an attacker.
There is a famous story, possibly apocryphal, about a man who won a lottery multiple times by noticing that the scratch-card printer at one particular shop was using a broken pseudorandom generator and had begun cycling through a finite set of outcomes. He could not predict the next number, but he could identify the pattern. This is what a broken random number generator looks like in the wild. i.e. Not obvious nonsense, but subtle, exploitable structure hiding inside apparent chaos.
What we really want from randomness, when we think about it, is unpredictability, that is, the guarantee that no one, working from any available information, can do better than chance at predicting the next output. Pseudo randomness is predictable in principle but not in practice. Quantum randomness is unpredictable in principle. The difference matters enormously in cryptography, rather less so in a game of dice.
For most of us, most of the time, the lie is fine. The shuffled playlist is not truly random, but you will never notice. The deeper question, whether anything in the universe is truly random, or whether quantum mechanics is itself hiding a deeper layer of determinism remains one of the most uncomfortable open questions in physics. We do not know. And perhaps that uncertainty is itself, appropriately, random.
That’s all for now! If you like my efforts to make quantum science, computing and physical chemistry, more accessible to everyone; please consider recommending this newsletter on your own substack or website. Or share ExoArtDataPulse with a friend or colleague. Every recommend makes the project grow. Thanks for Reading!



