# In a shuffled deck, are the probabilities of finding one pair of cards and a second pair of cards independent events?

This question caused a massive fight in a number theory class I was in a few years ago. Class was split, and no one changed their opinion. Curious if it is obvious to outsiders, or if anyone can offer any proof.

Course was split with most poker and blackjack players arguing these are dependent events, with most others claiming they were independent and you could simulate relevant events with an infinite deck.

Take a standard deck with no jokers. 52 cards. Four aces, four deuces, four threes, and so on. Shuffle the deck. Draw cards until you spot a match, ie, a card with the same numerical value as the last card drawn. Does drawing such a match affect the odds of drawing a subsequent match later in the deck?

Clarifying note: I call a match a "pair" in the title, but "match" is more precise. Drawing three in a row counts as two matches, but most people would not call that two pairs.

• Question is not clear. If you get 1/2 though the deck then certainly there is less chance of match later in the deck as less chances for a match. Oct 29 '18 at 20:01
• If you're about to draw some card, does the fact you had two in a row anytime earlier affect the likelihood you will get two in a row on this very draw, across all the possible locations in the deck. If you drew 3, 2, 5, 6, what are the odds the fifth and sixth cards will match, compared to if you drew 2, 2, 5, 6? If you've drawn none of that value, there are 6 possible matches. So for the first case, there are 9 * 6 = 54 possible matches from 48*47 = 2256 possible pairs drawn. If you've drawn one of that value, there remain three possible matches. So 66 / 2256 chance in the first case. Oct 31 '18 at 23:03
• In the second case, there's a double drawn, so only one possibility of a match. So there are 10 * 6 + 1 = 61 possible matches in the fifth and sixth position out of 2256 possible pairs drawn. These appear to be dependent events -- seeing an earlier pair, vs seeing no earlier pairs -- that will affect the likelihood of seeing a new pair. Oct 31 '18 at 23:04
• The question seems ill-defined. Of course one cannot find a second match unless one has found a first match, so those events are not independent; but I don't think that's what you meant. If the instructions were to draw $20$ cards, you could ask if the chance of a match on the next $32$ draws was dependent on whether the $20$th card matched the one before. But in the question as asked, when you speak of how drawing the first match affects the odds of a subsequent match, my question is: "It affects the odds compared to what?" Nov 3 '18 at 21:33
• It's certainly not obviously independent. Consider a much simpler deck of four cards: two aces, two deuces. If there's a match in the first two cards, then there will obviously be a match in the rest of the deck; if there's no match in the first two cards, then there is only a one-half probability of a match in the rest of the deck. It might be that a full deck would exhibit statistical independence, but based on this simple thought experiment, it seems rather unlikely. Nov 27 '18 at 2:44

Obviously, since you are drawing cards in a sequence, the probability of a second match is dependent on whether a match was drawn beforehand, especially since the three-in-a row scenario can happen immediately after a match.

Suppose the first two cards form a match of two aces. Then the third card could well be an ace, forming a second match that could not have occurred if the first two cards were different. Thus the probability that the second match happens on the third card depends on whether a match was made at the second card.

• @Brownbat Yes. The probabilities of making a match with cards of the same rank as one of those first two cards are changed very subtly. Oct 29 '18 at 2:53
• I'm not sure I wrote the question clearly. If your first two cards were KA, you could also draw an Ace, providing a match in the remainder of the deck. The chances of that second Ace are greater because there are three remaining Aces in the deck. However the chance of matching Kings later in the deck are lower, because you have an isolated King. The question is more nuanced than it appears on first glance... Oct 29 '18 at 2:55
• @Brownbat They are still different. That is all that matters. Oct 29 '18 at 2:57
• It wouldn't matter if the differences ultimately washed out against each other. I suspect they are dependent like you do, but the other side generally didn't accept my assertions. Kept insisting that the probability of the second to last card matching the final card was still 3/51, regardless of what happened before. Oct 29 '18 at 3:07
• The stated question is if a pair showed. Recording the king is not allowed. Again the question is not complete. Oct 29 '18 at 20:53

This is an attempt to address (not necessarily completely answer) the following version of the question provided in a comment: "Is the probability of drawing a card that matches the most recent card drawn dependent upon whether or not you have drawn any previous match?"

I used a python script to count all the permutations of a deck of four aces, four twos, and four threes. I defined two events over these permutations: $$A,$$ whether any of the first three cards was followed by a matching card, and $$B,$$ whether the fourth card was followed by a matching card. I counted the occurrences of each of the four possible outcomes of $$A$$ and $$B$$ occurring or not occurring.

I found that $$P(A\cap B)\approx 0.1696969696969697$$ while $$P(A)P(B) \approx 0.17355371900826444.$$ For a deck with just three ranks, then, in at least one point during the deal, the two events (a prior match and matching the next card) are not independent.

I don't think it's practical to do such a computation for a deck of $$13$$ ranks, and I doubt the difference between the probabilities in that case is large enough to detect with a reasonable number of random samples, so if a smaller-scale demonstration is not sufficient I don't have any great ideas.

• The answer I've just posted addresses this version for a 4-card deck—even that turns out to be less simple than you'd expect. (Unless I've complicated it by my approach.) Dec 2 '18 at 16:56
• @timtfj I was concerned that a 4-card deck would be too simple to convince the non-card-players. Coincidentally, my first attempt was an eight-card deck, AA223344; I tested whether a match between the fourth and fifth cards was independent of earlier matches, and found out that it is independent. That was disconcerting. But it turns out to be a relatively rare phenomenon. Dec 2 '18 at 21:20
• That's interesting. From the 4-card deck it looks as though the effect might reverse once you've drawn half the cards—or at least have some kind of symmetry between ($k$ cards drawn) and ($n-k$ cards drawn) with $n$ being the deck size. Dec 2 '18 at 21:29

[edit: This considers the probability of the next card matching, rather than of there being another match to be found, but might still be a good starting point. Also I've assumed the first match can occur anywhere, not just in the latest two cards drawn.]

I think the answers so far consider too many cards to get a clear picture.

Let's consider a deck of just four cards—two of one value and two of another. Let's call them AABB.

If you've drawn one card, you haven't got a match yet. The remaining cards comprise one that matches the one drawn and two that don't: so theres a $$\frac{1}{3}$$ chance of the next card matching.

Suppose you've drawn two cards and got a match. If you drew AA then the entire sequence has to be AABB, and if you drew BB then it has to be BBAA. So the third card can't match the second. If on the other hand you drew AB or BA, there's one card of each value left and a $$50\%$$ chance that you draw the matching one.

If you've drawn three cards, you've drawn two of one value and one of the other. If you didn't get a mstch, you drew either ABA or BAB, and the remaining one can't match: the full sequence is ABAB or BABA.

If you did get a match, the non-matching card was drawn either first (ABB or BAA) or last (AAB or BBA), with equal probability. If it came first, the final card doesn't make a second match (ABBA or BAAB). If it came last, the final card does make a match (AABB or BBAA). So if there's been a match there's a $$50\%$$ chance of another one.

So if we know how many cards have been drawn from this reduced deck, the probability of the next one matching is

• After 1 card: always $$\frac{1}{3}$$ but you've not had a match yet.
• After 2 cards: $$0$$ if you've had a match and $$\frac{1}{2}$$ if you haven't.
• After 3 cards: $$\frac{1}{2}$$ if you've had a match and 0 if you haven't.

So for this 4-card deck, the probability of the next card matching is affected by whether there's already been a match, but whether the first match helps or hinders the second depends on how many cards you've drawn.

If we don't know how many cards have been drawn, then the question is: what do we mean by the probability of the next card matching? There are at least 4 different interpretations and at first sight they'll give different answers:

1. We can consider all possible sequences of cards drawn so far as equally probable (when identical-valued cards are considered to be distinct).
2. As (1), but discarding the cases which use all cards or only one.
3. We can consider it equally probable that we've drawn 1, 2 or 3 cards, which will make some sequences more probable than others.
4. As (3), but discarding the cases where we've drawn just one card.

I'll leave it to someone else to decide which of these is appropriate and what answer it leads to.