# Drawing balls with two features

Suppose that I have a total of 1000 balls in a bag. 400 balls are labeled a and remaining 600 balls are labeled b. In addition, within the same 1000 balls, 60 balls are white and remaining 940 balls are black.

Now, if I conduct an experiment of picking a ball one after other without replacement, lets say 30 times, how can I compute the probability that I would have at least 20 balls that are white and labeled a? I would like to basically know how probable is this event of picking 20 balls that are white and labeled a out of 30 events, given this setup, due to chance.

And its not a homework question.

Thank you!

• Sorry to be skeptical, but if it isn't a homework question then what is the context? Are you working through a probability textbook on your own? Or is there some specific research question this maps to? Jun 28, 2012 at 12:58
• its a biolgical experiment and the bag of balls correspond to the number of genes and a and b correspond to different type of events and white and black to another type of events. I thought it would be difficult to explain the whole problem in context.
– Arun
Jun 28, 2012 at 13:08
• Thanks for the clarification. What can we say about the joint probabilities, i.e. P(white,a) ? I think the question can't be answered unless we're willing to make some assumption about that (the most obvious thing would be to assume independence, but that may not be sensible in this context) Jun 28, 2012 at 13:40
• Ben, thanks for the reply. I presumed the same. I wonder if its possible to answer this question though instead. If there are 1000 genes and experiment 1 gave 400 interesting events and experiment 2 gave 60 interesting events and there is an overlap of 40. How can I tell if the overlap between the 2 experiments is significant or not?
– Arun
Jun 28, 2012 at 14:02
• @Arun Can you edit your question to this what you have mentioned or post a new one?
– user88
Jun 28, 2012 at 16:19

As people pointed out in the comments, your description doesn't say whether the number of balls which are white and labelled $a$ is $60$ (all white are labelled $a$), $24$ (the label is independent of the color), or $0$ (all white are not labelled $a$). However, what you can say is that it is quite unlikely to get $20$ out of $30$ white balls labelled $a$ if the balls are chosen uniformly. This would be most probable with $60$ white balls labelled $a$, and it's still astronomically unlikely.
The relevant distribution is a hypergeometric distribution. If you assume that there are $60$ white balls labelled $a$ in the population of size $1000$, then the chance to get exactly $20$ out of $30$ is
$$\frac{{60 \choose 20}{940 \choose 10}}{1000 \choose 30} \approx 2.44 \times 10^{-19}.$$
However, instead of the exact chance to get $20$, you should consider the chance to get $20$ or more, which is $2.49 \times 10^{-19}$. This is an upper bound for the chance that $20$ out of $30$ will be both white and labelled with $a$.