# probablity of selecting balls

If i have three pots with balls in them as follow.

1st:  2 red 4 black
2nd:  2 red 12 black
3rd:  2 red 4 black


what is the chance of getting exactly 2 black balls if i picked one ball from each pot.

Edit You can skip this edit if you are not interested in the real problem I am trying to solve.The actual problem is that of n pots, where the even numbered ones have same number of each colored ball, and odd ones have too but with different counts from even numbered pots. I wanted to understand how to tackle this problem with a simplified case of only 3 pots.

1st:  2 red 4 black
2nd:  2 red 12 black
3rd:  2 red 4 black
4th:  2 red 12 black
...
...
nth:  2 red 12 black    --> assuming n is even


What is the chance of selecting r (not 2) black balls if one ball is selected from each pot?

The generalization is harder than one may think. The hard part is to enumerate all possible $\binom{n}{2}$ ways of selecting 2 labelled balls from the set of $n$ balls. The way I would write it is $$\binom{n}{2}\prod_{j \in B}p_j \prod_{k \ne B}(1-p_k)$$ where $B$ is the set of all 2-bin pairs from which we select the labelled balls. Here all experiments are assumed to be independent, and the probability to sample a labelled ball from the bin in a 2-bin set is $p_j$, and the probability to leave a labelled ball in the remaining $n-2$ bins is $1-p_k$

• Thank you, that seems to be on the right track. How would i go about tackling the problem of selecting r black balls from n pots? – danny Jun 8 '13 at 20:57
• replace $\binom{n}{2}$ with $\binom{n}{r}$ and redefine $B$ – Alex Jun 8 '13 at 20:58
• once again, $B$ is actually the hardest part, i.e. how to define such sequence of $j \in B$ to get $\prod_{j \in B} p_j$ – Alex Jun 8 '13 at 21:00
• Thanks I will think about it. – danny Jun 8 '13 at 21:02

There are $3$ possibilities: getting $1$ from the first and second pot, $1$ from the first and third pot, or $1$ from the second and third pot. Use the rule of sums on all these scenarios to find the total probability of getting $2$ black balls:

$$P=\frac{2}{3}\frac{6}{7}\frac{1}{3}+\frac{2}{3}\frac{1}{7}\frac{2}{3}+\frac{1}{3}\frac{6}{7}\frac{2}{3}$$

• You are allowed to pick one ball from each pot. Two balls from one pot are not allowed. – danny Jun 8 '13 at 20:18
• @danny I've edited. – Ataraxia Jun 8 '13 at 22:21
• Thanks that solves the 3 pot problem. – danny Jun 9 '13 at 0:15

I believe I have solved the general case that I was looking at. Since the even numbered pots contain the same number of red and black balls we group them together, and we do the same for the odd numbered ones. Calculating separately the total number of ways $r_0$ balls can be selected from one group and $r_1$ from the other using binomial distribution, I can then multiply to get the total number of ways.

Even:$b_0$ red k - $b_0$ black

Odd:$b_0$ red b - $b_0$ black

With these two groups
