I'm working on a little side project that requires me to calculate the probabilities of certain successes being sampled from a population. I can do individual cases analytically, but I'm having a hard time programming a solution because the successes and the population are generated randomly. Here goes:
We have a bag of 25 marbles. There are eight blue marbles, two white ones and three clear ones. There are also twelve two tone marbles. Five of these are white/blue, three are blue/black and 4 are white/black. Of these two tone marbles, a subset of them have a red band around them. There are 2 red-banded white/black marbles and 1 red-banded white/blue marbles.
Two-tone marbles can count as either color on the marble, but not both. The red- banded two-tone marbles cannot be the last marble drawn unless another marble containing one of the red-banded marble's colors has already been drawn (the either or rule for two tone marbles does not apply here. If you draw a white/black marble followed by a white/blue banded marble, this is allowed even if the first marble is counting as black.). Any marble can also count as a clear marble, but clear marbles may only count as clear marbles. Draws are made without replacement.
What is the probability of drawing 'clear, clear, white, black' in no particular order? (Excepting the rule surrounding banded marbles.)