The boy who left
Persi Diaconis was born in New York on 31 January 1945, to musician parents who had him on the violin early. At fourteen he left home without telling them, to go on the road with a man called Dai Vernon.
Vernon is not a household name. Among magicians he is close to a deity — the sleight-of-hand technician who spent decades refining what hands can do with a deck while somebody watches. The teenager who attached himself to him was, by all accounts, exceptionally good. They quarrelled and split after about two years. Diaconis stayed on the road anyway, working as a professional magician through his late teens and early twenties.
What eventually pulled him off it was a book.
Card cheats care about probability for professional reasons, and Diaconis kept running into a two-volume work everyone referenced: William Feller's An Introduction to Probability Theory and Its Applications. He bought it. He couldn't read it — not the ideas, the notation; he didn't have the mathematics.
So at twenty-four he went back to school to acquire enough to read the book. Night classes at City College of New York, bachelor's degree in 1971. Then he decided he wanted Harvard.
This is where the story does something unlikely. Diaconis knew Martin Gardner, who wrote the Mathematical Games column in Scientific American and who happened to know that a Harvard statistics professor named Frederick Mosteller was a serious amateur magician. Gardner wrote to Mosteller. The letter did not discuss the applicant's grades. It said that this young man had the best bottom deal and second deal Gardner had ever seen — the two hardest ways to deal a card from somewhere other than the top of the deck without anyone noticing.
He got in. PhD in mathematical statistics, 1974, with Mosteller as his advisor. A MacArthur "genius" grant in 1982. He is now the Mary V. Sunseri Professor of Statistics and Mathematics at Stanford, and he has spent the intervening half-century pointing the mathematics back at the things he learned first: cards, coins, dice, the mechanics of chance as actually practised by human hands.
A question that sounds trivial
How many times do you have to shuffle a deck of cards before it's properly mixed?
Most people answer three. Casino dealers, who do this professionally, commonly do three or four. Five feels fussy. Nobody has an argument for any of these numbers; it's the point at which the cards stop looking like they were in order.
The first thing to establish is what you're up against. A deck of 52 cards has 52 factorial possible arrangements — 52 × 51 × 50 and so on down to 1. That number is roughly 8.07 × 1067. It is a number without a useful comparison. There are on the order of 1067 atoms in our galaxy. Every deck you have ever shuffled properly was, in all likelihood, in an order no deck has ever been in before or will be again.
"Properly mixed" means that all 8.07 × 1067 of those orders are about equally likely. The question is how many shuffles it takes to get there — and to answer it you first need a mathematical description of what a human hand actually does to a deck.
That model already existed. It's called Gilbert–Shannon–Reeds, after the three researchers who built it, and it describes the riffle shuffle: cut the deck into two roughly equal packets, then let the two packets fall together in an interleaved stream, a few cards at a time from one side, a few from the other, not alternating neatly. Crucially, GSR isn't an idealisation: tested against real people shuffling real cards, it fits well. It describes the sloppy thing your hands actually do.
The answer, and the thing hiding behind it
In 1992, Diaconis and the mathematician Dave Bayer published a paper in the Annals of Applied Probability with one of the better titles in the literature: "Trailing the Dovetail Shuffle to Its Lair." (Vernon, his old teacher, died that same year.)
Their result is the one that escaped into general circulation: seven shuffles. For a 52-card deck, seven riffle shuffles get you essentially all the way to random, and further shuffling adds very little.
But the famous number is the less interesting half. The interesting half is the shape of the approach.
You need one piece of vocabulary. To say how far a half-shuffled deck is from random, you measure the gap between the actual distribution of arrangements and the perfectly uniform one. The standard yardstick is called total variation distance. It runs from 1 (completely predictable) to 0 (indistinguishable from random). Think of it as: the best possible advantage a well-informed opponent could have over you.
Here is what Bayer and Diaconis computed for a 52-card deck, shuffle by shuffle:
1 shuffle: 1.000. 2: 1.000. 3: 1.000. 4: 1.000. 5: 0.924. 6: 0.614. 7: 0.334. 8: 0.167. 9: 0.085. 10: 0.043.
Read that sequence again, because it is genuinely strange.
For the first four shuffles, nothing happens. Not "not much" — nothing measurable. The deck after four riffle shuffles is, by this yardstick, as far from random as a deck fresh out of the box. Then between five and eight the number falls off a wall, halving with every shuffle. Then it flattens out into a long tail where each additional shuffle buys you almost nothing.
All the randomness arrives in about three shuffles. It arrives late, and it arrives suddenly.
Why it happens all at once
This abruptness has a name — the cutoff phenomenon — and finding it in card shuffling was part of a much larger discovery. Diaconis and Mehrdad Shahshahani had identified the same behaviour in a different mixing process (repeatedly picking two cards at random and swapping them, which takes about ½·n·log n swaps for n cards). It turns out to be everywhere: a large class of random processes don't drift gradually towards randomness at all. They stay ordered, stay ordered, stay ordered, and then collapse into randomness inside a narrow window.
The intuition for why is easier than the proof. A riffle shuffle roughly doubles the number of interleaved runs in the deck — after k shuffles the deck is carved into something like 2k ascending sequences. As long as the number of runs is well under 52, long stretches of the original order are still sitting there intact, and someone who knew the starting order could exploit them. The deck only runs out of structure when 2k outgrows the deck — and because the runs double each time, that condition goes from comfortably false to comfortably true in the space of two or three shuffles. Bayer and Diaconis's general formula, (3/2)·log₂n, is just that crossing point written properly. For n = 52 it gives a shade under 8.6; seven is where the distance first drops meaningfully below a half.
The practical version: three shuffles is not a slightly worse version of seven. It is a completely unshuffled deck with the evidence hidden.
Except it isn't seven
Here is where the story gets better, because the famous number is contested and the argument is more interesting than the answer.
In 2000, two mathematicians named Trefethen — Lloyd N. and Lloyd M., father and son — published a paper in the Proceedings of the Royal Society with the deliberately plain title "How many shuffles to randomize a deck of cards?" Their objection was not to the arithmetic. It was to the yardstick.
Total variation distance is a demanding measure: it asks whether any conceivable test could distinguish your deck from a random one. That's the right standard if your opponent knows the starting order and is allowed to be arbitrarily clever. The Trefethens asked what happens if you instead measure randomness the way information theory does — how much of the original information about the deck's order is still recoverable.
By that measure the answer is log₂n rather than (3/2)·log₂n. For 52 cards that's about 5.7 — call it six. They calculated that roughly 3.5% of the original information survives five shuffles, and under 1% survives six. And in this measure there is no cutoff at all: the information just bleeds out steadily, shuffle after shuffle. The cliff is a property of the ruler, not of the cards.
Both results are correct. They are answers to different questions, and the entire disagreement lives upstream of any calculation, in what you decided "random" meant before you started.
It gets worse, or better. Under a stricter standard called separation distance the answer is eleven. Diaconis has also worked out the game-specific versions, which are the ones that matter at a table: two decks need about nine shuffles, six decks about twelve. Casinos running six-deck shoe games and shuffling three or four times are not close.
And the mathematics is still moving. Bayer and Diaconis's proof assumed you cut the deck into two nicely balanced halves — a constraint real hands don't respect. In June 2026, three mathematicians — Mark Sellke at Harvard, with Jialu Shi at Cambridge and Jiamin Wang at Princeton — extended the cutoff result to shuffles where the cut is genuinely lopsided. Thirty-four years to make the theorem apply to the way people actually shuffle.
The machine that got it wrong
None of this would matter much if the industry with money on the table had solved it. It hasn't.
A gaming company building a new automatic shuffling machine did the responsible thing: it hired Diaconis and his Stanford colleague Susan Holmes to test the prototype before deployment. The machine tumbled cards into a bank of shelves and reassembled them — mechanically convincing, visually random.
They took it apart mathematically and found that the output still carried the fingerprint of the input: recognisable rising and falling sequences, meaning the order wasn't scrambled so much as rearranged in a describable way. Working from that, they could correctly call nine or ten cards in every deck — about one in five — which is enough to double or triple the edge of a competent card counter. The machine was worse than useless; it was a liability wearing the costume of a safeguard.
The company's response is the part worth keeping. They wrote back: "We are not pleased with your conclusions, but we believe them" — and added that believing them was what they'd paid for. The prototype was quietly shelved.
The coin is no better
While we're dismantling things: the coin flip isn't fair either.
In 2007 Diaconis, Holmes and Richard Montgomery worked out the physics of an actual tossed coin, using high-speed photography. A real flip doesn't spin about a clean axis — it precesses, wobbling like a badly thrown frisbee, and the wobble means the coin spends slightly more of its flight with the starting face upward. Their prediction: a coin lands on the same face it started on about 51% of the time. Not a manufacturing bias in the coin — the coin is fine. A bias in the throw.
For fifteen years that sat as an elegant piece of theory nobody had properly tested. Then in 2023 a team recruited volunteers and flipped coins 350,757 times. The same-side result came in at 0.508, with a 95% confidence interval of 0.506 to 0.509 — a prediction made from first principles, confirmed to the third decimal place. They also found that the size of the bias varies noticeably from person to person, which is its own small unsettling fact.
It is not enough to matter at a coin toss. It is more than enough to matter if you are running a randomised trial and assigning patients by flipping something.
The thing he still can't solve
The last piece is the one Diaconis seems most attached to, and it is unfinished.
Children, and quite a lot of adults, don't riffle at all. They spread the cards face-down on the table and stir them around with both hands for a while. Diaconis calls it smooshing. It is probably the most common shuffling method on Earth and there is, essentially, no theory for it: a continuous physical mixing process rather than a tidy sequence of discrete steps, and the mathematics that handles riffles doesn't reach it.
So he did what he'd have done in 1965: he ran the experiment. Stanford students smooshed decks for fifteen seconds, thirty seconds and a full minute, a hundred trials at each duration, and the resulting orders were tested for structure. Fifteen seconds came back clearly unrandom. Somewhere past that, the structure goes. He suspects smooshing has a cutoff too — a specific moment where the deck tips — and that it can be proved. Nobody has.
There is a pleasing symmetry in it. The man who learned cards in order to cheat at them has spent fifty years proving how much the rest of us unknowingly cheat ourselves — three shuffles, a coin toss, a machine we trusted because it whirred. The answer keeps coming back the same: you have less randomness than you think, you get it later than you think, and then you get all of it at once.