You roll 8 6-sided dice. What is the probability that the sum is 28?
Given that the P(1)=8/117, P(2)=14/117, P(3)=34/117, P(4)=39/117, P(5)=14/117, and P(6)=8/117
At first I've been trying to find the permutations of rolling 8 dice to get a sum of 28 but I don't know if the order matters so I tried to find combinations as well. Having found the permutations and combinations, because the probabilities are different for each number, I don't know how to find the probability for each combination/permutation.
Please explain it in detail if you can. Thank you
We have that $$ \eqalign{ & 1^{\,8} = \left( {p_{\,1} + \,p_{\,2} + \, \cdots \, + p_{\,6} } \right)^{\,8} = \cr & = \sum\limits_{\left\{ {\matrix{ {0\, \le \,k_{\,j} } \hfill \cr {k_{\,1} + \,k_{\,2} + \, \cdots \, + k_{\,6} = \,8} \hfill \cr } } \right.} {\left( \matrix{ 8 \cr k_{\,1} ,\,k_{\,2} ,\, \cdots \,,k_{\,6} \cr} \right) p_{\,1} ^{\,k_{\,1} } \,p_{\,2} ^{\,k_{\,2} } \, \cdots \,p_{\,6} ^{\,k_{\,6} } } \cr} $$
Then consider the polynomial $$ \eqalign{ & \left( {p_{\,1} x^{\,1} + \,p_{\,2} x^{\,2} + \, \cdots \, + p_{\,6} x^{\,6} } \right)^{\,8} = \cr & = \sum\limits_{\left\{ {\matrix{ {0\, \le \,k_{\,j} } \hfill \cr {k_{\,1} + \,k_{\,2} + \, \cdots \, + k_{\,6} = \,8} \hfill \cr } } \right.} {\left( \matrix{ 8 \cr k_{\,1} ,\,k_{\,2} ,\, \cdots \,,k_{\,6} \cr} \right)\left( {p_{\,1} x^{\,1} } \right)^{\,k_{\,1} } \,\left( {p_{\,2} x^{\,2} } \right)^{\,k_{\,2} } \, \cdots \,\left( {p_{\,6} x^{\,6} } \right)^{\,k_{\,6} } } = \cr & = \sum\limits_{\left\{ {\matrix{ {0\, \le \,k_{\,j} } \hfill \cr {k_{\,1} + \,k_{\,2} + \, \cdots \, + k_{\,6} = \,8} \hfill \cr } } \right.} {\left( \matrix{ 8 \cr k_{\,1} ,\,k_{\,2} ,\, \cdots \,,k_{\,6} \cr} \right)\left( {p_{\,1} ^{\,k_{\,1} } \,p_{\,2} ^{\,k_{\,2} } \, \cdots \,p_{\,6} ^{\,k_{\,6} } } \right)x^{\,1 \cdot k_{\,1} + 2 \cdot k_{\,2} + \cdots + 6 \cdot k_{\,6} } } = \cr & = \sum\limits_{8\, \le \,m\, \le \,48} {\left( {\;\sum\limits_{\left\{ {\matrix{ {0\, \le \,k_{\,j} } \cr {k_{\,1} + \,k_{\,2} + \, \cdots \, + k_{\,6} = \,8} \cr {\,1 \cdot k_{\,1} + 2 \cdot k_{\,2} + \cdots + 6 \cdot k_{\,6} = m} \cr } } \right.} {\left( \matrix{ 8 \cr k_{\,1} ,\,k_{\,2} ,\, \cdots \,,k_{\,6} \cr} \right)\left( {p_{\,1} ^{\,k_{\,1} } \,p_{\,2} ^{\,k_{\,2} } \, \cdots \,p_{\,6} ^{\,k_{\,6} } } \right)} } \right)x^{\,m} } \cr} $$
For $x=1$ the polynomial has value $1$.
So clearly the probability you are looking for is the coefficient of $x^{28}$ in the above identity which is $$ \left[ {x^{\,28} } \right] = 0.11278 \ldots $$ The plot of all the coefficients, compared with case of $p_k = const. = 1/6$, is as given below.
You are further asking for the case without replacement.
It is not clear what kind of process you want actually to simulate.
If you mean that you can extract only once any of six tickets labelled $[1,6]$, then clearly you cannot do more than six extractions.
However I will expose briefly the principles underlying the construction of a Ordinary Generating Function
Consider to expand the following polynomial $$ \eqalign{ & F(x) = \left( {1 + x} \right)\left( {1 + x^{\,2} } \right) \cdots \left( {1 + x^{\,q} } \right) = \cr & = \cdots + 1 \cdot x^{\,k_{\,1} } \cdot \ldots \cdot x^{\,k_{\,2} } \cdot 1 \cdot \ldots \cdot x^{\,k_{\,m} } + \cdots \cr} $$ it clearly represents all the cases in which, out of $q$ tickets, some are extracted only once ($k_1 \ne k_2$ etc.), and the remaining are not extracted at all (the $1=x^0$).
If the probability of being extracted are different, then consider $$ F(x) = \left( {\left( {1 - p_{\,1} } \right) + p_{\,1} x} \right)\left( {\left( {1 - p_{\,2} } \right) + p_{\,2} x^{\,2} } \right) \cdots \left( {\left( {1 - p_{\,q} } \right) + p_{\,q} x^{\,q} } \right) $$ where $F(1) = 1$.
Finally pass to $$ G(x,y) = \left( {\left( {1 - p_{\,1} } \right) + p_{\,1} yx} \right)\left( {\left( {1 - p_{\,2} } \right) + p_{\,2} yx^{\,2} } \right) \cdots \left( {\left( {1 - p_{\,q} } \right) + p_{\,q} yx^{\,q} } \right) $$ it should be clear what the coefficient of $y^n$ represents, and what is the coefficient of $y^n x^m$.