Conditional probabilities of a shuffled deck of cards

28 Views Asked by At

I thought of this question which seems excessively complicated and I was wondering if anyone had a simple solution to it.

Mary has a deck of $x$ cards of only two types. There are $y$ cards of the first type and $z$ cards of the second type. Mary and Sarah take turns to draw cards from the deck, which gets shuffled after each draw.

If Mary draws $n$ cards before Sarah draws $m$ cards from the same deck (without replacement of cards), what are the chances of Mary having at least a quantity $q$ of the first type of cards if she draws another $t$ cards from the deck?

I am thinking that this question could be solved with the following function:

$$ \sum_{k=q_2}^t \sum_{j=0}^m \sum_{i=q_1}^n \left ( \frac{\binom{y}{i} \cdot \binom{z}{n-i}}{\binom{x}{n}} \right ) \left ( \frac{\binom{y-i}{j} \cdot \binom{x-y+i-n}{m-j}}{\binom{x-n}{m}} \right ) \left ( \frac{\binom{y-i-j}{k} \cdot \binom{x-y+i-n+j-m}{t-k}}{\binom{x-n-m}{t}} \right ) $$

in all cases in which $q_1 + q_2\geq q$.

As you can see, the problem is that multiple summation functions cannot calculate conditional probability because they do not multiply each new case by the previous cases from which it is conditional upon.

Any way you can define a new function for the benefit of all humanity?