There are a couple of posts about this already floating about, I think Fnord wrote a program to calculate the odds of over pairs and such too.