# Balls in Boxes Probability

I am quite stuck here as to how my book achieves an answer.

The question reads that there are two boxes, lets call them $A$ and $B.$ Box $A$ has $24$ balls; $3$ red, $8$ yellow, $13$ green. Box $B$ has $18$ balls; $5$ red, $7$ yellow, $6$ green.

the question ask: what is the probability of choosing one ball from each box, such that both balls are the same color$?$

Once again I understand that P(event)= outcomes of event/ total outcomes

now the book states the answer as being $149/432$, but I do not know how they did so.

My attempt:

I know that my sample space is $432$, because there is an intersection from box $A$ and $B$; such that $24\times 18$ yields the total possible outcomes. So I got $432$ part.

Then if I pick a red from box $A$ then I have a $5/18$ chance picking red from $B$ if I picked a yellow from box $A$ then I have a $7/18$ chance of picking yellow from $B$ and if I picked a green from box $A$ then I have a $6/18$ chance of picking a green. But I don't know how to use this information to my advantage in order to solve it

• hint: weighted probabilities – ThomasMcLeod Jan 15 '16 at 2:40

Imagine for a moment that the balls are not only colored, but numbered as well.

Let $A_r,B_r,A_y,B_y,A_g,B_g$ represent the events that you select a red from box $A$, red from box $B$, yellow from box $A$, etc...

Let $E$ be the event that you select the same color ball from each box.

Note that $E=(A_r\cap B_r)\cup (A_y\cap B_y)\cup (A_g\cap B_g)$ and that each of these intersections are disjoint events.

This implies that $|E|=|A_r\cap B_r|+|A_y\cap B_y|+|A_g\cap B_g|$

Let us turn our attention now to trying to calculate $|A_r\cap B_r|$. How many ways can we choose a red ball from box $A$ and a red ball from box $B$?

• Pick which red ball it is from box $A$ (remember, we are imagining that they are numbered to assist in the calculations). There are $3$ choices.
• Pick which red ball it is from box $B$. There are $5$ choices.

There are then $3\cdot 5=15$ total ways of picking a red ball from both boxes.

Similarly, there will be $8\cdot 7=56$ ways of picking a yellow from each and $13\cdot 6=78$ ways of picking a green from each.

We get then that $|E|=15+56+78=149$

Remembering that our sample space is all ways of picking a ball from each and is of size $24\cdot 18=432$ we have a final answer of:

$$Pr(E)=\frac{149}{432}$$

• Thank you that makes sense, It helps that you also worded the way in which my professor usually does. – learnmore Jan 15 '16 at 2:51

We begin by finding the total number of outcomes. Since there are $24$ balls in $A$ and $18$ balls in $B,$ the "sample space" is $432,$ as you have gotten.

We now do casework for the different colors. For red, we see that there are $3 \cdot 5 = 15$ ways; for yellow, there are $8 \cdot 7 = 56$ ways; and for green, there are $13 \cdot 6 = 78$ ways. Summing, we have a total of $149$ ways.

The probability is successful over total; here, this is $\boxed{\frac{149}{432}}.$

$P(red\ ball\ from\ Box\ A) \cdot P(red\ ball\ from\ Box\ B) + \\P(yellow\ ball\ from\ Box\ A) \cdot P(yellow\ ball\ from\ Box\ B) + \\P(green\ ball\ from\ Box\ A) \cdot P(green\ ball\ from\ Box\ B)$

Therefore:

$3/24 \times 5/18 + 8/24 \times 7/18 + 13/24 \times 6/18 = 149/432$