Apologies if this question has been answered -- I tried searching for an answer but wasn't sure what terminology to use.
Suppose I have a deck of cards, consisting of $n_1$ ones, $n_2$ twos, etc. (where each $n_x$ can be a different number).
I draw $k$ cards from the deck, and I want to know the probability that they will add up to at least $x$.
I'm looking for a general-purpose formula that I can use for different amounts and values of $n$s, and different values of $k$ and $x$.
Example:
I have a deck of 7 ones, 4 twos, 13 threes, and 9 fours. What is the probability of drawing 6 cards and having them add up to at least 13?
I have a basic knowledge of probability, but this problem has a few too many variables for me to work it out. An explanation of the solution would be most welcome, if anyone is willing and able.
I am almost sure the answer to such general question will not be an simple analytical formula, but it can be computed numerically.
First we start with a simple statement: if you choose m objects amongst n, and objects can be of 2 types (e.g. black and white - let there be n_b black objects), than the probability that the number of black objects among the selection $m_b$ is $$\binom{m}{m_b}\binom{n-m}{n_b - m_b} / \binom{n}{n_b} $$
I have used this formula to implement the algorithm below. The idea is that we iterate over denominations, and for each denomination we condition on how many cards of this denomination (black objects) were selected among whatever number of cards is remaining to select, given total number of cards that remain in the deck and total number of cards of this denomination.
It appears that, for the numbers you give, the answer to your question is 0.674
The code is below. I have checked it on a few simpler deck compositions, and it seems to give correct result, but please do check it yourself. It is written in Python, your can get it for free and run this code if you need it.