A shuffled deck of cards is meant to be random. Scientific analyses show that it actually isn't random, and you can capitalize on known probabilities of card distributions to perform an amazing card trick for people you have never met.
Imagine you receive a thick, mysterious envelope in the mail. Rather than having it disposed of by the nearest domestic security officers, you open it and find an ordinary deck of cards and the following set of instructions:
You follow all these instructions (while wearing protective rubber gloves) and return the deck. About a week later, a smaller envelope arrives. In it is your chosen card! (There also might be a request for $300 and an offer to predict your future, but you just throw the offer away.)
Amazing, yes? Impossible, you say? Thanks to the known likely distribution of shuffled cards, it is more than possible, and even a budding statistician like you can do it. No enrollment in Hogwarts necessary.
How It Works
Quite a bit is known, mathematically, about the effects of various types of shuffles on a deck of cards. Though a thorough shuffle (such as a dovetail or riffle shuffle, which interlaces two halves of the deck) is meant to really scramble up a deck from whatever order the cards were in to some new order that's quite different from the original, parts of the original sequence of cards remain even after several cuts and shuffles.
Statisticians have analyzed these patterns and published them in scientific journals. The work is similar to that which resulted in the groundbreaking suggestion that one should shuffle a deck of cards exactly seven times to attain the best mix before dealing the next round of hands for poker, spades, or bridge.
Picture a deck of cards in some order. After one shuffle, if the shuffle is perfect, the original order would still be visible within the now supposedly mixed distribution of cards. In fact, there would be two original sequences now overlapping each other, and by taking the alternate cards, you could reconstruct the original overall order.
Table 5-5 shows a deck of cards before and after a perfect shuffle. Just 12 are shown for efficiency's sake, but these principles all apply to a full 52-card deck.
If you knew the starting order of these 12 cards, you could pick it out fairly easily by just looking at every other card in the new grouping. These subpatterns are characterized as rising sequences: the cards rise in value as you move along the sequence. If cards begin in one long rising sequence (or a group of four, because there are four suits), riffle shuffles will maintain these rising sequences; they will just be interwoven together. These groupings of rising sequences will remain, even after many shuffles.
If at any time during the shuffling and cutting of the deck, a card is taken from the deck and purposefully placed anywhere else in the deck, it will appear "out of place" compared to the overall pattern of rising sequences. This, of course, is exactly what the card trick's instructions demand, and it explains how your mysterious magician (or you when you assume that role) could spot what card has been moved.
For the sequence shown in Table 5-5, imagine that the Ace of Clubs (#1 in the original sequence) was removed from the top of the deck and placed randomly somewhere in the middle of the cards. Let's say it ends up, between the 4 and 10 of Clubs (between #4 and #10 in the new distribution). It would now be permanently out of sequence, and it is unlikely that anymore shuffling would move it back to where it belongs.
Of course, realistic analytic work about what happens to playing cards in the hands of real-life people must take into account that people are human and make human errors. As the philosophers say, "To shuffle badly is human." Some cards that should have been separated by exactly one card in a perfect riffle shuffle might, unpredictably, be separated by two cards or might be adjacent to each other and not separated at all. Table 5-6 shows one possible outcome of a more human, less perfect, shuffle.
This randomness in how a person will actually shuffle the cards creates both a dilemma and an opportunity. The dilemma is that correctly identifying which card is out of sequence is now not certain, because the sequences cannot be perfectly reconstructed and the magician must rely a bit on probabilities, which adds some risk to the trick.
The opportunity comes when the subject of the trick realizes that you could not possibly count on the execution of perfect shuffles. When you identify the chosen card anyway, in the midst of this random uncertainty, the bewilderment will be even greater.
Probability of Success
Because the exact nature of the scrambling of the deck cannot be known, the magician can identify a card as out of sequence only because the shuffles were less than perfect. Also, the trick is much more likely to be successful (only one card is out of sequence) if the instructions do not allow anymore cutting or shuffling after the card is taken from the top of the deck and placed in the middle.
Statisticians from Columbia and Harvard University, Dave Bayer and Persi Diaconis, have conducted a mathematical exploration of the possible outcomes of a deck of cards shuffled and mixed in the ways described for this magic trick. (Presumably, the faculty at these institutions has a lot of free time on its hands?) They developed a mathematical formula for identifying the one card out of place and ran a million computer simulations to test the accuracy of guesses by their cyber-sorcerer as to the chosen card. Their analysis assumed perfect dovetail shuffles. They found that with only a couple of shuffles, the trick works pretty well, but the odds of success decrease quickly as more shuffles are allowed.
Table 5-7 shows the probability of success for a 52-card deck shuffled different numbers of times. It also shows the chances that the correct card would be chosen if more than one guess were allowed.
Of course, the odds go down slightly when one takes into account random errors in real-world shuffling, but the relative success rate would still be as Table 5-7 indicates. If you perform the trick as describedone guess, after three shufflesthe guess should be correct around 80 percent of the time (lowering the 83.9 percent estimate somewhat arbitrarily to take into account bad shufflers).
To play it safe, you might do the trick with at least three people. Then, assuming 80 percent likelihood for each person, the chances that you will amaze at least one of those three people increases to 98.4 percent, which is almost a certainty. If you are wrong on all three, just never speak or write to those people again, close your post office box, and concentrate on more important things in life. After all, with hard work, you might get into Columbia or Harvard someday and do really important things.