Originally Posted by

**neofit** The bin contains 45 balls: 10 blue, 15 red and 20 green balls.

They are being picked one by one. Once 5 balls of one colour were picked, the procedure stops.

Calculate:

1) The probability of the last ball picked to be a)blue, b)red, c)green

2) Average number of balls to be picked until the procedure stops

3) The probability of the procedure to be more then 9 balls?

We have the probability space containing possible 5,6,7,8,9,10,11,12,13 picks

for each number of picks for every colour we have to calculate all the probabilities for all the colours separately

for example

if A-blue ball picked, B-red ball picked, C- green ball picked, then

But i got into a wall here, because there are so many possible options, and moreover much more different probabilities...

Can somebody help solving it different way or creating an algorithm to program here?