I am writing the AI for a dice game and I have hit a mental block.
I need to know the probability of rolling $X$ specific numbers on Y six-sided dice, where $Y \leq 6$ and $X < Y$ (otherwise the probability would obviously be 0!)
E.g. What is the probability of rolling a 2 and a 4 with 5 dice.
I know that the number of total rolls is $6^Y$ so the answer must be something like...
$f(x,y)/(6^Y)$
Any suggestions?
Thanks in advance!
The probability of rolling at least one from $X$ specified numbers when given $Y$ rolls of a cubic die is the probability of not rolling none of them.
$$f_{X\mid Y}(x\mid y) ~=~ 1-\left(\frac{6-x}{6}\right)^y\qquad\Big[x\in \Bbb N,y\in \Bbb N,1\leq x\leq \min\{y, 6\}\Big]$$
The probability of rolling $X$ specific number at least once each, when given $Y$ rolls of a cubic die is, the probability of not missing any of them.
$$g_{X\mid Y}(x\mid y) ~=~ 1-\sum_{k=0}^x \binom 6{x-k}(-1)^k \left(\frac{6-x+k}{6}\right)^y\qquad\Big[x\in \Bbb N,y\in \Bbb N,1\leq x\leq \min\{y, 6\}\Big]$$