Finding the probability of drawing all balls of the same color when there is a "wildcard" ball I am working on a practice exam question for my Probability Theory class and am confused about a solution my professor gives us.
The problem is as follows:
There is a box with 16 balls in it, 4 red, 4 green, 4 blue, and 4 rainbow. If we pick at random 5 balls without replacement, what is the probability that all 5 balls are of the same color, if we allow the rainbow balls to take any color?
I know that the sample space would be $16 \choose 5$. I also know that the probability of this would generally be $P(\text{4 red balls, 1 rainbow}) + P(\text{4 green balls, 1 rainbow}) + P(\text{4 blue balls, 1 rainbow})$. However, I'm not quite sure how to actually count all of these.
My initial thinking is to use the conditional approach and do something along the lines of:
$\frac{4}{16} * \frac{3}{15} * \frac{2}{14} * \frac{1}{13} * \frac{4}{12}$
Essentially, the probability of picking 1 ball of a specific color multiplied by the probabilities of picking another ball of that same color, and then finally multiplied by the probability of picking 1 of the rainbow balls. This doesn't seem right to me, however as I feel like I need to account for the fact that you could pick a rainbow ball at any point in there.
Could someone guide me on this? Thank you!
 A: As @whuber points out in the comments, we can have $5$ balls of the same color with more than just 1 rainbow ball in the sample. This answer is based on the assumption that these sets also count.

Try finding the probability of getting five "red" balls. There are $8$ red balls (counting the rainbow) and $8$ non-red balls. This reduces to the usual univariate hypergeometric distribution, and has probability
$$P(\text{all reds}) = \frac{\binom{8}{5}\binom{8}{0}}{\binom{16}{5}}.$$
To get a final answer, we can simply multiply by 3 since
\begin{align}
P(\text{all same color}) &= P(\text{all reds} \cup \text{all blues} \cup \text{all greens}) \\[1.5ex]
&= P(\text{all reds}) + P(\text{all blues}) + P(\text{all greens}) \\[1.5ex]
&= 3P(\text{all reds}) \\[1.5ex]
&\approx 0.03846
\end{align}
Note: We might also need to include $\{\text{all rainbows}\}$ as an event in some versions of this problem, but this event has probability zero so I just ignored it here for simplicity.

A General Solution
I thought it might be interesting to include a general solution for this problem. Let's assume there are $M$ colors, with $n_1, n_2, \ldots n_M$ balls of each color and $n_0$ rainbow colored balls. We will sample $k$ balls without replacement. We will also assume that drawing $k$ rainbow balls counts as all the same color.
\begin{equation}
P(\text{all color $i$}) = 
\begin{cases}
\frac{\binom{n_0 + n_i}{k}}{\binom{n_0 + n_1 + n_2 + \ldots n_M}{k}}, & n_0 + n_i \geq k \\
0, & \text{otherwise}
\end{cases}
\end{equation}
The "all rainbow" case can be molded into this equation by treating it as the $(M+1)^{th}$ color with $n_{M+1} = 0$.
Finally, lets define $N= \sum_{i=1}^M n_i$ (for brevity) and take the convention that $\binom{a}{b} = 0$ whenever $a < b$.
\begin{align}
P(\text{all same color}) &= P\left(\bigcup_{i=1}^{M+1}\text{all color i}\right) \\[1.5ex]
&= \sum_{i=1}^{M+1}P(\text{all color $i$}) \\[1.5ex]
&= \sum_{i=1}^{M+1}\frac{\binom{n_0 + n_i}{k}}{\binom{N}{k}}
\end{align}
A: if you want to find the probability P(4 balls of same color and 1 rainbow colored ball) then it would be
$$ \frac{4}{16} \times \frac{3}{15} \times \frac{2}{14} \times \frac{1}{13} \times \frac{4}{12} \times \frac{5!}{4} \times 3  = 0.002747...$$
we multiply by 5!/4 if we don't care about the order in which we pick those balls(there would be 5 different permutations, rainbow first then colored ones or rainbow second and so on) and we multiply by 3 because there are three colors (excluding rainbow) you could also just add it three times.
If the rainbow colored balls can be considered of any color then the answer could be different for example if we pick 3 red and 2 rainbow colored balls does that also count as all red? if not then I believe the above answer is correct.
Edit: if for example 2 rainbow balls and 3 red balls also count as all red then the answer provided by @knrumsey is correct one, if sets like this don't count then the answer provided above is correct
