I have a bit of a twist on a classic problem here.

I have a bag of $R$ red marbles, $G$ green marbles and $P$ pain in the purple marbles. I will draw $n$ marbles from the bag and am looking for the probability that I will have chosen exactly $r$ red marbles. So if the purple marbles were not special, I would have:

$Prob(r) = \dfrac{\binom{R}{r}\binom{G+P}{n-r}}{\binom{R+G+P}{n}}$

The change I need to make is that if a purple marble is drawn (or removed) from $P$, one of two things happens.

  • If there are any red marbles left, I will remove one of $R$ (I still count it towards $r$, but the "removed" marble does not count towards $n$)

  • If there are no red marbles left, I will remove one randomly from $G+P$ (again, not counting this extra "removed" marble towards $n$ BUT if it is a purple marble I will continue this step until a non-purple marble is removed)

This means that the total number of marbles taken from the bag will be the number drawn $n$ plus the number removed after getting a purple marble $p$.

I think that I will need to split this up based on both $p_{early}$ and the number of $p$ that happened before the bag ran out of red marbles, but I have had no luck so far. Any ideas on how to tackle this type of problem?

  • $\begingroup$ What happens if the $n^{th}$ marble is purple? Do you draw another? Would it count if the next one is red? If you draw purple on number $5$, does the red you pull count as draw $6$? $\endgroup$ – Ross Millikan Mar 6 at 15:48
  • $\begingroup$ If the $n^{th}$ draw is purple I will draw another marble. If that extra drawn marble happens to also be purple I will draw again until I get a non-purple. If this draws a red I will count it. If I draw a purple on the second to last draw, that will remove (maybe) a red marble and then, after that, I will take my $n^{th}$ draw. I will update the question to make this clearer. $\endgroup$ – Hoog Mar 6 at 15:56

As long as the desired number of red marbles is less than the total number you can just draw $n$ marbles without worrying about the purples, then replace all the purples you get with reds. You therefore want the chance you get $r$ marbles that are red or purple out of $n$ draws. The chance is then $$\frac {{R+P \choose r}{G \choose n-r}}{R+P+G \choose n}$$
If $r=R$ you just need to get at least $R$ of the purple and red marbles in the original draw. You need to sum over the possible numbers from $R$ to $R+P$ or $n$, whichever is less.

  • $\begingroup$ Thank you @RossMillikan this is exactly what I needed to continue! $\endgroup$ – Hoog Mar 6 at 17:59
  • $\begingroup$ I just realized it is not correct because in your process when you draw a purple ball there are two purple+red balls removed before the next draw, while in mine there is only one. I’ll think some more. $\endgroup$ – Ross Millikan Mar 6 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.