# We have two red, two white and two green marbles in an urn

We have two red, two white and two green marbles in an urn. We pick them one by one out of the urn and record their colors. Find the probability that at some point we will pick the same color back to back. For example, this happens when we get the sequence red, white, white, green, red, green, but also if we get red, red, white, white, green, green.)

So far I have the following.

Note that if we think about this problem as a sequence $$(x_1,x_2,x_3,x_4,x_5,x_6)$$ of the balls. Note that if we fix one of the balls, then we have a $$\large\frac{4}{5}\cdot\frac{3}{4}$$ chance of not picking the same color next to it. hence the probability of picking two consecutive balls of the same color is equal to $$\large 1-\frac{3}{5}=\frac{2}{5}.$$

However I am not confident in my reasoning and I think I have made a mistake.

Any help is much appreciated.

• What do you mean by "the same color back to back."? At least in two consecutive extractions the balls have the same color? – Robert Z Feb 8 at 10:10
• @RobertZ Indeed. – Gaby Alfonso Feb 8 at 10:11
• After one ball, your chance of picking the same again is $\frac{1}{5}$. Hence $\frac{1}{30}$ can't be quite right. – Klaus Feb 8 at 10:11
• Anyone else feel that, given the answer, there must be a simple combinatorial explanation? – AakashM Feb 8 at 12:21

You can also just count the following way: $$\frac{1}{5} + \frac{4}{5} \left[ \frac{1}{4} + \frac{2}{4}\frac{1}{3} + \frac{1}{4} \left(\frac{2}{3}\frac{1}{2} + \frac{1}{3}\right)\right] = \frac{2}{3}$$ In words: The first marble can be an arbitrary one (say red). Then the second one is either red (with $$1/5$$ probability) or it is not (with $$4/5$$ probability, say white). In this case either the third marble is white ($$1/4$$), or green ($$2/4$$ for the remaining not yet drawn one) in which case we must draw it again ($$1/3$$ probability), or we draw the first already drawn (red) one with $$1/4$$ probability. In the last case there remains the possibility to either now draw the green - not yet drawn - one with $$2/3$$ probability and we must draw it again to succeed - by then only 1 green and 1 white are left in the urn - which gives a factor $$1/2$$, or we draw the overall second (white) one with $$1/3$$ probability which just leaves 2 green marbles in the urn and we are done.

You may use the inclusion-exclusion principle. The number of ways when at least two consecutive balls have the same color is $$|R\cup W\cup G|=\underbrace{3\cdot 5 \cdot \frac{4!}{2!2!}}_{|R|+|W|+|G|}-\underbrace{3\cdot 2 \cdot \binom{4}{2}}_{|R\cap W|+|W\cap G|+|G\cap R|}+\underbrace{6}_{|R\cap W\cap G|}=60$$ where $$R$$ is the set of extractions where the two red balls are picked up back to back ($$W$$ and $$G$$ have similar definitions). Therefore the probability is $$p:=\frac{60}{\frac{6!}{2!2!2!}}=\frac{60}{90}=\frac{2}{3}.$$

• I have the same number for at least one couple, which is $90$. But this is the same number of all possible outcomes. So I doubt that this can be true. – callculus Feb 8 at 10:38
• Here "at least one couple" means at least one couple red+ at least one couple white+ at least one couple green. – Robert Z Feb 8 at 10:41
• @callculus it is a probability multiplied with $3$. The $3P(R)$ in my answer. – drhab Feb 8 at 10:43
• Ah, ok. It´s clear now. – callculus Feb 8 at 10:44

Let $$R$$ denote the event that the red balls are picked out back to back.

Let $$W$$ denote the event that the white balls are picked out back to back.

Let $$G$$ denote the event that the green balls are picked out back to back.

Then applying inclusion/exclusion and symmmetry we find: $$P(R\cup W\cup G)=3P(R)-3P(R\cap W)+P(R\cap W\cap G)=$$$$3\frac5{\frac{6!}{2!4!}}-3\frac{12}{\frac{6!}{2!2!2!}}+\frac{6}{\frac{6!}{2!2!2!}}=\frac{15}{15}-\frac{36}{90}+\frac6{90}=\frac23$$

In the first turn, there are 6 possible marbles to draw. To avoid the same color in the next turn, there are only 4 possible marbles left. If in the third turn, we pick the first color again, there are only two ways of drawing the remaining marbles (the color on the fifth turn needs to be the same as the one on the second turn). If instead we pick the third color on the third turn, there are three marbles of three different colors left, which can be drawn in four ways (the color on the fourth turn cannot match the one on the third turn). The number of valid draws is thus:

$$6 \cdot 4 \cdot (1 \cdot 2 + 2 \cdot 4) = 240$$

The probability of drawing the same color in successive turns then equals:

$$\frac{6! - 240}{6!} = \frac{720 - 240}{720} = \frac{480}{720} = \frac{2}{3}$$

I would do this with a simple decision tree. Whatever the first colour picked up is, there is one more marble of the same colour, and it could with equal probability be in any one of the remaining five positions. If it is the next one, we win; that $$\frac15$$ in the bag. Otherwise it depends, on the other colours, in the remaining positions that are split up by the second marble in the first colour into groups as $$1+3$$, $$2+2$$, $$3+1$$ or $$4+0$$ (the $$0+4$$ case was the one where we already had a pair). The patterns for the four draws of other colours are $$AABB$$, $$ABAB$$ and $$ABBA$$ with equal probabilities. The $$AABB$$ is always a win, $$ABAB$$ is always a loss, and $$ABBA$$ is a win unless the groups were split $$2+2$$. So we take the $$2+2$$ case separate with a $$\frac13$$ chance, and the three other splits contribute $$\frac23$$ of their weight. All in all the chance to win is $$\frac15+\frac15\times\frac13+\frac35\times\frac23=\frac{3+1+6}{15}=\frac23.$$

You can also brute-force it. If you call A the first color you see, B the second and C the third, there are only 15 possible patterns:

AABBCC, AABCBC, AABCCB, ABABCC, ABACBC, ABACCB, ABBACC, ABCABC, ABCACB, ABBCAC, ABCBAC, ABCCAB, ABBCCA, ABCBCA, ABCCBA.

The bold ones are those with 2 successive marbles of one color. They are 10 out of 15. That is a probability of 2/3.

We're going to play a game. Here are the rules:

• A game position is a pair $$(x,\bar y)$$ of a natural number $$x$$ and a bag of positive numbers $$\bar y$$.
• To make a move, pick $$y \in \bar y$$. If $$x>0$$, the next game position is $$(y-1, (\bar y\backslash\{y\})\cup\{x\})$$; otherwise don't insert $$x$$ and arrive at the next game position of $$(y-1,\bar y\backslash\{y\})$$.
• We win the game by getting to game position $$(0,\{\})$$.

To reduce brackets, let's write e.g. 3,2579 as an abbreviation for $$(3,\{2,5,7,9\})$$. Here's some example moves we could make in this game:

• 3,57 $$\to$$ 4,37 by picking 5
• 3,57 $$\to$$ 6,35 by picking 7
• 2,1223 $$\to$$ 0,2223 by picking 1
• 2,1223 $$\to$$ 1,1223 in two different ways by picking either of the two 2's in the bag
• 2,1223 $$\to$$ 2,1222 by picking 3
• 0,2222222 $$\to$$ 1,222222 in seven different ways

The game may seem a bit odd at first, but it corresponds exactly to drawing balls from an urn without ever seeing two of the same color ball twice in a row. The numbers in $$\bar y$$ represent how many balls of each color are in the urn; the number $$x$$ represents how many balls there are of the color we drew last. So drawing a ball decrements one of the numbers in the sequence (that isn't the color we drew last), and puts all the balls of the color we drew last back in the urn.

With this setup, we can phrase your question this way: how many ways can we win from position 0,222? Using $$\#p$$ for the number of ways to win from position $$p$$, we can calculate:

\begin{align*} \#0,222 &= 3\cdot\#1,22 \\ &= 3\cdot2\cdot\#1,12 \\ &= 3\cdot2\cdot(\#0,12 + \#1,11) \\ &= 3\cdot2\cdot((\#0,2 + \#1,1) + 2\cdot\#0,11) \\ &= 3\cdot2\cdot((\#1, + \#0,1) + 2\cdot2\cdot\#0,1) \\ &= 3\cdot2\cdot((0 + 1) + 2\cdot2\cdot1) \\ &= 30 \end{align*}

Meanwhile, to compute the total number of ways we can draw balls from the urn (both with and without back-to-back duplicates), there are

$$\frac{6!}{2!\cdot2!\cdot2!} = 90$$

distinguishable sequences of draws. This gives a $$30/90=1/3$$ chance of not seeing doubles (or $$2/3$$ chance of seeing doubles).