0

I am trying to figure out the formula for the following problem:

I have one bag containing n balls. m of those balls are green, and the others are red.

I am going to extract all the balls one by one and at the end I want to check whether I had groups of x or more green balls extracted consecutively.

Here is an example with numbers: if I have 28 balls, 10 green and 18 red, what's the probability that I extract 3 or more green balls consecutively (at any point of the extraction process)?

Ѕᴀᴀᴅ
  • 34,263
  • What are your efforts/what have you tried so far? – YukiJ Apr 25 '18 at 11:00
  • Hi YukiJ, I am looking at the hypergeometric distribution, but I am not sure that it works as my understanding is that it does not consider the order of the extraction. – user1472709 Apr 25 '18 at 11:21
  • potential (near) duplications: https://math.stackexchange.com/questions/2746110/how-many-possibilities-are-there-for-at-least-k-consecutive-heads-to-show-up-o and https://math.stackexchange.com/questions/2749916/probability-of-a-run-of-3-heads-when-i-flip-a-coin-n-times -- if your question is indeed the same, there is no simple answer – antkam Apr 25 '18 at 12:49
  • The two problems are similar indeed, but not quite the same. In fact, they assume "replacement", i.e. the coin is always the same. In the case of extraction without replacement, the set of available outcomes decreases, so the a hypergeometric distribution should be assumed (but order counts..) – user1472709 Apr 25 '18 at 15:18
  • oh! of course! silly me... mixing up coins and balls :) So in your case the size of the sample space is ${n \choose m}$, right? Still don't know how to solve it, as Inclusion-Exclusion seems really messy as the runs can overlap. – antkam Apr 25 '18 at 16:11

1 Answers1

0

Hint: This is a simple example of the hypergeometric distribution. Let me know if you need more help.

  • That's a great hint and I think it mostly describes the problem, thank you. However, I am also interested in the order of the extraction, not only to know that I have extracted x number of green balls.

    In other words, the first example provided here https://en.wikipedia.org/wiki/Hypergeometric_distribution is not complete as does not tell me whether the balls were extracted consecutively, I reckon.

    – user1472709 Apr 25 '18 at 11:11