Probability of collecting 3 balls of a kind There are a lot of balls, each color has more than or equal to 3 balls.
Now pick up the ball randomly one by one without replacement.
What is the probability that the first color collected 3 of a kind is red.
For example 6 red balls, 7 blue balls, 8 yellow balls and 9 green balls.
I can solve this question by Markov chain, but it turns out to be too complicated, so I would like to seek for alternative method, thank you.
 A: Let us consider the general problem: there are $N_1,N_2,\dots,N_k$ balls of $k$ colors. What is the probability of the event that the first color witn $n $ collected balls is the color "1"?
Obviously the above event is realized if the sequence of balls drawn before the $n$-th ball of color "1" contains besides $n-1$ balls of this color at most $n-1$ balls of any other color. We shall refer to such sequences as "good".
With this observation the probability in question reads:
$$\small
\frac{\sum\limits_{0\le n_2,n_3,\dots n_k<n}\color{red}{\binom{N_1}{n-1}\binom{N_2}{n_2}\cdots\binom{N_{k}}{n_{k}}(n-1+n_2+\cdots+n_k)!}\color{magenta}{(N_1-n+1)}\color{blue}{(N_1-n+N_2-n_2+\cdots+N_k-n_k)!}}{(N_1+N_2+\cdots+N_k)!}\\
=\frac{n}{N_1+N_2+\cdots+N_k}\sum\limits_{0\le n_2,n_3,\dots n_k<n}\frac{\binom{N_1}{n}\binom{N_2}{n_2}\cdots\binom{N_k}{n_k}}{\binom{N_1+N_2+\cdots+N_k-1}{n+n_2+\cdots+n_k-1}},
$$
where the $\color{red}{\text{red}}$ term counts the number of good sequences, the $\color{magenta}{\text{magenta}}$ term counts the number of ways to choose the $n$-th ball of the 1st color, and $\color{blue}{\text{blue}}$ term counts the number of ways to arrange the rest balls. The second line is a trivial simplification of the first one. I did not check if the expression can be furter simplified.
A: Here's another way to do it, but it's still a lot of work.  I'd want to write a computer program.  Consider the situation just before the third red ball is drawn.  We've previously drawn $2$ red balls, and from $0$ to $2$ of each of the other $3$ colors, so there are $27$ possibilities.  For each of these possibilities, compute the probability that the situation arises and multiply by the probability that the next draw is red.  Add up the results for all $27$ cases.
One example will sufficiently indicate the computations.  Suppose we have chosen $2$ red balls, $2$ green balls, $1$ yellow ball and one blue ball.  There are $\frac{6!}{2!2!}=180$ permutations of the string "RRGGYB".  For each of these, we have $6\cdot5$ ways to choose the red balls, $9\cdot8$ ways to choose the green balls, $8$ ways to choose the yellow ball, and $7$ ways to choose the blue ball, giving $6\cdot5\cdot9\cdot8\cdot8\cdot7$ ways  in all.  We have chosen $6$ balls from $30$ so there were $30\cdot29\cdot28\cdot27\cdot26\cdot25$ possible choices.  Now there are $24$ balls left, and $4$ of them are red, so the probability that the next draw is red is $\frac4{24}.$  The probability for this case is $$\frac{180\cdot6\cdot5\cdot9\cdot8\cdot8\cdot7}{30\cdot29\cdot28\cdot27\cdot26\cdot25}\cdot\frac4{24}$$
I wrote a python script to do the indicated calculations for each color, and it seems to have worked correctly, in that the computed probabilities sum to $1$.
Here's the script:
from itertools import product
from math import factorial

def probabilities(balls, goal):
    '''
    balls is the list a the number of balls of each color
    goal is the number of balls of one color to be drawn
    returns a list of the probabilities that each color wins
    '''
    if min(balls)<goal:
        raise ValueError('Each color must have at least goal balls')
    answer = []
    for idx, b in enumerate(balls):
        answer.append(winner([b]+balls[:idx]+balls[idx+1:],  goal)) 
    return answer

def winner(balls, goal):
    '''
    Compute probability that the winner is the first color
    in the list.
    '''
    n = sum(balls)
    others = balls[1:]
    answer = 0
    for p in product(range(goal), repeat = len(others)):
        total = ((goal-1),) + p
        num = factorial(sum(total))
        for idx, t in enumerate(total):
            num //= factorial(t)
            b = balls[idx]
            num *= factorial(b)/factorial(b-t)
        left = n-sum(total)
        den = factorial(n)//factorial(left)
        draw = (balls[0]-goal+1)
        answer += (num/den)*(draw/left)
    return answer
        
probs= probabilities([6,7,8,9], 3)
print(probs)
print(sum(probs))

and the output:
[0.13806360223151828, 0.2058007126972644, 
0.28417096812898923, 0.37196471694222827]
1.0000000000000002 

