“I have a white hat”.

Let’s suppose the winner, you, are A, and the others are B and C.

You could say, by probability, there are more white than black so white is more likely. Or that three identical hats is the only fair test. But that’s a guess, not a deduction.

So, let’s work it out. If two of them have black hats, the third would know immediately he had a white hat, there would be no pause and the problem is over. But that doesn’t happen, so there is at most one black hat.

If you were A and you saw a black hat (say B) and a white hat (C), then you would know you had a white hat, because C does not see two black hats. If he did, he would answer instantly.

If you were A and you saw two white hats (B and C), you would have to put yourself in, say, B’s position. If you (A) had a black hat on, B sees a black (A) and a white (C), realises that C doesn’t know so C must see a black and a white, so B would know the answer and would say he had a white. But he doesn’t, so you don’t have a black hat on, so it must be white.