Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say I have a generalized deck of cards, consisting of $R$ ranks, $S$ suits, and with $C$ copies of each card. The number of cards in the full deck would thus be $RSC$, and the number of cards of each rank would be $SC$. In addition, I have a hand size of $H$.

I'm trying to find a general equation for the probability of getting dealt a generic $(N_1, N_2, ..., N_k)$-of-a-kind in a hand of size $H$. An example of such a hand would be a classic two pair hand in standard poker (e.g. 4, 4, K, K, ?). This would be a $(2,2)$-of-a-kind, with $H=5$.

I've tried going about this problem by attempting to calculate the number of combinations for a fixed set of givens. The following equation for number of combinations resulted from a quick attempt at the problem, but it doesn't seem to be correct:


Given $(N_1, N_2, ..., N_k)$ and $W=\sum^k_{i=1}N_i$.

I must be overlooking something; probability and stats are not my strong points, for sure. Any assistance as to what I should be doing?

share|cite|improve this question
Why doesn't your formula seem to be correct? Can you illustrate with a simple example? – oks Mar 1 '13 at 10:27
I don't see why you're differentiating between suits and copies. That distinction doesn't enter into the probability you're looking for; your answer depends only on $SC$, as the correct answer must. – joriki Mar 1 '13 at 10:48
up vote 0 down vote accepted

Say you want $k_j$ $j$-tuples of cards of the same rank, i.e. $k_1$ singletons, $k_2$ pairs, etc., with $\sum_jjk_j=H$; then the probability is

$$ \binom{RSC}H^{-1}\pmatrix{R\\k_1,\dotsc,k_n,R-\sum_jk_j}\prod_j\binom{SC}j^{k_j}\;, $$

where the second factor is the multinomial coefficient

$$ \pmatrix{R\\k_1,\dotsc,k_n,R-\sum_jk_j}=\frac{R!}{k_1!\cdots k_n!\left(R-\sum_jk_j\right)!} $$

that counts the number of ways of choosing $k_1$ ranks for the singletons, $k_2$ ranks for the pairs, etc.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.