Probability of rolling x dice How do you calculate the probability of rolling something with x 6-sided dice?


*

*Example 1: Rolling exactly one 6 with three 6-sided dice.

*Example 2: Rolling exactly two 6s with three 6-sided dice.

*Example 3: Rolling exactly five 6s with ten 6-sided dice.
Also, out of curiosity, what would a function look like if it also had the amount of sides of the die as a variable (so an n-sided die as opposed to a 6-sided one)?
 A: $B_{n,p}$, the count of successes among $n$ independent trials with identical success rate $p$ follows a Binomial Distribution. $$B_{n,p}\sim\mathcal {Binomial}(n,p) \iff \mathsf P(B_{n,p}=k)=\binom{n}{k}p^k(1-p)^{n-k}\mathbf 1_{k\in\{0,..,n\}}$$
This is the count of selections of $k$ from $n$ trials, times $k$ probabilities for successes and $n-k$ probabilities for failure.
If you wish the probability for exactly $1$ six among $3$ rolls of a six sided die, that is : 
$$\mathsf P(B_{3,1/6}{=}1)=\dbinom 3 1 \dfrac {1^15^2}{6^3}=\dfrac{25}{72}$$
And such.
A: Example 1:  ${3\choose 1}\cdot {\frac 16}\cdot{\frac 56}^2$
Example 2:  ${3\choose 2}\cdot(\frac 16)^2\frac 56$
Example 3:  ${10\choose 5}\cdot(\frac 16)^5(\frac 56)^5$
In general:  ${x\choose k}\cdot(\frac 16)^k(\frac 56)^{x-k})$
For $n$-sided dice, you get:  ${x\choose k}\cdot ({\frac1n})^k \cdot {(\frac {n-1}n})^{x-k}$
For one or more sixes, say, we get: $\sum_{k=1}^x{x\choose k}\cdot \frac{{(n-1)}^{x-k}}{n^x }$
For $2$ or more subtract the probability of getting exactly $1$ six;  for $3$ or more subtract the probabilities of getting exactly $1$ and that of exactly $2$ sixes, etc...
A: I like starting with choosing the right probability space.  This helps understanding the problem.  In a generalized problem of rolling $x$ 6s with $N$ $n$-sided dice:


*

*the sample space of a priori possible outcomes is $\Omega = \{1,\dots,n\}^N$

*${\cal A} = {\cal P}(\Omega)$ since $|\Omega|=n^N<\infty$

*judge from the question context, the dice is assumed to be fair: $\mathbb{P} = \mathsf{Unif}(\Omega)$

*the event $A$ is rolling $x$ 6s is to choose $x$ components to place the outcome 6s from an $N$-tuple.  For the remaining $N-x$ components, all outcomes are a priori possible except 6.  There are $|A| = \binom{N}{x}(n-1)^{N-x}$


$${\Bbb P}(A) = \frac{|A|}{|\Omega|} = \frac{\binom{N}{x}(n-1)^{N-x}}{n^N}$$
We can now solve the three examples with $n=6$.


*

*Take $N = 3, x = 1$, ${\Bbb P}(A) = \dfrac{25}{72}$

*Take $N = 3, x = 2$, ${\Bbb P}(A) = \dfrac{5}{72}$

*Take $N = 10, x = 5$, ${\Bbb P}(A) = \dfrac{262}{20117}$

