Probability of 4 colors sequence with repetition (8 choices of color)

combinationspermutationsprobability

Knowing that the sequence contains exactly two colors, what is the probability that one of the two colors will be repeated exactly three times?

$A =$ The probability that one of the two colors will be repeated exactly three times.

$B =$ The probability the sequence contains exactly two colors.

I know there are $8^4 = 4096$ possible sequences. Select $2$ colors among $8 \binom82 = 28$, choose $2$ place among $4\binom42 = 6$.

I'm not sure but I think $P(A\mid B) = \frac8{14}$. Knowing that a color is repeated at least twice, what is the probability that it will be repeated exactly
three times?

$A =$ The probability that a color is repeated at least twice.

$B =$ The probability that a color is repeated exactly three times.

Best Answer

Your first answer is correct. It is not important which two colors are present and you can start from the point that the sequence of four has two colors.

Number of arrangements where two chosen colors are present $ = \displaystyle {2^4 - 2} = 14$. We basically take out two arrangements where only one of the two colors is present.

Arrangements where one of them is present exactly $1$ time (and so other $3$ times) $ = \displaystyle 2 \cdot 4 = 8$

So probability $ = \displaystyle \frac{8}{14} = \frac{4}{7}$.

For the second question, for a given color to repeat at least two times in sequence of four, below are the possibilities.

$(i)$ it repeats four times: $1$ arrangement
$(ii)$ it repeats three times: $4 \cdot 7 = 28$ arrangements
$(iii)$ it repeats two times: $\displaystyle {4 \choose 2} \cdot 7 + {4 \choose 2} \cdot2 \cdot{7 \choose 2} = 294 $ arrangements

Explanation - In $(ii)$, we choose three positions out of four and for the last there is choice of $7$ colors.
In $(iii)$, we choose two positions for the given color and for the other two positions, we either have $1$ of the $7$ colors or we have $2$ of the $7$ colors and also their positions can swap.

Now probability of $(ii)$ is $\displaystyle \frac{(ii)}{(i)+(ii)+(iii)} = \frac{28}{323}$