<s>[INST] What is the probability of drawing balls until you get 3 matching colors? A bag has $50$ balls - $37$ red, $10$ white, and $3$ blue. I draw balls without replacement until I pull out $3$ of the same color. What is the probability of each color that it is the first to be drawn 3 times?
My attempt: I know I have at least $3$ draws and at most $7$. I used hypergeometric distribution to figure the probability of the first three balls being the same color (red $39.6\%$, white $0.612\%$, blue $0.0051\%$). I figured the same with $4$, $5$, $6$, and $7$ balls but I do not know if I'm going in the right direction, and if so, how to figure the total probability of each color?
 [/INST] You want the probability of, say, the third red being drawn before the third white, or third blue ; when there are 37 red, 10 white, 3 blue.
The probability that the third ball is red and the first two also red is $\left.{\binom{37}1\binom{36}{2}}\middle/{\binom{50}{1}\binom{49}{2}}\right.$
The probability that the fourth ball is red and two among the first three also red is   $\left.{\binom{37}{1}\binom32\binom{36}{2}\binom{13}{1}}\middle/{\binom{50}{1}\binom{49}{3}}\right.$
The probability that the fifth ball is red and two among the first four also red is   $\left.{\binom{37}{1}\binom42\binom{36}{2}\binom{13}{2}}\middle/{\binom{50}{1}\binom{49}{4}}\right.$
The probability that the sixth ball is red and two among the first five also red (yet not more than two of each other colour among the remaining 3) is: $\left.{\binom{37}{1}\binom52\binom{36}{2}\left[\binom 32\binom{10}2\binom 31+\binom31\binom{10}1\binom 32\right]}\middle/{\binom{50}{1}\binom{49}{5}}\right.$
The probability that the seventh ball is red and two among the first six also red (and only two of each of the other colour among the remaining 4) is: $\left.{\binom{37}{1}\binom62\binom{36}{2}\binom42\binom{10}2\binom 32}\middle/{\binom{50}{1}\binom{49}{6}}\right.$
$$\dfrac{37 \binom{36}2}{50}\left[\dfrac{1}{\binom{49}2}+\dfrac{\binom 31\binom{13}1}{\binom{49}3}+\dfrac{\binom42\binom{13}2}{\binom{49}{4}}+\dfrac{\binom 53\binom 32\left[\binom{10}2\binom 31+\binom{10}1\binom 32\right]}{\binom{49}5}+\dfrac{\binom64\binom 42\binom{10}2\binom32}{\binom{49}6}\right]$$
</s>