# What is the null probability of a given combination of ranks?

Following on previous posts about shuffling...

In Max Shinn's post about optimally shuffling cards, he describes looking at the "joint distribution of these frequencies compared to a null distribution." This is slightly ambiguous, but I'm going to interpret this in a similar way as last time: As the probability mass for the observed frequency of ranks in the hand under the null "uniform without replacement" distribution. Again, in Shinn's post, I'll assume we are drawing a hand of exactly 6 cards. How do we compute this probability mass?

Suppose we have 3 number 3 cards, 1 number 8, and 2 kings. How likely is that? The analysis goes very similar to last time. For each rank, there are exactly 4 cards of that rank, so the probability of drawing 3 number 3 cards should be $$(4/52)(3/51)(2/50)$$. The probability of drawing 1 number 8 is just $$4/49$$. The probability of drawing 2 kings is $$(4/48)(3/47)$$. We don't actually care what order we draw the six cards in, so I think we need to multiply by $$6!=720$$. So, the probability is $$6! \operatorname{P}(4, 3)\operatorname{P}(4, 2)\operatorname{P}(4, 1)/\operatorname{P}(52, 6) = \operatorname{P}(4, 3)\operatorname{P}(4, 2)\operatorname{P}(4, 1)/\operatorname{C}(52, 6)$$, where $$\operatorname{P}(n, k) = n!/(n - k)!$$. And as before, we can rewrite this using falling factorials as:

$\frac{4^{\underline{3}} \cdot 4^{\underline{2}} \cdot 4^{\underline{1}}}{\operatorname{C}(52, 6)}$

where $$\operatorname{C}(n, k)$$ is a binomial coefficient.

Suppose we represent the number of cards from each suit as a vector $$\bold x = [x_1, x_2, \dots, x_{10}, x_{11}, x_{12}, x_{13}]$$, with $$x_k$$ giving the number of cards of rank $$k$$. Then we can write the general form as:

$P(X = \bold x) = \frac{\prod_{j=1}^{13} 4^{\underline{x_j}}}{\operatorname{C}(52, 6)}$