Here’s a trick question for those who find the Monty Hall Problem too easy.

Suppose you have two five-card poker hands dealt from separate decks. You are told that the first hand contains at least one ace, and that the second hand contains the ace of spades. Which hand is more likely to contain at least one more ace?

(Problem courtesy of the Quantum Pontiff, with the solution found here.)

People’s guesses over at the Quantum Pontiff site typically were that the probabilities would be the same, or that the first hand would be more likely to contain one more ace. Typical reasoning is something like this:

In the first hand, we’re told that it contains an ace, but not which one. So it could be the ace of spades: the answer for the first hand includes the answer for the second, so must be bigger.

Intuitively obvious, but incorrect.

One commentator makes an excellent point:

Here’s my general rule that I also try to get my students to use (especially the pre-med folks I teach in my intro. class).

Rule #1(I have others): Don’t overthink the problem!! Note this is really just a variation on K.I.S.S. (keep it simple, stupid)

[…]

Before asking the question, I try to get my students to learnRule #2:Make sure you ask the right question.

Ask the right question, and you find that the actual answer is the opposite of intuition: the second hand is more likely to contain another ace.

Unintuitive, but if you do the maths, it is absolutely correct. I’m not going to reproduce the maths here — follow the links for it. And remember: this is why ordinary blokes will never beat the casino in the long term: they hire mathematicians to work this stuff out, we try to guess.

If you’re still not convinced, I created a little quick-and-dirty simulation in Python. Here are the results:

`Total of 10000 trials.`

Number of trials where an ace was drawn: 3412

Given there is an ace in the hand, what is the probability of another ace? 0.124853458382

Given there is the Ace of Spades in the hand, what is the probability of another ace? 0.228758169935

Sure enough, the second hand is more likely to contain another ace.

(Note that the probabilities found in that run of the program are not the same as the exact probabilities. The program calculates the probability based on a random sample, not an exact value based on every possible result.)

For those interested in this sort of thing, after the cut I have included the source code of the program so you can play with it yourself.

**Python code:**

from __future__ import division import randomtrials_with_ace = 0 count_with_ace = 0 trials_with_ace_spades = 0 count_with_ace_spades = 0 suits = "HDSC" # Hearts Diamonds Spades Clubs values = "A234567890JQK" # Ace, 2-10, Jack, Queen King aces = ["A"+s for s in suits] assert len(aces) == 4 cards = [v+s for v in values for s in suits] assert len(cards) == 4*13 def draw_hand(): deck = cards[:] random.shuffle(deck) return deck[0:5] def count_aces(hand): """Returns the number of aces in a hand.""" n = 0 for card in aces: if card in hand: n += 1 return n N = 10000 for i in xrange(N): hand = draw_hand() # Does the hand have *any* Ace? n = count_aces(hand) if n > 0: trials_with_ace += 1 if n > 1: count_with_ace += 1 if "AS" in hand: trials_with_ace_spades += 1 if n > 1: count_with_ace_spades += 1 print "Total of %d trials." % N print "Number of trials where an ace was drawn: %d" % trials_with_ace print "Given there is an ace in the hand, what is the probability of another ace?", \ count_with_ace/trials_with_ace print "Given there is the Ace of Spades in the hand, what is the probability of another ace?", \ count_with_ace_spades/trials_with_ace_spades

January 9, 2008 at 2:25 pm

I’m sorry to disagree with everybody here, but at

bestthis is a very poorly-phrased problem and subject to interpretation. Every ace is an ace of something. Here is the same problem rephrased:A dealer deals out a hand, looks at it, and says “one of the cards is the ace of (coughing fit). What is the probability that this hand contains another ace?”

Does the answer change depending on whether you could discern the suit mentioned during the coughing fit?

January 10, 2008 at 9:14 am

Geoffrey, yes the answer does change, because the information you have changes. If you fail to discern the suit, regardless of whether it is known by the dealer, then you have less information and hence have more uncertainty.

January 10, 2008 at 10:25 am

Hi, Vlad–

Unfortunately, you’re wrong. Look at the statement, and think about it some more.

The useful information you have does

notchange if you hear what suit was mentioned during the coughing fit, because there was a 100% probability thatonesuit would be mentioned, and it is not relevant to the question which one it is.Try it again. Here’s the scene. The dealer deals five cards out to himself, face down, and says “I’ll pay five to one odds that there is not at least two aces in that hand. Wanna take the bet?”

You: “No, that’s chump odds.”

Dealer (looks at hand and pulls out one card): “OK, I’ll let you know that there’s at least one ace in the hand. Take the bet now?”

You: “Of course not. Still chump odds.”

Dealer (turns over card, shows it to you. It’s the ace of spaces.): “Wanna take the bet now?”

You: “Sure!”

…or not so sure? Did learning the suit of that ace tell you anything that changed the odds?

January 11, 2008 at 1:53 am

This is a very amusing problem! There are yet different ways of interpreting the question that have yet

differentodds. I looked at the Python script above, and notice that, in fact, it doesn’t actually simulate the question as asked. The question asks abouttwohands, while the simulation looks at single hands individually.To answer the question

as asked, the simulation needs to do the following:(1) deal two (simulated) hands (independently, from two different decks)

(2) examine first hand. If it does not contain an ace, the set up does not correspond to the question; go back to step one and deal another.

(3) examine second hand. If it does not contain an ace, the set up does not correspond to the question; delete all hands and deal another.

(4) examine cards in both hands. If one of these is not the ace of spaces, the set up does not correspond to the question; delete all hands and deal another.

(5) if you’ve gotten this far, you have the set up described in the situation. Add one to both the total number hands tested (“count_trials”).

(6) If the first hand is the one with the ace of spaces, check whether it has a second ace, if so, add one to the number of hands having an ace of spaces that have two or more aces (“count_with_ace_spades”), and go to step (6a). If not, go to step (7).

(6a) If the second hand has two or more aces, add one to the number of hands that have an ace and also have two or more aces (“count_with_ace”). Go back to step 1 and do another hand until you’ve done enough to get statistics.

(7) Since the first hand doesn’t have an ace of spades, the second one must (because you already checked that one of them does.) So if the second hand has two or more aces, add one to count_with_ace_spades.

(7a) Then check if the first hand has two or more aces, and if so add one to the count count_with_ace. (then go back to step one and repeat until you have enough statistics).

Query for the mathematician: the two hands are dealt from

different decks!They must be independent. So why can’t we calculate the odds independently?January 12, 2008 at 7:46 pm

Geoffrey, thanks for commenting.

You ask: “Did learning the suit of that ace tell you anything that changed the odds?”

Yes, it does change the situation significantly. It makes the deal equivalent to pulling the Ace of Spades out of the deck, laying it face up in your hand, and then dealing four cards face down next to it. What’s the probability of drawing at least one ace in the four cards drawn? Remember that there’s only three aces left in the deck.

Where people get confused is that they reason (correctly) that it makes no difference whether the face-up card is the Ace of Spades, or Ace of Hearts, or either of the other two aces. But then they go on to mistakenly conclude that since it doesn’t matter which ace it is, it can’t matter whether you know which ace it is. That makes intuitive sense — but it isn’t correct.

As for your comments about the Python script, it doesn’t really matter whether you have two hands from two decks simultaneously, or two hands sequentially from the same deck PROVIDED that the deck is well-shuffled between drawing each hand. In real life, with real decks of cards, it’s actually very difficult to randomize the deck. But with a computer program, there’s no such difficulty.

Nevertheless, time permitting I’ll re-write the script and see how (if at all) the results change.

January 13, 2008 at 4:04 am

There is a very subtle issue involving the difference between

a priorianda posterioriprobabilities that makes the calculation depend on how the question is phrased. The Quantum pontiff blog stated the problem slightly differently from the way you stated it… and that seemingly insignificant difference in phrasing changes the calculation.