## Cards with Mathematics

I’m a sucker for a good card game. Or even a bad card game, if it’s played in the company of good friends. Or even a bad card game played in the company of poor friends, as long as the food is decent.

Because of this relatively low bar, I’ve played a variety of card games. And some of these games have sparked interesting mathematical questions. If you’ve taken a probability course, for instance, you may have explored the intersection of cards and mathematics a bit. Maybe you had to calculate the probability of being dealt a full house in poker, or of busting in a game of blackjack.

But mathematics exists even in card games that don’t typically come up in math class. And just because a deck of cards doesn’t have any numbers on it, that doesn’t mean it should be exiled into the realm of the non-mathematical.

To prove this point, consider *Cards Against Humanity* (or, if you’d prefer, its more family-friendly predecessor: *Apples to Apples*). In order to understand the rules of the game, let’s work through a practice round together.

To play the game, each player starts with a certain number of white cards. Each round, one player (dubbed the Grand Czar, a role that rotates from round to round) takes a black card from the deck and turns it over. Here’s an example; click on the card below to flip it:

Once the black card has been revealed, players try to find the white card in their hand that they think pairs best with the Czar’s black card. Once all players have submitted their responses, the white cards are shuffled and the Czar decides which response he or she likes best. The winner receives the black card (so that people can keep track of how many rounds they’ve won), and the game proceeds to the next round. After players make their selection, they draw from a deck of white cards to ensure that every player has the same number of cards in his or her hand at all times.

To keep things simple, suppose you have three cards in your hand. In response to the prompt above, which one would you choose? (Remember: click to flip!)

Any one of these options would make for a suitable response to the prompt. However, anyone who has played this game for a few rounds will notice the following phenomenon: sometimes, the card you draw for the next round seems like it would’ve been a *perfect* fit for the round that just occurred!

For instance, suppose you decide to play the “Shiny objects” card in response to “What’s the next Happy Meal toy?” This is a totally reasonable maneuver. Not the most inspired response, but sometimes none of the cards you get are a perfect match for the prompt. But then, after submitting your response, suppose you draw the following card for the next round:

Clearly this card is a better fit than any you had in your hand before. Unfortunately, the universe did not smile upon you, and gave you this card after it was needed most.

This happens with enough frequency during a game of *Cards Against Humanity* that the last time I played, I wondered “How likely is this to occur?” Before answering the question, let’s explore it for ourselves in the context of a single round of play. Let’s agree on the following setup:

- There is some fixed number of white cards you’re drawing from, call it
*N*. - You have a fixed number of cards in your hand, call it
*m*. - For each black card, there is some “best match” for that card among the white cards, some “second-best” match, some “third-best match,” and so on. In other words, for each prompt, there is a corresponding ranking of the white cards from best to worst. (Of course, this ranking won’t be absolute, and will depend on the preferences of that round’s Grand Czar.)

In this situation, what’s the likelihood that the card you draw the round would have been a better fit than any of the cards you had during the round?

Here’s a little demo to help you develop an intuition for the problem:

Q.

The number on a card represents its ranking as a best match to the prompt. For example, the card next to the prompt is ranked out of 50.

# of Times new card would’ve been better (Running Tally) | 0 |

# of Trials Total (Running Tally) | 0 |

% of Times New card would’ve been better (Running Percentage) | 0.00% |

Of course, unlike in the demo above, in reality you don’t have any idea what the ranking of cards in your hand is: it will depend on the prompt that’s about to be asked, as well as the personality of the Grand Czar. The rankings are there only to help make specific scenarios a bit more concrete.

If you’ve explored the demo, you may very well have a conjecture for the answer. I’ll leave a proof of the result hidden, but here’s the answer in all its glory:

*m*cards in your hand, the probability that the next card in the deck will be a better fit is 1/(

*m*+ 1).

Before offering up a proof, notice that the likelihood that the next card will be a better fit doesn’t actually depend on the number of cards in the deck. Assuming you don’t know anything about the white cards beforehand, the likelihood that a better card is just outside your reach is the same whether there’s one card in the deck, or 1,000.

To see why, let’s ignore the distinction between the cards in your hand and the card at the top of the deck, and just consider all *m* + 1 cards together. Within this collection, one card will be the best of the bunch; and assuming you know nothing about the whims of the Grand Czar or the next prompt, you can only assume that any one of those *m* + 1 cards is equally likely to be the best.

Returning to our simple example from before, if you have three cards in your hand and are drawing a fourth, their absolute rankings amongst the entire deck don’t matter: it’s only the relative rankings between them that do. Of the four cards, one will be the best match, one will be second best, one will be third best, and one will be the worst. All things being equal, then, with three cards in your hand you have a 25% probability that the next card will be a better fit for the prompt.

The only caveat here is that technically, one could argue that some cards are just objectively worse than others, and so they’ll tend to be worse matches regardless of the prompt. But trying to account for this would needlessly complicate the model. What’s more, you may be dealing with a Grand Czar who has a terrible sense of humor, in which case a card that seems bad to a normal person might be a great fit.

In particular, the official *Cards Against Humanity* rules call for each player to draw 10 cards. Based on this, the probability that a card you draw after any given round would have been a better fit than the cards in your hand is 1/11, or around 9%. In *Apples to Apples*, you’re even more likely to draw a better card after playing, since in that game players have only 7 cards in their hand.

Cool, right? Here are a couple of follow-up questions to consider, if you’re so inclined:

Some prompts require you to play

*two*cards, not one. In this case, you draw an extra card, play two, and then draw one. In this case, what’s the probability that the card you draw at the end would have contributed to a better*pair*of cards?One variant of the

*Cards Against Humanity*is called Rando Cardrissian. Here’s how it works, according to the official rules: “Every round, pick one random White Card from the pile and place it into play. This card belongs to an imaginary player named Rando Cardrissian, and if he wins the game, all players go home in a state of everlasting shame.” If you’re playing with a group of friends, what’s the probability that Rando will win a given round?