Say I have a three sided die labeled $\{a,b,c\}$ and I wanted to find the probability of rolling (not in order) $\{a, a, a, b, c, a, b, c\}$ with $P(a) = p,P(b)=q, P(c)=r;\;p+q+r=1$. How would I compute this probability?
My thinking started out in the following way. Say out of N rolls I wanted to find out how many times I rolled "$a$" k-times. Then I have
$$ P(\text{roll }a \text{ k-times out of N}) = \sum_{k=0}^{N} {N \choose k}p^k(1-p)^{N-k} $$
Then out of $N-k$ rolls, I wanted to find the probability I rolled a "$b$" l-times. This is
$$ P(\text{roll } b \text{ l-times out of N-k and not roll }a) = \sum_{l=0}^{N-k} {N-k \choose l} q^lr^{N-k-l} $$ so all together I get
$$ P(\text{roll k }a\text{, l }b\text{, and N-k-l }c) = \sum_{k=0}^{N} {N \choose k}p^k(1-p)^{N-k}\sum_{l=0}^{N-k}{N-k \choose l}q^l\;(1-p-q)^{N-k-l} $$ Does this look right? It kinda looks... ugly.
https://en.wikipedia.org/wiki/Multinomial_distribution $$P(4 a, 2 b, 2 c) = \frac{8!}{4!2!2!}p^{4}q^{2}r^2$$ $$P(a:N - k - l,b: k, c: l) = \frac{N!}{(N-k-l)!k!l!}p^{N-k-l}q^{k}r^{l}$$
On further reading I realised that $$ P(\text{roll }a \text{ k-times out of N}) = \sum_{k=0}^{N} {N \choose k}p^k(1-p)^{N-k} $$ is a wrong statement all together, in this you are calculating $P(\text{roll }a \text{ at most k-times out of N})$