Basic Probability

What would result if one took a deck of playing cards, and tried to guess whether each card were black or red? This would involve placing the deck in a stack, face down, and making a guess on each face-down card prior to turning each card face up, one at a time.

What would the average positive results be? Would one be right about 50% of the time? or, 33%? maybe 25%? I was especially wondering if there is an accepted, statistical average percentage that can answer this question?


You’ll have to clarify your experiment slightly.

Step one: Shuffle cards
Step two: place in one stack, face down
Step three: guess whether top card is red or black, write it down
Step four: flip card, notate whether guess was correct or not
Step five: repeat three and four until stack is empty


If you’re allowed to look through the cards which have been turned up, your accuracy will probably increase greatly near the end, and you should always get the final card right. If you’re not allowed to look at past cards, you’ll still probably remember which have turned up a bit more often, and your accuracy would increase near the end, though not as much.

Otherwise, since you have a near-50% chance (remember, it would increase towards the end since you’re likely to remember which color has actually come up more), your overall “correct guess rate” would (in all probability) average out to slightly over 50%.

If you just guess blindly each time, without taking into account what’s already been flipped over, then we can write down a few formulas to figure this out. Let P[sub]E[/sub] be the percentage of the cards that are red (this would be 0.5 for a standard deck.) Let P[sub]G[/sub] be the percentage of the time you guess that the card you’re about to flip. Then the probability that you guess a card correctly is just

(prob. of correct guess) = (prob. of red card)(prob. of red guess) + (prob. of black card)(prob. of black guess)
= P[sub]E[/sub]P[sub]G[/sub] + (1 - P[sub]E[/sub])(1 - P[sub]G[/sub])
= 2 P[sub]E[/sub]P[sub]G[/sub] - (P[sub]E[/sub] + P[sub]G[/sub]) + 1

For P[sub]E[/sub] = 1/2, this simplifies to a probability of a correct guess of 1/2, regardless of P[sub]G[/sub].

However, you could do significantly better than this if you took into account what cards are left in the deck. As an example, if the first card came up red, there are 25 red cards left but 26 black cards, so you’re slightly more likely to be correct if you guess black for the next one. In general, I think the optimal strategy would be to guess black when more red cards have already been flipped than black cards (and vice versa.) I’m not sure how many cards you could expect to guess correctly under this strategy, though. I’ll leave that to a real statistician, or failing that, someone who can write a quick program to get a good approximation.

Ah, crap. That should read:

Assuming the OP is allowing for complete knowledge of previously drawn cards…

This problem gets pretty ugly pretty fast when you attack it analytically, so I decided to go the simulation route. With 2 colors and 52 cards, the above-mentioned optimum strategy gets you an average number of correct guesses of 28.86.

The distribution looks like this:

correct     prob.
  <26    0.0           (exact)
   26    0.1100247    0.0002708
   27    0.2118721    0.0003758
   28    0.1894208    0.0003554
   29    0.1571454    0.0003237
   30    0.1205207    0.0002835
   31    0.0850634    0.0002381
   32    0.0556674    0.0001926
   33    0.0339734    0.0001505
   34    0.0189180    0.0001123
   35    0.0096753    0.0000803
   36    0.0045560    0.0000551
   37    0.0019660    0.0000362
   38    0.0007593    0.0000225
   39    0.0002940    0.0000140
   40    0.0001080    0.0000085
   41    0.0000240    0.0000040
   42    0.0000080    0.0000023
   43    0.0000033    0.0000015
   44   <0.000002      (95% CL)

Incidentally, with 4 colors (or suits), the average number of correct guesses is 16.86.

Related question, since we seem to have some statisticians in the house:

You and I each have a deck of ordinary cards which we’ll assume to be shuffled at random. We each turn over one card at a time simultaneously, as though we were playing the child’s card game “War.” What’s the probability that, at some point, we’ll both turn over the same card (suit AND rank) at the same time?

In practice, it happens more often than not-- this is an ancient bar bet. But I have never been able to figure out how to calculate the odds on it. Any takers?

I’ve got 5 minutes before daily maintenance, so I’ll make this fast. 1 in 13 chance. No matter what card you flip over, 1 in 13 (or 4 in 52) of my cards will match it. At least, the very first flip will be 1 in 13 chance of matching, with mild discrepancies in the first quarter of the deck increasing to wild fluctuations in the last quarter. Oooo, 100 seconds flat…

Crap, didn’t see the suit and rank caveat. 1 in 52. But your real question is, after flipping the entire deck, did it happen at least once…yes, that is a good question and I bet it would be > 50%…I’ll run some numbers for fun during maintenance.

Okay, before I give you the answer, I want all the math geeks here to understand that I have virtually no education in math or statistics. I have, however, wasted countless hours on gambling analysis in the past 15 years or so.

So please…don’t make fun of my methods or notation. :slight_smile:

1st draw: 1 in 52 chance of being a match, or rather, 51 in 52 chance of failure.
2nd draw: 2 cards are impossible to match now, so 49 in 50 chance of failure.
3rd draw: 4 gone, so 47 in 48 chance of failure.

Hmmm, the problem with this approach is that the first two draws could be the same two cards…as in, Deck A could draw 3H 5D while Deck B drew 5D 3H. Neither are matches, but only 2 cards were eliminated. This is way too complicated for my feeble brain.

Okay, let’s try from a completely different angle. Every card will be drawn; the only variable is when. Possible places are 1 through 52. So every card in my deck will have a 1 in 52 chance of matching the same card’s position in your deck. That’s a 51 in 52 chance of failure for every drawing. (My previous error of zeroing out possibilities for already-drawn cards falls into the same trap as the Monty Hall problem: even though the knowledge has changed, the original probabilities were already written in stone. Therefore, 2/3 to switch doors instead of 50/50.)

Okay, so it’s pretty simple: 51/52[sup]52[/sup] chance to fail 52 times in a row, which is the only way to have the whole thing fail. My calculator tells me that equals 36.43%, which means the inverse, 63.57%, is the chance to succeed in finding at least one match. (Note there could be more than one, but in the bar bet version, I imagine you stop after the first match, so multiple matches would count as well.)

Yes, your impression that it happens more often than not is correct. Almost twice as often than not, in fact. This seeming paradox is related to the birthday problem: How many people do you need in a room to have a 50% chance that 2 (or more) of them celebrate birthdays on the same day? The answer is remarkably low; I think it’s around 20. Go figure. hehheh

As a side note, the reason I agreed initially that it would happen frequently is because of a similar question I analyzed regarding roulette: What is the chance that, at any given point in time, a roulette history board shows 2 identical numbers in a row? The history board shows something like the last 10 spins. If you walk around all the tables in a given section, you are almost guaranteed to see at least one “doubler”. (But don’t bet for doubles on a table that shows none; I lost my shirt doing that. Nothing is ever “due”. The inverse, however, is a much stickier question. Can predictable trends manifest on a mechanical device?)

Hey, this took me 40 minutes. Maintenance is almost done by now!

Your question is a form of “Montmort’s Problem” and is often seen as men randoming picking their own hats. Your case is where n=52, but the answer is nearly the same for any n greater than 5.

The probability of no hits is 1/e where e is the base of the natural system of logarithms and equal to .367879. At least one hit is .632121.

To add to what aahala said, the question is whether the second deck is a derangement* of the first. The actual number of derangements of a list of n items is D[sub]n[/sub] = 1/n! * sum((-1)[sup]i[/sup]/i!, 0 < i < n). The probability of a reordering being a derangement is D[sub]n[/sub]/n!, which is very, very close to 1/e for n > 5.

*A derangement is a reordering where no object is in its original position.

Confused (not unusal)? If I were to say just red before every card was turned over, wouldn’t I always get 50% :confused:

Yes, and if you said “black” every time, you’d also get 50%. The question is, can you do better?

Oh, ok, was confused by the 33% and 25% outcomes in the question :o

A related color-guessing problem: I turn over a deck of cards, one card at a time. At any time, you’re allowed to stop me before I turn over the card, and say “I think the next card is red” (you must say red, not black: Your choice is just in when you say it). I then turn over that card, and if it’s red, you win, and if it’s black, you lose. Either way, the game is over (it’s also over, with you losing, if I run out of cards and you never call). With perfect strategy, what are your odds of winning? It turns out that no matter what you do, you can’t do better than 50%.

And on the question of two cards from two decks matching, it also turns out that the expected number of matches is exactly 1, no matter how many cards you have. You can easily check this for small numbers (1-4 or so), and I suspect that it can be proven in general via induction (I’ve never actually seen the proof).

Well, duh. :wink:

This is pretty obvious, since the odds of matching a given card is 1/x, where x is the number of unique cards in the deck. Of course, this only applies if both decks are identical.

I don’t think it’s at all obvious. I see how to calculate the expected value, but it involves some really, really nasty inclusion-exclusion stuff. Someone else can do it.

Of course! Good old D[sub]n[/sub] = 1/n! * sum((-1)[sup]i[/sup]/i!, 0 < i < n)! Don’t I feel stupid now.

Seriously, if this is what it takes, no wonder I was never able to solve it. I was pretty proud of myself for getting to the point of “Out of 52! * 52! possible cases, how many will…” blah, blah. Trying to solve it with arithmetic, essentially.

I will make a good faith effort to undertand this, but don’t hold your breath.

So, is this “e,” which you say is the, um, base of the natural system of logarithms(?) a constant, or does it vary depending on the problem?

…or maybe someone could direct me to the “A Child’s Garden of Logarithms” website, so I can try to remember what these little bastards do.