A deck of cards can look thoroughly scrambled while still remembering where it came from. That is the unsettling premise behind one of probability’s most famous party facts: riffle a standard deck seven times, and only then does it become “random.”
Seven is memorable. It is also easy to misunderstand.
The number comes from a 1992 paper by mathematicians Dave Bayer and Persi Diaconis, wonderfully titled “Trailing the Dovetail Shuffle to Its Lair.” Their work did not discover a mystical property of the seventh shuffle. It analyzed a precise mathematical model, chose a precise way to measure disorder, and found that a 52-card deck crosses a remarkably steep threshold.
The shuffle in question is the familiar riffle. Split the deck into two packets, then let cards from the packets interleave. The model, usually called Gilbert–Shannon–Reeds, makes that hand motion exact. The cut is likely to land near the middle, though not necessarily at 26 cards. As the packets fall together, the chance that the next card comes from either packet is proportional to how many cards remain in it.
That last detail matters. The model is meant to resemble a competent, imperfect human riffle—not a machine that alternates left, right, left, right with suspicious neatness. It turns a physical gesture into probabilities that can be calculated.
After one such shuffle, the deck is far from uniform. Its original order has been broken into no more than two rising sequences: cards that still appear in their previous relative order, now woven together. Shuffle again and the possible structure expands. Repeated riffles multiply the ways those old sequences can be interleaved.
Bayer and Diaconis compared the resulting distribution with the uniform distribution, the imaginary ideal in which every one of the deck’s 52! arrangements is equally likely. Their yardstick was total variation distance. In practical terms, it asks how well an observer, given the best possible test, could distinguish shuffled decks from perfectly uniform ones.
The change is not gentle. Under this model, five riffles leave the distribution very far from uniform. At seven riffles, the total variation distance drops to about 0.334. At eight it falls further. The paper describes a “cutoff”: for a deck of this size, the transition from conspicuously structured to much more mixed occurs across a narrow band rather than fading at a leisurely pace.
That sharp bend is the real story. “Seven” survives because it gives the bend a convenient address.
But 0.334 is not zero, and “random” is not a single universal substance that a deck either contains or lacks. Another measure can ask a different question. In 2000, Lloyd N. Trefethen and Lloyd M. Trefethen examined riffle shuffling through relative entropy, which tracks how much information about the original order remains. That information declines on a different schedule. A deck can be acceptably mixed for one purpose and still retain detectable structure by another standard.
The model also assumes the shuffler behaves like the model. A perfect faro shuffle—an exact one-for-one interleaving—is a marvel of control, but it is not random at all. Perform one type of perfect faro eight times on a 52-card deck and the deck returns to its starting order. At the other end of the skill spectrum, a timid riffle that drops large clumps may mix less effectively than the model predicts.
So seven riffles is not an all-purpose commandment. It is a result about repeated, reasonably executed riffle shuffles, judged by total variation distance. Change the shuffle, the deck size, the starting assumptions, or the definition of “close enough,” and the answer can change.
This is not a flaw in the mathematics. It is the useful part.
Randomness in ordinary speech means something like “I cannot see a pattern.” Mathematics is less easily satisfied. It asks which outcomes are possible, how likely each one is, and what evidence could expose the difference. A deck may defeat the eye long before it defeats the best statistical test imaginable.
There is a practical lesson hiding in that distinction. If a friendly card game needs a fair start, several solid riffles are vastly better than a theatrical cut or a few overhand drops. If serious money is involved, procedure matters more: casinos use controlled shuffling practices and often machines because repeatability, security, and resistance to manipulation matter alongside mathematical mixing.
The seven-shuffle result endures because it converts an enormous number—52 factorial—into something the hands can do at a table. Yet its deeper charm is not that mathematics issued a magic number. It is that a commonplace flutter of cardboard has enough structure to be measured, enough disorder to arrive suddenly, and enough memory to remind us that “looks mixed” is not the same as “has forgotten.”