Hole Ranking

Consider all 1326 possible hole cards.  For the current board, be it the flop, turn, or river, one of those holes is the pure nuts, it makes the best possible hand.  Some other hole is the second nuts, third nuts, etc.  We went over this in "reading the board", there are different possible hands depending on what's on the board.  Now, take all those hole cards and list them in order from the nuts to the worst possible hand.  This list depends on what's on the board, so for example with a board of

5s5c6s9sKh

the top few holes are :

7s8s (makes the straight flush)
5d5h (makes four of a kind)
KdKc , KcKs, KdKs (makes the nut full house)
99 , 66
K5, 95, 65 (all make houses)
AsKs (makes the nut flush)
AsQs
... through all other flushes ..
7c8h and other 78's other than ss (makes the straight)
A5, K5, etc. (the only possible trips)
(54,53,52 are tied since the kicker doesn't play)
AA (the nut two-pair)
K9, K6 (best king two-pairs)
AK,KQ,KJ,...
(all other two pairs)
AQ (best single pair hand)
finally, 23, 24, and 34 are tied for the worst hand, they play the board

Now, you know what your two hole cards are, so not all 1326 are possible.  Only 50*49/2 = 1225 holes are possible, and of course holes that overlap the board are also impossible (you can't have a 5s in the hole when one is on the board).  Once the full board is out, there are only 45 unknown cards, since you can see 7, so there are 45*44/2 = 990 possible holes.  How does your hand stack up against all other possible hands?  Well, you simply find where you go in the list, and count how many holes are below you.  Divide by the number of holes possible (990) and that gives you the fraction of holes that you beat.  For example, if you have the nuts, all holes are below you, so you beat 100% of them.  In our example above, AA is near the middle, so it beats about 50% of holes.

Now, this fraction of holes that you beat is not your chance of winning, since not all opponent holes are equally likely.  As we've discussed in "reading the board" and "bayesian poker", the probablity of various opponent hole cards changes with the betting action.  If you're playing against someone who was forced all-in on their big blind, then they actually have random holes, but in all other cases you can see the actions they've made, and adjust your estimation of what hole they have accordingly.

If you were thinking along the lines of Bayesian poker, you would assign a probability to each hole based on the opponent actions you've seen : P(H|S).  Then, you can sum the probability of all the holes that you beat, and you know the probability you are winning, given the previous action.

I also outlined how most humans do a form of Bayesian poker.  It's more like reducing the opponent holes to a list of things you think are likely.  For example, if there's been any betting action at all, you rule out all the hole cards that are pure junk, 23, 72, etc. that you know they would fold.  Then you look at what they did on each round and what cards they would have done that with, this is the game of playing detective and putting people on hands.  It's excellent practice to sit and watch games and guess what cards people have based on their actions.  Once you have a few hole cards that you think are most likely for them, you simply count how many are above you and how many are below.  Remember that if you think of "AK" there are actually 16 of those, while if you think of "JJ" there are 6 of them, etc.

[CUT - this is a terrible example]
Let's consider our previous board.  You have the A9d in the big blind.  It folds to the dealer who raises.  At this point you put them on nearly any hand except pure junk.  You call and the flop comes 5s5c6s.  You check and they check.  Their check is a little mysterious, because they would have bluffed with almost any hand.  You now think they may have a monster and they may be trapping.  The turn comes the 9s.  You don't think they made the flush, because they would have semi-bluffed the flop with a flush draw.  You think they either have a monster that they slow-played on the flop, or pure junk.  The holes you put them on are - any pocket pair, AK, AQ, AJ, KQ, A5 or A6, or junk (pair of fives with high card).  You check and they bet.  You call.  River comes the Kh.
[CUT - this is a terrible example]

Consider an example.  It folds around to you on the button, you have TT.  You raise, and the big blind calls.  You think he would call with marginal hands but not pure junk.  The flop comes 855 with two spades.  He bets.  You believe he would bet with an 8, or a straight or flush draw, you think he would have checked if he had a 5.  So, you put him on A8, K8, Q8, 67, or two spades, with one a Jack or better.  The turn comes a T.  He checks, you bet, he calls.  Now you're sure he doesn't have a 5, but all the other hands still make sense.  The river comes a spade.  He checks, what should you do?  You beat any of his reasonable hands except the flush draw.  So, let's count roughly what your chance of winning is.  The number of flush holes that he would have played is roughly 35 (there are 13*12/2 = 78 spade holes total, and he plays roughly the top half of them).  The non-flush hands he plays are A8,K8,Q8,67, there are 12*3+16 = 52 of these.  Your chance of winning is about 52/(52+35) = 0.5977 , about 60%.  

The next question is, should you bet?  If he has the flush, he'll raise, and we'll assume you fold.  If he has an 8, he'll call.  If he missed his straight draw, he'll fold.  The pot size is currently 10.5 big bets.  If you check and show down, your EV is 0.6 * 10.5 = 6.3 big bets.  If you bet, we have to consider each case.

vs. Flush (35 holes), EV is -1
vs. Eights (36 holes), EV is 12.5
vs. 67 (16 holes), EV is 10.5

EV of bet is  (35 * -1 + 36 * 12.5 + 16 * 10.5) / 87 = 6.7 , so you should bet.  Notice how marginal the difference is.  If he were to fold his 8's instead of calling, it would make it a wash.  Also, if you were to call his raise, that would make it bad to bet as well.  If he were to fold his 8's and you were to call his flush, that would be a disaster!  The margins for proper play in limit poker are very small, and the difference between a good bet and a bad one can be in the details.

Now, as usual I'm not suggesting that you actually do all this math when you're playing, but you use these concepts when you play.  You think of what hands he could possibly have, the chance of each, and how he'll play with them, and whether you beat them.  You need to have a rough idea of the counting to know the distribution.

This basic hole counting works great on the river, but in earlier stages you need to consider draws as well.  Here's what you do.  Think of all the holes he may have, this gives a probability of him having each hole P(H).  Now, against that hole, you have some chance of winding up the winner at the showdown, W(H).  Your total chance of winding up the winner is :

W = Sum[H] P(H) * W(H)

This is the usual form of a probability weighted sum.  

Let's do a simple example from no-limit hold'em.  You raise preflop and someone goes all in.  You have AT, should you call?  He may have any pair, or AJ, AQ, or AK.  In all cases, you are not the favorite, but by how much?  We have to add up :

vs. AA : 8.5% (3 ways)
vs. KK,QQ,JJ,TT : 30% (6*3+3=21 ways)
vs 99-22 : 50% (8*6 = 48 ways)
vs. AK,AQ,AJ : 27% (12*3 = 36 ways)

W = (8.5 * 3 + 30 * 21 + 50 * 48 + 27 * 36) / 108 = 37.3%

So, if the pot offers you better than 37.3%, you should call.  For example, if you came in for a raise of 5,000 and the all-in is for 15,000 , then it's 10,000 more for you to call and the pot will be 30,000 , you should call.  The pot requires 33%, and you have 37%, so you make good money on a call.  (note that this conclusion is only true if you're playing for pure EV; in reality you should consider long-term EV).

More generally, on the flop and turn, you have some made hand, he has some possible set of holes, and you have some chance of winning against each (either because you're ahead and he's drawing, or because he's ahead and you're drawing).  A key is that you always think in terms of a probability of winning.  You almost never know for sure that you're ahead, instead you think of all the hole cards he could have, you see that you beat, say, 80% of them, so you have an 80% chance of winning.  Then, draws also come into it, so there are two ways that your chance of winning is just probabalistic - because of the uncertainty of his hole cards, and because of the cards still to come on the board.  Both factors make poker a game of averages and statistics, and mean you have to play for EV.