Probability : balls from boxes

I have two boxes, one with ten balls, eight white and two black and the other with ten balls, four white and six black. Without seeing I choose a box and choose three balls from this. What is the probability that the fourth ball I'll choose is black if the other three are not all white?

My question is: Can I find the probability that the fourth ball is black if the other three balls are all white and then count $$1-$$ this probability?

I solved my question. For the exercise, that's my trying:

$$E$$ = the fourth ball is black

$$A$$ = the three balls are ALL WHITE

Then $$P(E) - P(E|A)$$ will give me what I need.

For $$P(E)$$:

$$C$$ = I choose first box and $$D$$ = I choose second box

$$P(E) = P(E|C) \cdot P(C) + P(E|D) \cdot P(D)$$

I will find $$P(E|C), P(E|D)$$ from the right groups of four balls

So, if $$a$$ is a white ball and $$b$$ is a black ball then:

For the first box: $$aaab, baab, abab, aabb$$ I sum the possibilities for all these groups and I get $$P(E|C)$$.

For the second box: $$aaab, baab, abab. aabb, bbab, babb, abbb, bbbb$$ I sum the possibilities for all these groups and I get $$P(E|D)$$.

• No. $1-$ that probability would be the probability that the fourth ball is white if the first three are not all white. That is, $1-\Pr(X|Y)=\Pr(\overline{X}|Y)$. It is not true that $1-\Pr(X|Y)=\Pr(X|\overline{Y})$ Instead, $\Pr(X)-\Pr(X|Y)=\Pr(X|\overline{Y})$ – saulspatz Apr 24 '20 at 22:40
• @saulspatz oh I got it! But is it easy to find the possibility that the fourth ball is black? – CodingGuy Apr 24 '20 at 22:48
• Should I take any group of 4 balls with Black at position $4$. For the first box we have WWWB,BWWB,WBWB,WWBB. For the second box we have WWWB,BWWB,WBWB,WWBB,BBWB,WBBB,BWBB,BBBB. – CodingGuy Apr 24 '20 at 22:53
• I'm not sure exactly what you are getting at. These possibilities aren't equally likely, are they? – saulspatz Apr 24 '20 at 22:56
• E = the fourth ball is black $A$= I chose the first box $B$= I chose the second box $P(E) = P(E|A) \cdot P(A) + P(E|B) \cdot P(B)$ and $P(E|A)$ is the possibility of $WWWB +$ the possibility of $BWWB +$ etc. Am I right? – CodingGuy Apr 24 '20 at 23:07

Using the OP conventions we can start with $$P(E) = P(E|A)P(A)+P(E| \overline A)P\overline A) \tag{1}$$ $$P(E|A)=\frac 12 ( \frac 27 + \frac 67) =\frac 47$$ ***** EDIT **************************

Thanks to @Daniel Mathias for pointing out that the above calculation is flawed because the condition that the first three balls are white results in Box #1 being more likely than box #2.

I will show a calculation leading to $$P(E|A)$$ here and edit below where the result is used... $$P(E|A) = P(1|A)P(E|1,A) + P(2|A)P(E|2,A)$$

$$P(A|1)= \frac 8{10} \cdot \frac 79 \cdot \frac 6{8} =\frac 7{15}$$ So $$P(1|A) = P(A|1) \cdot \frac {P(A)}{P(1)} = 2 P(A|1) = \frac{14}{15}$$ And $$P(2 | A) = 1- P(1|A) = \frac 1{15}$$ Finally $$P(E|A) =\frac{14}{15} \cdot \frac 27 + \frac{1}{15} \cdot \frac 67= \frac {34}{105}$$

********** END OF EDIT *************************

for $$P(E)$$ the unconditioned probability that the fourth ball drawn is black is the same as the unconditioned probability that the first ball drawn is black namely... $$P(E) = \frac 12 ( \frac 2{10} + \frac 6{10}) =\frac 25$$

****** Explanation of $$P(E)$$ ****************

Consider box #1. Each possibility for the first four choices can be represented as strings of 4 Ws and Bs. The probability of any given string only on the number of Bs, not on the order they appear in the string.

e.g for $$P(2B)$$ ... $$P(BBWW) = \frac 2{10} \cdot \frac 19 \cdot \frac 8{8} \cdot \frac 77=\frac 1{45}$$ $$P(BWWB) = \frac 2{10} \cdot \frac 89 \cdot \frac 7{8} \cdot \frac 17=\frac 1{45}$$ So the probability that B is first is \begin{aligned} &P(BWWW)+P(BBWW)+P(BWBW)+P( BWWB) \\ =&P(1B)+3P(2B) \\ =& \frac 2{10} \cdot \frac 89 \cdot \frac 7{8} \cdot \frac 67+3\cdot\frac 1{45} =\frac 15 \end{aligned}

We already knew that the probability was $$\frac 15$$ without having to sum all possibilities. The probability that B is fourth is \begin{aligned} &P(BWWB)+P(WBWB)+P(WWBB)+P( WWWB) \\ =&P(1B)+3P(2B) \\ =& \frac 15 \end{aligned}

******** END OF explanation ***************************

for $$P(A)$$ we can just use the hypergeometric distribution ...

$$P(A) = \frac 12 \left( \frac{\binom 83 \binom 20}{\binom {10}3} + \frac{\binom 43 \binom 60}{\binom {10}3}\right) =\frac 14$$

so $$P( \overline A) =\frac 34$$

now we can plug everything back into $$(1)$$ and solve for $$P(E| \overline A)$$ $$\frac 14\cdot \frac {34}{105} + \frac 34 \cdot P(E| \overline A) =\frac 25$$ solve to get... $$P(E| \overline A) = \frac{134}{315}$$

• Thanks for the answer. I just don't understand $P(E)$. I can't see why it's correct – CodingGuy Apr 25 '20 at 18:34
• I will edit my answer to include an explanation – WW1 Apr 25 '20 at 23:58
• $P(E|A)\neq\frac 47$ I find $P(E|A) = \frac{34}{105}$and $P(E| \overline A) = \frac{134}{315}$ – Daniel Mathias Apr 26 '20 at 3:52
• I see what you mean. Given the first three balls are white, it is more likely that box #1 was picked than box #2 – WW1 Apr 26 '20 at 20:53

On reflection, it may be easiest, or anyway least confusing, to do this by drawing tree diagrams. Here is a diagram for the case where we choose box $$1$$.

This shows four events: the choice of box 1 and the choices of the first $$3$$ balls. The only case in which they are all white is the left most branch, which has conditional probability $$\frac8{10}\frac79\frac68=\frac7{15}$$. We have to take $$\frac12$$ of this, since the probability of choosing box $$1$$ is $$\frac12$$. Looking at the tree, we see there are $$3$$ branches where we've chosen a black and a white, so the probability of choosing a black at this point is $$\frac17$$. (We ignore the cases where two blacks have been chosen, since there's no possibility of drawing a third black.) In each case the probability of making the $$3$$ previous choices and then choosing a black is $$4\frac37\frac28\frac79\frac8{10}=\frac1{15}$$. Again, we should multiply by $$\frac12$$.

Now we make the same kind of tree for the choice of box $$2$$, what will we get? The probability of getting $$3$$ whites is $$\frac{4}{10}\frac39\frac28=\frac1{30}$$ This time, we might get $$1$$ black and $$2$$ whites or $$2$$ blacks and $$1$$ white or $$3$$ blacks. There are $$3$$ ways for each of the first two possibilities to occur and and only one way for the third. Now as above, we work out the probabilities of drawing another black, add them up and multiply by $$\frac12$$. (Having seen how the first tree works out, you may well be able to get the results of the second without drawing the tree.)

We must add the two probabilities we computed for getting a black on the fourth choice, and divide by the probability that we didn't get three whites. This latter probability is $$\frac12\left(1-\frac7{30}\right)+\frac12\left(1-\frac1{30}\right)=\frac{13}{15}$$