# Very simple poker holdem question

N holdem hands (just 2 cards from a standard 52 cards deck)  are dealt to N players

How to compute the probability that:

-exactly k players have a pair ( Two cards of the same value e.g.: 7, 7).

-at least k players have a pair

-
That's not a very simple question :-) –  joriki Oct 30 '11 at 15:20

The case $n=1$ is simple. The probability that the (one and onl player has a pair is $3/51=0.0588\dots$.

For more than one player, one method of computation is simulation. The following Mathematica code simulates $10^8$ hands and counts the number of hands with $k$ pairs, $0\le k\le n$, for $1\le n\le10$. {k,m} means that in $m$ hands there were exactly $k$ pairs among the $n$ players.

deck = Range[52];
hands = 10^8;
Do[
Clear[freq];
freq = Tally[
Table[Count[
Mod[#[[1]] - #[[2]], 13] & /@
Partition[RandomSample[deck, 2 n], 2], 0], {hands}]];
Print["n = ", n, Sort@freq],
{n, 10}]

n = 1 ; {{0,94119269},{1,5880731}}
n = 2 ; {{0,88582902},{1,11065651},{2,351447}}
n = 3 ; {{0,83379527},{1,15610723},{2,988653},{3,21097}}
n = 4 ; {{0,78489009},{1,19572572},{2,1858334},{3,78843},{4,1242}}
n = 5 ; {{0,73888621},{1,23009515},{2,2909371},{3,186390},{4,6022},{5,81}}
n = 6 ; {{0,69563109},{1,25968871},{2,4100553},{3,349923},{4,17092},{5,451},{6,1}}
n = 7 ; {{0,65483801},{1,28501493},{2,5400074},{3,575770},{4,37359},{5,1473},{6,29},{7,1}}
n = 8 ; {{0,61659751},{1,30637208},{2,6764126},{3,865183},{4,69909},{5,3702},{6,118},{7,3}}
n = 9 ; {{0,58052756},{1,32430263},{2,8172001},{3,1218287},{4,118645},{5,7735},{6,306},{7,7}}
n = 10 ; {{0,54670799},{1,33895225},{2,9599732},{3,1634219},{4,184723},{5,14465},{6,805},{7,31},{8,1}}

-
Thank you a lot for your answer.However, I am also looking for a general formula. –  Jean-Pierre Oct 31 '11 at 20:40
As joriki says in its comment, it is not a simple problem. –  Julián Aguirre Nov 1 '11 at 12:40
I think Jean-Pierre was being ironic. It is a complex problem that can be stated simply. –  Zippy Nov 2 '11 at 21:31