News

Two Kinds of Random: Why π Compresses but Noise Doesn't

Statistical entropy and Kolmogorov complexity measure randomness differently — and the gap explains why π is compressible while statistically identical noise is not.

July 6, 2026· 2 min read
Two Kinds of Random: Why π Compresses but Noise Doesn't

Here's a puzzle that looks like a contradiction: two files, each a million digits long, both pass every statistical randomness test and have identical histograms. Yet one can be compressed to a tiny program (π's digits) and the other cannot (pure noise). The answer reveals a fundamental split in how we think about compressibility.

Statistical compression hits a wall

The standard tool is Shannon entropy, which measures how surprising a symbol is on average given its frequency. For a uniform distribution over ten digits, entropy is maximal at about 3.32 bits per digit. Both files are uniform, so entropy says both are incompressible. That's correct for the noise file, but wrong for π — because entropy only looks at frequencies, not at structure. It throws away order.

Entropy is a property of a source, not a single sequence. When you compute it from a sequence's digit counts, you're pretending the digits are independent draws from that distribution. That assumption discards any pattern that spans multiple positions — exactly the pattern π has.

Kolmogorov complexity sees the program

The alternative is Kolmogorov complexity: the length of the shortest program that outputs the string. A billion zeros have tiny complexity; a truly random string has complexity roughly equal to its length. π's complexity is tiny — a short program can generate it. The noise file has complexity equal to its length, because there is no shorter description.

This resolves the puzzle: the two files are statistically identical but algorithmically different. One has a short generating rule; the other does not. The catch is that Kolmogorov complexity is uncomputable — you can never be sure you've found the shortest program. You can confirm compressibility when you find a short program, but you can never rule it out.

So the two kinds of random are: statistical randomness (high entropy, no frequency bias) and algorithmic randomness (high Kolmogorov complexity, no short generating program). They agree on noise, but disagree on π. That disagreement is the whole story.