1

This is my slight modification to a question in the book "Introduction to Probability and Statistics for Engineers and Scientists" by Sheldon M Ross.

Suppose there are N different types of coupons and suppose that each time
one obtains a coupon it is equally likely to be any one of the types. 
Compute the probability that you get exactly k different types of coupons in a set of S coupons.
N>0, k<=S<N.

I tried to create the probability mass function but I am not able to come up with the correct one.

Here is mine.

Choosing k coupons from N coupons can be done in
Combination(N,k) ways.  -- (1)

k places (1 for each coupon) in a set of S can be chosen in Combination(S,k) ways  -- (2)

this is to satisfy the atleast one coupon of each type criteria.

These k coupons can arrange themselves in k! ways.  --(3)

The remaining (S-k) places can be filled by any of the k coupons. Coupons are replaced as per the question.

So it becomes k^(S-k)     --(4)

Finally the probability to choose one coupon is 1/N (equal for all types) and thus for a set of S coupons it becomes (1/N)^S --(5)

So my answer for the question becomes (1) * (2) * (3) * (4) * (5) But my answer probability mass function does not sum up to 1. And so I am doing a blunder somewhere. Am I thinking completely wrong?

joriki
  • 243,700
Durin
  • 189

1 Answers1

2

In order to be consistent with standard notation, instead of picking $S$ coupons, we will pick $n$.

The number of ways to divide a set of $n$ elements into $k$ non-empty subsets is $S(n,k)$, where $S(n,k)$ is the Stirling Number of the Second Kind.

Thus the number of "favourables" is $\binom{N}{k}k!S(n,k)$, and the required probability is $\frac{\binom{N}{k}k!S(n,k)}{N^n}$.

Remark: An Inclusion/Exclusion argument shows that $$k!S(n,k)=\sum_{i=0}^k (-1)^{k-i} \binom{k}{i}i^n.$$ The first term $k^n$ counts the number of words of length $n$ that one can make from an alphabet of size $k$. The remaining terms are to make sure that we are only counting the words that have at least one of each of the $k$ letters.

There are a number of useful recurrences for the Stirling numbers of the second kind, but no closed form in terms, for example, of factorials.

André Nicolas
  • 516,285
  • Thank you for the reply. Why did you multiply k! In the numerator? – Durin May 21 '14 at 15:31
  • Why on earth would you use $S(n,k)$ to calculate the number of ways to chose $k$ objects out of $n$? I think it is a completely different kind of task: no one asks to pigeonhole $n$ objects in $k$ slots: you simply need to choose $k$ objects, and throw away $n-k$. Or I did not understand the problem at all. – Shady_arc May 21 '14 at 15:37
  • 1
    @Shady_arc: You understood just fine, but the count of the favourables is more complicated than in your answer. The problem is that $k^S$ counts the functions from a set of $S$ elements to a set of $k$ elements. But since we want exactly $k$ different types, we want the functions that are onto. Your $k^S$, as a very extreme case, counts among others the constant functions, which are not allowed if $k\gt 1$. To put it another way, we want the number of words of length $S$ over an alphabet of $k$ letters, such that every letters occur in the word. The $k^S$ counts all words. – André Nicolas May 21 '14 at 17:02
  • But if we have NcK ways to select set of k types and S(n,k) ways to divide n elements in one such set of k types then why is that k! there? What is that something which is again having k! Ways? Your answer has been very clear and it is the only part I am unable to understand. – Durin May 21 '14 at 17:58
  • @André Nicolas Thanks! Got it. – Shady_arc May 21 '14 at 17:58
  • The "extra" $k!$, which cancels the $k!$ in the denominator of $\binom{N}{k}$, is due to the fact I wanted to use the notation $S(n,k)$. I could have used $\binom{N}{k}\sum_{i=0}^k (-1)^{k-i} \binom{k}{i}i^n$, but wanted to bring in the known and important $S(n,k)$, which is $\frac{1}{k!}\sum_{i=0}^k (-1)^{k-i} \binom{k}{i}i^n$. Bringing in $S(n,k)$ lets us use other known recurrences for $S(n,k)$, or approximations, to do the computation. – André Nicolas May 21 '14 at 18:05
  • Oops. I am still unable to grasp it. So you have NcK ways to select k sets. We don't care about the order and so this part of the result is over. Let's keep it aside now. We have S(n,k) which has a k! in denominator. Whatever the formula is, it gives us say T number of ways to divide n elements into k types. So wouldn't it be ok to just multiply this T and NcK? Why cancel out k!? I am so sorry, I am unable to understand this easy thing. But unless I know, I won't be able to justify myself that I understand the answer fully. – Durin May 21 '14 at 18:25
  • 1
    The $S(n,k)$ counts the number of ways to divide $n$ objects into $k$ unordered types, with at least one object of each type. It is a peculiarity of the definition of $S(n,k)$. – André Nicolas May 21 '14 at 18:31
  • Thank you. I had not expected the question to be this tricky. I am glad i asked it here. Otherwise I wouldn't have got to know about Stirling numbers of second kind. – Durin May 21 '14 at 18:37
  • You are welcome. Perhaps the original question you modified was simpler. In combinatorics, a question can turn from straightforward to complicated by a "minor" wording change. – André Nicolas May 21 '14 at 19:02