# Probability of $X$ out of $N$ dice landing on $M$

The problem is as follows:

We have $N$ dice and we throw them on a table. What is the probability that $M$ will fall $X$ times?

Specific example: We have $10$ dice and we throw them on a table. What is the probability that $3$ will occur $7$ times (so there are seven dice out of $10$ which have $3$ on top)?

I am really bad at probability. I've checked a few sites about how I could solve this but it seems too hard figure it out.

• If 7 dices show 3, how many possible combinations are there for the other 3 dice. Once you've figured that out, you just have to account for that fact that you don't require and particular 7 dice to show 3. – fgp May 11 '13 at 16:15
• In more standard notation, the probability of $k$ $4$'s (or any other specific number, like $k$ $2$'s) in $n$ tosses is $\binom{n}{k}(1/6)^k(5/6)^{n-k}$. The distribution of the number of $4$'s is an example of the binomial distribution. You may know the binomial coefficient $\binom{n}{k}$ as $C_k^n$, or some related symbol. – André Nicolas May 11 '13 at 16:17

This is problem represents a binomial distribution.

We have $N$ trials of $M$, and each of possible $M$ has a $\frac{1}{S}$ chance of occurring, where $S$ is the number of sides on each die. $X$ will represent how many times you want to roll $M$.

So, we can represent this probability as follows:

$$\binom{N}{X}\left(\frac{1}{S}\right)^{X}\left(\frac{S - 1}{S}\right)^{N - X}$$

Expanded, this looks like this:

$$\frac{N!}{X!(N - X)!}\left(\frac{1}{S}\right)^{X}\left(\frac{S - 1}{S}\right)^{N - X}$$

Note that $x!$ is the factorial function, where $n! = \prod_{i = 1}^{n}i$

So, for your specific example, we have:

$$\frac{10!}{7!(10 - 7)!}\left(\frac{1}{6}\right)^{7}\left(\frac{6 - 1}{6}\right)^{10 - 7}$$ $$\frac{10!}{7!3!}\left(\frac{1}{6}\right)^{7}\left(\frac{5}{6}\right)^{3}$$

Which is about $0.0002480725753188030279937001473352639333434943860183$

Suppose first that the ten dice are all different colors. If you want to get 3 on the blue and red dice only, then you want a non-3 on the other eight colors. The probability of this happening is $(\frac 16)^2(\frac 56)^8$.

But the dice don't have all different colors. So blue+red is just one way to pick two colors out of ten. There are ${10\choose 2}$ ways to do that. Combining, the total probability is $(\frac 16)^2(\frac 56)^8{10 \choose 2}$.

So we have our $N$ number of dice. Given that the dice has $A$ number of sides.

For any single die, the probability that $M$ falls is $\frac{1}{A}$. However, we need $M$ to fall $X$ times. Suppose we want the first $X$ dice to have $M$, then the probability of that happening is $(\frac{1}{A})^X * (\frac{A-1}{A})^{N-X}$. Order does not matter though, so the dice with $M$ can be in any of the $N$ positions, giving us a ${N\choose X}$ possibilities.

We end up with ${N\choose X}*(\frac{1}{A})^X * (\frac{A-1}{A})^{N-X}$

From the N dice choose X and ensure that those X show you required no. but others do not. So it is just (N choose X)(1/6)^X(5/6)^(N-X)