I'm trying to wrap my head around a problem that has nothing to do with poker, but I can use poker hands to explain it.
I'm looking for combinations, not odds.
There are 52 * 51 * 50 * 49 * 48 = 311,875,200 ways to deal 5 cards, and 5 * 4 * 3 * 2 * 1 = 120 sequence combinations for the same 5 cards.
So there's 311,875,200 / 120 = 2,598,960 five card hands, right?
How many of those hands would be two pair?
How can it be a fraction? What am I doing wrong?
The problem is, I need to use the COMBIN function - something I never even heard of before I started reading WoO and WoV.
I cover the formulas briefly in my poker probabilities page.
I was actually looking for the formula rather than the result.
For what it's worth, the COMBIN thing has me confused to the point where I think I'd like to see a formula that doesn't use it.
Are you going to clue us in?
A "Hit it Again" Roulette variation maybe?
Is a good site for learning the basics in simple English.
The "combin" function is one of the most common and powerful ones to use.
1. There are 13!/(11!*2!)=78 ways to choose 2 ranks out of 13 for the two pairs.
2. There are 11 ways left to choose the rank of the singleton.
3. There are 4!/(2!*2!)=6 ways to choose two suits out of four for each pair. Do this twice, so 6*6=36 ways to arrange the suits of the two pair.
4. There are 4 ways to choose the suit of the singleton.
78*11*36*4=123,552 combinations for a two pair.
There are 52!/(5!*47!)=2598960 ways to pick 5 cards out of 52.
So the probability of two pair is 123552/2598960 = 4.75%.
The combination function is just shorthand notation for a factorial formula.
1) The factorial of N is the number of ways to arrange N distinct elements. It's denoted N!, and it equals N * N-1 * N-2 * ... * 3 * 2 * 1. e.g. 5! = 5*4*3*2*1 = 120. In Excel, the formula is =FACT(n).
2) Suppose you wanted to know how many arrangements there are of M distinct elements from N, where M <= N. There are N ways to pick the first, N-1 ways to pick the 2nd, and so on, down to N-M ways to pick the last, and you multiply those all together. That formula is N! / (N-M)! That's known as the permutation function. So 5p3 = 5*4*3*2*1 / 2*1 = 5*4*3 = 60. In Excel, the formula is =PERMUT(n,m).
3) Now suppose you didn't care how many different arrangements there were of the same M elements, you just want to know how many ways there are to pick them from the larger set of N. For example, you don't care if you have 1 2 3 4 5 or 5 4 3 2 1 - those are the same and you only count those once. Poker hands are a good example - order doesn't matter. Well, we already know how many ways there are to arrange M elements, that's M!. So just divide the permutation function by M!, and now you have N! / (N-M!) / M!, or properly parenthesized, N! / ( (N-M!) * M!). That's the combinations function, and it answers the question "how many ways can I choose M elements from N if I don't care about the order." For this reason, its also commonly spoken as "N choose M". In Excel, the formula is =COMBIN(n,m).
Yeah, this was part of my research for my Poker For Roulette idea.
The math for this really got my head hurting.
As I eventually figured out, the math for Poker For Roulette is not at all like stud poker. It's more like picking one card each from five 38 card decks. The Combin didn't quite work.
Coming up with the calculations for natural hands was hard. Once I added the wild greens to the mix, my head exploded. I gave up, and ended up creating a program to cycle thru and analyze all 79 million combinations.