Using multivariate hypergeometric distribution to compute probability of multiple events I am new here. I have researched this for over a month and spoken to 3 University professors and have not quite gotten the accuracy I am looking for.
I am writing C# to compute probability based on user input and information in a database. I can calculate the probability of drawing at least x in a hand of y cards from a deck of N cards where the number of successes in N = m. This is assuming WITHOUT replacement.
For example, if I want to know what the probability of drawing at least 3 cards of type A in a hand of 7 cards from a deck of 60 cards where there are 10 cards of type A, I would do the following:
Using hypergeometric distribution formula, find probability of drawing exactly 3, exactly 4, exactly 5, exactly 6 and exactly 7. Then add those. My calculations appear to be correct. (If not, please explain)
What I want to do is introduce a second or even a third condition. For instance, picking at least 2 of type A, at least 1 of type B, and at least 3 of type C. I think that in this example the following would be correct:
outcome1 = exactly 2 A * exactly 1 B * exactly 3 C 
outcome2 = exactly 3 A * exactly 1 B * exactly 3 C
outcome3 = exactly 2 A * exactly 2 B * exactly 3 C
outcome4 = exactly 2 A * exactly 1 B * exactly 4 C
Final probability = outcome1 + outcome2 + outcome3 + outcome4
How can I calculate the number of outcomes and their respective probabilities and then sum them? If possible, can you explain with words instead of math symbols so I can take those concepts and apply them in C# language? I am limited by the amount of digits I can hold in a variable so doing large factorials has been interesting. The steps to calculate in C# are numerous. Thank you for your help.
 A: Finally got this I think...
Say I want know the probability of drawing at least 1 of Type A and at least 2 of type B with the remainder being any combination. SO...
Successes for type A = 10 Successes for Type B = 5 Undetermined = 45 Total = 60


*

*p(1 of A & 2 of B) = (10choose1 * 5choose2 * 45choose4) / 60choose7

*p(1 of A & 3 of B) = (10choose1 * 5choose3 * 45choose3) / 60choose7

*p(1 of A & 4 of B) = (10choose1 * 5choose4 * 45choose2) / 60choose7 

*p(1 of A & 5 of B) = (10choose1 * 5choose5 * 45choose1) / 60choose7

*p(2 of A & 2 of B) = (10choose2 * 5choose2 * 45choose3) / 60choose7

*p(2 of A & 3 of B) = (10choose2 * 5choose3 * 45choose2) / 60choose7 

*p(2 of A & 4 of B) = (10choose2 * 5choose4 * 45choose1) / 60choose7

*p(2 of A & 5 of B) = (10choose2 * 5choose2) / 60choose7

*p(3 of A & 2 of B) = (10choose3 * 5choose2 * 45choose2) / 60choose7 

*p(3 of A & 3 of B) = (10choose3 * 5choose3 * 45choose1) / 60choose7

*p(3 of A & 4 of B) = (10choose3 * 5choose4) / 60choose7

*p(4 of A & 2 of B) = (10choose4 * 5choose2 * 45choose1) / 60choose7 

*p(4 of A & 3 of B) = (10choose4 * 5choose3) / 60choose7

*p(5 of A & 2 of B) = (10choose5 * 5choose2) / 60choose7


Final Probability = above outcomes added together.
