
I encountered the four men in hats puzzle for the first time today. My question is about a realisation I (think I) had while arriving at the solution, but I have no idea whether I've made a mistake somewhere.
Before I got to the actual answer, I was thinking about each man's chances of correctly guessing his hat colour. My thought process went something along these lines:
- At first blush, D has the best chances, as he can see the most.
- Hang on - D has only a 1 in 2 chance, the same as anyone else.
- Anyone else? No - C can see that B has a white hat, so he knows there's only one other. It can be on one of three heads, so if he guesses that his own is black, his chances of being right are 2 in 3.
What threw me about this, assuming that last realisation isn't flawed in some way, is that D can also see that B has a white hat. Somehow, C has a better chance of being right, even though D (in some sense) has more knowledge, at least for this configuration of hats.
What am I missing?
UPDATE
Thanks for the answers so far. I don't think I was very clear on what I was asking though: I did manage to solve the puzzle, but what confused me was the realisation I outlined above while getting there. Forgetting the original goal of the puzzle (how do the men reason about the solution) and only taking into consideration their chances of successfully guessing, how do I explain the fact that C's chances seem better than D's, even though D can see everything that C can, and more?

D's chances of guessing correctly are either 100% (if B and C match) or 50% (if B and C mismatch). The chance that B and C match is 1/3, so D's overall chance of guessing correctly is 2/3.
C's chances of guessing correctly are 2/3 regardless of the initial setup.
Therefore D has the same chance as C.
Note: I'm assuming that all ${4 \choose 2} = 6$ initial set-ups are equiprobable.
Expanded Explanation:
There are 6 possible initial set-ups. Let's use lowercase for white and UPPERCASE for black. So initially we have one of these:
abCD aBcD aBCd AbCd ABcd AbcDNote that only the third and sixth possibilities (in bold) have B and C matching.
Now consider D's strategy: if B and C match, guess the opposite (100% chance to be right). If not, guess at random (50% chance to be right). So D is right with probability (1)1/3 + (.5)2/3 = 2/3.
Now consider C's strategy: just guess the opposite of B no matter what. From the table above (and from your question), C's chance is 2/3.
Note: D can achieve the 2/3 chance of winning by just using C's strategy (which is simpler): just guess the opposite of C. As you can see from the table above, this wins 2/3 of the time too since it implicitly incorporates the bold cases.