# Odds of correctly guessing the color of a card in a deck

**URL:** <https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508>\
**Category:** Factual Questions\
**Created:** [September 25, 2020, 1:59pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508 "2020-09-25T13:59:09Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![zimaane](https://avatars.discourse-cdn.com/v4/letter/z/a3d4f5/32.png) [@zimaane](https://boards.straightdope.com/u/zimaane)\
**Post date:** [September 25, 2020, 3:41pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/21 "2020-09-25T15:41:47Z")

</div>

If I understand the setup correctly, once you get to the last card, you don’t have to guess at all. If you’ve seen 26 red and 25 black cards, the last card is sure to be black.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [September 25, 2020, 3:43pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/22 "2020-09-25T15:43:11Z")

</div>

One can also write this probability as (26!)2/52!

> [@Ashtura](#):
>
> What I mean is, you remove a card, place it in front of them, they guess, you reveal the card either way and discard it on a discard pile.

That’s identical to the game CardboardBoxx was considering

> [@zimaane](#):
>
> If I understand the setup correctly, once you get to the last card, you don’t have to guess at all. If you’ve seen 26 red and 25 black cards, the last card is sure to be black.

Sure. Your only guess was the precise sequence of colors, but in any case your guess will have a total of 26 reds and 26 blacks

---

<div class="post-metadata">

**Author:** ![Riemann](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/riemann/32/3133_2.png) [@Riemann](https://boards.straightdope.com/u/Riemann)\
**Post date:** [September 25, 2020, 4:11pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/23 "2020-09-25T16:11:13Z")

</div>

> [@CookingWithGas](#):
>
> The reason I didn’t solve the problem exactly as asked is that it I think it depends on what remains in the deck, and also whether you are told what color is drawn each time before you make your next guess. For example, the first card drawn is red, and you are told it was a red card. Now you know there are 26 black cards remaining out of 51, and if you are smart you are going to guess black because the chance of the next card being black is \>0.5. Your chances of being correct on the second draw are 26/51, not 25/51 as in your sequence. The chances of guessing right on the third card are different depending on whether the second card was black or red. The chances of making the right guess on any given draw depend on the proportion of black/red cards, which depends on all of the preceding draws. It seems to me that solving this analytically is a very complex problem.

It actually works out much simpler than you’d think. To clarify here: we’re talking about making a run of correct guesses, where each correctly guessed card is discarded from the deck.

Your first guess is 26/52, 50%.  
For your second guess, it seems optimal to guess the _other_ color for which 26/51 cards still remain.  
For your third guess, it’s 25/50, back to 50%.  
For your fourth guess, again go for the _other_ color for 25/49.  
For your fifth guess, it’s 24/48, back to 50%.

So the odds of a string of correct guesses following this superficially optimum strategy are:  
26/52 \* 26/51 \* 25/50 \* 25/49 \* 24/48…

So the denominator decreases by one each guess, and the numerator decreases by one every _second_ guess, i.e.  
( 26 \* 26 \* 25 \* 25 \* 24…) / ( 52 \* 51 \* 50 \* 49 \* 48…)

Which, when continued for the complete deck, is the expression given already by @DPRK:

> [@DPRK](#):
>
> One can also write this probability as (26!)^2 / 52!

Now consider what happens if you don’t follow this “optimum” strategy.

First guess is 26/52.  
Now suppose we guess the _same_ color again, following a superficially suboptimal strategy. Then the odds are 25/51, slightly worse than 50%.  
Remember that the assumption is that we are correct each time.  
There now remain 26 of one color, and 24 of the other.  
Let’s guess suboptimally again, for odds of 24/50.  
We have now correctly guessed three of the same color in a row, 26 of one color remain and 23 of the other.  
On our fourth guess, we revert to a superficially optimal strategy, and guess the color for which 26 remain. So we have odds of 26/49.  
For our fifth guess, we guess the same again since there are still 25 left of this color for 25/48.

So the odds for this sequence are:  
26/52 \* 25/51 \* 24/50 \* 26/49 \* 25/48…

Which you can see is exactly the same as the odds for the first strategy. You still have two 26’s in the numerator, and two 25’s, just in a different order; and the denominator still decreases by one each guess. Essentially what happens is that if you guess in a superficially suboptimal way at any one guess, and you get lucky, you subsequently slightly improve your odds for later guesses, provided that in the late stages of the game you are not doing anything _completely_ stupid in guessing black when there are no black cards remaining.

So the answer for the “without replacement” problem for correctly guessing an entire deck is always the expression given by @DPRK, whatever strategy you follow.

---

<div class="post-metadata">

**Author:** ![Riemann](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/riemann/32/3133_2.png) [@Riemann](https://boards.straightdope.com/u/Riemann)\
**Post date:** [September 25, 2020, 4:33pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/24 "2020-09-25T16:33:57Z")

</div>

ETA: as you hinted at

> [@CookingWithGas](#):
>
> For this type of problem, sometimes these variations come out in the wash, so that it doesn’t matter what the order is; you get the same answer.

…I think what I laid out above shows why @CardboardBoxx was correct in saying

> [@CardboardBoxx](#):
>
> …As long as you know there are exactly 26 of each, you cannot improve on your chances with new info.

i.e. in the “without replacement” game, if the objective is to guess the entire deck correctly, no guessing strategy based on the information of what cards have already come up (and been guessed correctly) is better than any other, except for the obvious fact that in the end stages of the game if only one color remains in the deck you should “guess” that color.

---

<div class="post-metadata">

**Author:** ![YamatoTwinkie](https://avatars.discourse-cdn.com/v4/letter/y/cc9497/32.png) [@YamatoTwinkie](https://boards.straightdope.com/u/YamatoTwinkie)\
**Post date:** [September 25, 2020, 4:45pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/25 "2020-09-25T16:45:20Z")

</div>

> [@Riemann](#):
>
> except for the obvious fact that in the end stages of the game if only one color remains in the deck you should “guess” that color.

You are forced to do this part automatically, since by the time you get to the last card you’ve already picked 25 of one color correctly, and 26 of the other. You’re not going to plan on picking 27 reds anyway.

---

<div class="post-metadata">

**Author:** ![Riemann](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/riemann/32/3133_2.png) [@Riemann](https://boards.straightdope.com/u/Riemann)\
**Post date:** [September 25, 2020, 4:50pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/26 "2020-09-25T16:50:48Z")

</div>

Yes, good point, since obviously we’re assuming that every pick has been correct. So the statement that you may as well make all your picks beforehand does not need to be modified at all.

---

<div class="post-metadata">

**Author:** ![Ashtura](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ashtura/32/2963_2.png) [@Ashtura](https://boards.straightdope.com/u/Ashtura)\
**Post date:** [September 25, 2020, 5:00pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/27 "2020-09-25T17:00:41Z")

</div>

In case you were wondering, the inspiration for this question is the magic trick “Out of this World”

[![](https://img.youtube.com/vi/TNQrz08OTuA/hqdefault.jpg "Out of This World (World's Greatest Magic)") ](https://www.youtube.com/watch?v=TNQrz08OTuA)

There are many, MANY variations of this trick. Full deck, half deck. All correct. All wrong! Generally the participant guesses red or black, and then all (depending on the variation) of them end up being correct. The participant is not aware they are correct until the end.

Obviously the magician is doing this but I have wondered what it would take for this to happen for real.

---

<div class="post-metadata">

**Author:** ![Ashtura](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ashtura/32/2963_2.png) [@Ashtura](https://boards.straightdope.com/u/Ashtura)\
**Post date:** [September 25, 2020, 5:13pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/28 "2020-09-25T17:13:39Z")

</div>

BTW, the classic variation starts at around 1:35. I don’t know why he threw that triumph in there at the beginning.

---

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [September 25, 2020, 6:09pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/29 "2020-09-25T18:09:53Z")

</div>

> [@Riemann](#):
>
> It actually works out much simpler than you’d think.

Indeed it does and thank you for that cogent explanation. My intuition was telling me that might be the case but I couldn’t figure out how to figure it out. The “aha” moment was seeing that the series of numerators will always be the same and it doesn’t matter what order they are in.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [September 25, 2020, 8:23pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/30 "2020-09-25T20:23:43Z")

</div>

Of course, the chance of perfection isn’t the only interesting calculation to look at. You might instead accept that you’re (probably, almost certainly) no going to get them all right, and just want to get as many right as you can (that is to say, maximize the expected value of the number correct). In this case, knowing what’s coming up as it comes is useful, and your optimal strategy is not constrained to being 26 of each.

---

<div class="post-metadata">

**Author:** ![Riemann](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/riemann/32/3133_2.png) [@Riemann](https://boards.straightdope.com/u/Riemann)\
**Post date:** [September 25, 2020, 9:13pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/31 "2020-09-25T21:13:56Z")

</div>

To summarize, in the game _without_ replacement we have the following:

(1) To maximize a run of correct guesses, you should pick alternate colors. That’s because on the second pick (for example) the probability of a _different_ color coming up is 26/51, slightly more than 50%.

(2) For a specified objective of exactly K correct picks, you should pick K/2 red and K/2 black in any order. The order does not affect the probability of getting all K correct.

(3) No strategy that uses the information gained during the game increases your chances.

For K=52 without replacement the probability is (26!)^2 / 52! = 2 \* 10^-15

By comparison, in a game _with_ replacement, the probability for 52 correct guesses is (1/2)^52 = 2 \* 10^-16

You are 9 times more likely to get every card right in the game without replacement. In other words, it doesn’t make a huge difference.

---

<div class="post-metadata">

**Author:** ![Riemann](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/riemann/32/3133_2.png) [@Riemann](https://boards.straightdope.com/u/Riemann)\
**Post date:** [September 25, 2020, 9:20pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/32 "2020-09-25T21:20:22Z")

</div>

ETA - noting @Chronos comment, in (3) above I should have clarified:

(3) No strategy that uses the information gained during the game increases your chances _if all you care about is getting a perfect run of correct guesses_.

---

<div class="post-metadata">

**Author:** ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)\
**Post date:** [September 25, 2020, 10:29pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/33 "2020-09-25T22:29:18Z")

</div>

> [@Ashtura](#):
>
> There are many, MANY variations of this trick. Full deck, half deck. All correct. All wrong! Generally the participant guesses red or black, and then all (depending on the variation) of them end up being correct. The participant is not aware they are correct until the end.

How could this even work. If there aren’t 26 cards in both the red and in the black piles. There’s no way to be 100% correct or 100% wrong. And if I were the audience member I’d be sure the two types of guess were wildly different in number.

---

<div class="post-metadata">

**Author:** ![Riemann](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/riemann/32/3133_2.png) [@Riemann](https://boards.straightdope.com/u/Riemann)\
**Post date:** [September 26, 2020, 1:39am UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/34 "2020-09-26T01:39:16Z")

</div>

> [@OldGuy](#):
>
> If there aren’t 26 cards in both the red and in the black piles. There’s no way to be 100% correct or 100% wrong. And if I were the audience member I’d be sure the two types of guess were wildly different in number.

In the video, before the reveal (cards still face down) the magician says “but you got one wrong”, and moves one card from one pile to the other - possibly this is to make the piles equal? But since there’s trickery involved, I don’t know that it matters unless the two piles of cards look very obviously different.

---

<div class="post-metadata">

**Author:** ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)\
**Post date:** [September 26, 2020, 3:08am UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/35 "2020-09-26T03:08:21Z")

</div>

> [@Riemann](#):
>
> In the video, before the reveal (cards still face down) the magician says “but you got one wrong”, and moves one card from one pile to the other - possibly this is to make the piles equal? But since there’s trickery involved, I don’t know that it matters unless the two piles of cards look very obviously different

I understand. But if I make my sets 36 and 16, it isn’t going to be some much of a trick if he has to move 10.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [September 26, 2020, 5:30am UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/36 "2020-09-26T05:30:47Z")

</div>

> [@Chronos](#):
>
> Of course, the chance of perfection isn’t the only interesting calculation to look at. You might instead accept that you’re (probably, almost certainly) no going to get them all right, and just want to get as many right as you can (that is to say, maximize the expected value of the number correct). In this case, knowing what’s coming up as it comes is useful, and your optimal strategy is not constrained to being 26 of each.

Your strategy is going to be to guess red if there are more red cards left, and to guess black if there are more black cards left, otherwise flip a coin, right? It may even happen that _all_ of your guesses be “black”, definitely not constrained to 26. You can work out your exact expected number of correct guesses employing this strategy; it should be around 30.

---

<div class="post-metadata">

**Author:** ![Ashtura](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ashtura/32/2963_2.png) [@Ashtura](https://boards.straightdope.com/u/Ashtura)\
**Post date:** [September 26, 2020, 11:38pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/37 "2020-09-26T23:38:09Z")

</div>

I don’t know that trick variant, but I think in that variant there is a chance they can legitimately get one card wrong regardless of what the magician does. There are other variants of the trick where the spectator don’t miss any. But they don’t know any results until the very end so they could not strategize based on previous selection even if it wasn’t being manipulated by the magician.

---

<div class="post-metadata">

**Author:** ![Schnitte](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/schnitte/32/9033_2.png) [@Schnitte](https://boards.straightdope.com/u/Schnitte)\
**Post date:** [September 27, 2020, 9:43am UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/38 "2020-09-27T09:43:59Z")

</div>

Just chipping in that some languages, e.g. my native German, use the word “colour” (_Farbe_ in German) to refer to the suits. In a standard deck of 52 cards, with 13 of each suit, the odds of picking the “colour” of the card (in that sense) correctly are then, of course 13/52 = 1/4. But if by colour you mean red or black, then the answer is 1/2 (26/52).

Yes, it is confusing terminology in German.

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [September 27, 2020, 6:30pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/39 "2020-09-27T18:30:25Z")

</div>

Does anyone want an explanation of how the card trick is done?

I seem to recall a poster back in the day that was virulently opposed to that.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [September 27, 2020, 9:48pm UTC](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508/40 "2020-09-27T21:48:08Z")

</div>

I’d guess that it’s a variant of the off-by-one trick, where the magician is “confirming” the one he just guessed, but actually looking at the next one.

But there are probably a number of ways to do this trick, and I don’t know if it was necessarily that. It could also, for instance, be an accomplice or hidden camera, or a tapered or otherwise marked deck.

[Previous page](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508.md?page=1)

[Next page](https://boards.straightdope.com/t/odds-of-correctly-guessing-the-color-of-a-card-in-a-deck/921508.md?page=3)
