# A more complicated conditional probability of drawing balls from an urn

Suppose there are 12 balls in an urn: 4 red, 4 yellow and 4 black. We draw at random without replacement.

What is the probability that the 6th draw will be a yellow ball, given that in the first 5 draws, there was exactly 1 more red ball drawn than yellow?

My intuitive attempt:

There are only 3 possible outcomes in terms of yellow balls drawn already during the first 5 draws, i.e.:

• 0 yellow balls drawn (and 1 red, 4 black): let this be event $$A$$
• 1 yellow balls drawn (and 2 red, 2 black): let this be event $$B$$
• 2 yellow balls drawn (and 3 red, 0 black): let this be event $$C$$

Given that one of the 3 events above happened, but we don't know which one, we could be in any of the 3 possible sample spaces going forward: even though the above events have different probabilities, ultimately it is given that one of them happened with certainty, therefore we need not be concerned with probabilities that we condition on. Therefore the answer can be computed as (i.e. equal probability that we are in any of the three possible sample spaces):

$$\frac{1}{3}\left(\frac{4}{7}+\frac{3}{7}+\frac{2}{7}\right)=\frac{3}{7}$$

Is the above the correct answer?

• Are you assuming that the three conditioning events $A,B,C$ are equally probable? Why? Event $A$, for example, is quite improbable.
– lulu
Oct 4 at 16:16
• @lulu I used the same logic to answer a more complicated version of this puzzle here and seemed to have got the right answer, so I wonder if my logic works by "coincidence" or there is something else going on here. Oct 4 at 16:27
• Just work out the three probabilities. Note, as this is a conditional probability question, the three won't sum to 1 and you should divide by the sum.
– lulu
Oct 4 at 16:29

To elaborate on the discussion in the comments:

The events $$A,B,C$$ are not equally probable. Indeed, given that we are told that exactly one more red than yellow ball was drawn, we can be pretty confident that we are in case $$B$$, but $$A,C$$ are still possible (and not equally likely).

To be precise: With $$i\in \{0,1,2\}$$ let $$p_i$$ be the probability that $$i$$ yellow and $$i+1$$ red were drawn in the first $$5$$ draws. Then we have $$p_i=\binom 4i\times \binom 4{i+1}\times \binom 4{5-2i-1}\Big / \binom {12}5$$

Numerically, we have $$\{p_i\}=\{.005\overline {05}, \,.\overline {18},\,.\overline {03}\}$$

confirming the intuitive claim that $$B$$ was the most likely. The conditional probability you want is then given by $$\frac {p_0\times 4/7+p_1\times 3/7+p_2\times 2/7}{p_0+p_1+p_2}=.41196$$

which is (slightly) less than $$\frac 37$$ (reflecting the fact that case $$A$$ is considerably less probable than case $$C$$).

• So both mine and @TrueBlueAnil's thinking are incorrect. I am now totally perplexed as to why I managed to get a correct answer using the same logic for the other question linked in the comment above. Oct 4 at 17:43
• I don't see any question linked to in the post. Perhaps the cases were equally probable in that question. If you provide a link, I'll take a look.
– lulu
Oct 4 at 17:53
• Oct 4 at 17:55
• Note that the comments to your proposed solution to that problem say that you can not assume the events are equally probable. One of the commenters says that perhaps this follows from the fact that you are exactly half way through (which is not the case in the current problem) but you don't use that fact anywhere, so I don't think your argument in that case is correct either, whether it happens to yield the right answer or not.
– lulu
Oct 4 at 17:58
• Note that in the other problem, there is indeed an obvious symmetry, as you can look at the draws in either order. Perhaps that symmetry implies what you need, but you certainly need something like that, otherwise the argument is incomplete or simply wrong. In the current problem, had it happened that $P(A)=P(C)$ then your answer would have been correct (though the argument would still have been wrong).
– lulu
Oct 4 at 18:00

This is a response to the secondary question in the comments:

I wonder if my logic works by "coincidence" or there is something else going on here.

You came up with the right answer in a case where there were $$7$$ different colors of balls, $$20$$ balls of each color, and $$70$$ balls had already been drawn, that is, exactly half of the balls had been drawn and half remained in the urn.

Also, rather than $$1$$ more red ball drawn than yellow, you had $$5$$ more red balls than yellow balls already drawn. So there were $$16$$ possible cases of different numbers of yellow balls remaining, from $$5$$ yellow balls to $$20$$ yellow balls, and your calculation of the probability of drawing a yellow ball next was

$$\frac{\frac{20}{70}+\frac{19}{70}+\frac{18}{70}+\frac{17}{70}+\frac{16}{70}+\frac{15}{70}+\frac{14}{70}+\frac{13}{70}+\frac{12}{70}+\frac{11}{70}+\frac{10}{70}+\frac{9}{70}+\frac{8}{70}+\frac{7}{70}+\frac{6}{70}+\frac{5}{70}}{\small 16}.$$

Now keep in mind that drawing a sequence of balls without replacement is equivalent to lining up all the balls in a line in random order and then counting off balls from the front of the line. In this problem we have a line of $$140$$ balls with $$70$$ balls in the first half (already drawn) and $$70$$ balls in the second half (not yet drawn).

Consider the first and last terms in the numerator. The first term comes from the case where $$5$$ red balls are in the first half of the line and $$20$$ yellow balls are in the second half of the line. The last term comes from the case where $$20$$ red balls are in the first half of the line and $$5$$ yellow balls are in the second half of the line.

It should not be hard to see that when we randomly line up $$140$$ balls of $$20$$ balls each of $$7$$ colors, the chance of having $$5$$ red balls in the first half and $$20$$ yellow balls in the second half is the same as the chance of having $$20$$ red balls in the first half and $$5$$ yellow balls in the second half. So if we want to know the probability that the $$71$$st ball is yellow, given that one of those two events happened, it is correct to give them equal weight:

$$\frac{\displaystyle\frac{20}{70}+\frac{5}{70}}{2} = \frac{25}{140} = \frac{5}{28}.$$

Now consider the second term and the second term from the end of the numerator. Now we have either $$6$$ red balls in the first half and $$19$$ yellow balls in the second half, or $$19$$ red balls in the first half and $$6$$ yellow balls in the second half. Again, these two cases have equal probability, so if we are given that one of these two events occurred, the probability the next ball is yellow is $$\frac{\displaystyle\frac{19}{70}+\frac{6}{70}}{2} = \frac{5}{28}.$$

Similarly for the two terms $$\dfrac{18}{70}$$ and $$\dfrac{7}{70}$$, the two terms $$\dfrac{17}{70}$$ and $$\dfrac{8}{70}$$, and so forth all the way down to the middle two terms, $$\dfrac{13}{70}$$ and $$\dfrac{12}{70}$$.

That is, we have eight pairs of terms corresponding to eight disjoint events, and the union of all those events is the event we want to condition upon. So we can compute the desired conditional probability by taking the weighted average of the conditional probabilities conditioned on each of the eight events, weighted by the respective probabilities of each event to occur.

Let's suppose the probabilities of the eight disjoint events are respectively $$p_1$$, $$p_2$$, $$p_3$$, $$p_4$$, $$p_5$$, $$p_6$$, $$p_7$$, and $$p_8$$. Then the weighted average is

$$\begin{multline} \frac{\displaystyle\frac5{28}p_1 + \frac5{28}p_2 + \frac5{28}p_3 + \frac5{28}p_4 + \frac5{28}p_5 + \frac5{28}p_6 + \frac5{28}p_7 + \frac5{28}p_8}{p_1 + p_2 + p_3 + p_4 + p_5 + p_6 + p_7 + p_8} \\ = \frac{{\displaystyle\frac5{28}}(p_1 + p_2 + p_3 + p_4 + p_5 + p_6 + p_7 + p_8} {p_1 + p_2 + p_3 + p_4 + p_5 + p_6 + p_7 + p_8} = \frac5{28}. \end{multline}$$

So it turns out that the probabilities that we assign to the cases for $$20$$ remaining yellow balls, $$19$$ remaining yellow balls, and so forth don't cause any change in the result as long as the individual probabilities are symmetric across that list of $$16$$ different cases. And a symmetric set of probabilities gives the correct answer because the actual probabilities are symmetric, which is because we started with an equal number of red and yellow balls and we have drawn exactly half of all the balls already.

So it isn't just a wild coincidence that we can get the correct answer by using your simple (and theoretically flawed) method for the $$140$$-ball problem. Your method gets the correct answer in this particular problem because it assigns probabilities to the $$16$$ events uniformly, which is a symmetric distribution, and because any symmetric distribution (including the correct one) gives the same numeric answer.

When it comes to this question, however, where we start with $$12$$ balls and have drawn only $$5$$, the probabilities of the various cases for each remaining number of yellow balls are not symmetric, so we cannot combine them in pairs as in the $$140$$-ball problem and we cannot safely substitute another symmetric set of probabilities (such as all equal probabilities).

If you had drawn $$6$$ balls and then asked for the probability that the $$7$$th was yellow, we would again have the line of balls split into two halves. There would only be two possible cases: $$2$$ red balls in the left half and $$3$$ yellow balls in the right half, or $$3$$ red balls in the left half and $$2$$ yellow balls in the right half. (It is not possible to have $$1$$ red ball in the left half, because then you could not have any yellow balls and there are not enough black balls to draw six balls with only one ball of any other color.) Naturally, the probabilities of these two events are equal (specifically, both are $$\frac{8}{77}$$) and therefore you can take a simple average.

So what makes your method give the correct answer isn't the particular number of colors, the particular number of balls of each color, or the particular difference between the number of red balls and yellow balls already drawn. The key points are that the number of red balls and the number of yellow balls are initially equal, and you have drawn exactly half of the balls when you ask about the probability that the next ball is yellow.

• Thank you, David, I really appreciate your answer, it has helped me to further understand where I went wrong. Oct 5 at 8:28