# Number of urns containing a ball of each color: is there a probability distribution describing this?

There are $B$ urns. There are $n$ red balls and $n$ white balls with $n\leq B$. Each ball is independently put into each urn with equal probability. An urn can get at most one ball with the same color but can get two balls of different colors. I want to know the probability distribution of the number of urns which contain the balls with different color.

Is there any existing distribution describing this? If not, do you have your own answer?

• What is the role of $k$ there? Did you mean $B$? – Clement C. Jul 9 '16 at 21:28
• It should be $B$ because we cannot distribute more than $B$ balls among $B$ urns without having an urn with two balls of equal colors. – Peter Jul 9 '16 at 21:40
• @Peter You don't seem to have understood my comment. Whether you call it $B$ or $k$, there probably should be only one extra parameter (besides $n$ -- otherwise, one of them at least serves no apparent purpose. – Clement C. Jul 9 '16 at 21:42
• What I meant is : Instead of "less than k" it should be "less than "B". Is that what you meant with your comment ? – Peter Jul 9 '16 at 21:45
• Sorry, should be B. I changed it. – user353115 Jul 9 '16 at 21:55

## 1 Answer

We get two random choices $n$ out of $B$. The number of hits (number occurs in both choices) can be calculated with the hypergeometric distribution like in the classical lotto-problem.

• The question seems to be about how many common hits there are, which indeed can be computed using properties of the hypergeometric distribution -- but is not, as far as I can tell, immediate from it. (?) – Clement C. Jul 9 '16 at 21:45
• The red balls stand for the numbers the player has chosen. And the white balls stand for the numbers drawn. At least, this was my thought. – Peter Jul 9 '16 at 21:47
• I am interested in the number of common hits. For example, suppose there are two urns and 1 red ball and 1 white ball. There is at most one urn containing both balls and the probability this happens is 1/2. I want to know how to extend this to arbitrary number of urns and ball. – user353115 Jul 9 '16 at 22:08
• Another difference with any straightforward hypergeometric-based approach appears, if I parsed the question correctly, to be the uniqueness. Namely, two red balls falling in the same urn "become" one single red ball, so if we have 78 red balls and 10 white balls all falling in the same urn, then it only counts as a single urn contain both colors. – Clement C. Jul 9 '16 at 22:36
• @ClementC I imagine the OP meant there to be n balls of each color, in which case the answer is indeed the hypergeometric distribution. But I suppose that needs to be clarified. – Deedlit Jul 10 '16 at 0:21