What is the probability of getting exactly doubles when rolling N number of dice

For example if i roll 2 dice the probability of getting exactly doubles is 6/36.

similarly if i roll 3 dice the probability of getting exactly doubles not considering triples is 90/216.

How can i calculate probability for N dice i.e 1,2,3,4,5,6,7,8,9,10....N

is there a general formula for this?

Thank you in Advance.

• Would a sequence 1,1,2,2 (two doubles) count as a success? Would 1,1,2,2,2 (one double, one triple)? – Stephan Kolassa Aug 20 '20 at 7:45
• You need to say more about what is defined as "success". Is it only one double? Are two or more identical numbers considered a success? – osmoc Aug 20 '20 at 8:56
• 1,1,,2,2 cannot be considered as doubles. For Eg: if i roll 4 dice the probability of getting doubles can be considered as . The numbers apart from doubles have to be different. i.e (1,1,2,3) and (2,3,4,2) is considered as doubles not(1,1,2,2) – Sandeep Aug 20 '20 at 9:00
• Then, you can't have success after $N\geq 8$, and you don't need a general formula for $N$. – gunes Aug 20 '20 at 10:01

2 dices:

number of possible outcomes: $$6^2$$
number of possible pairs: $$1$$
probability: $$6 / 6^2 = 1/6$$.

3 dices:

number of possible outcomes: $$6^3$$
number of possible doubles: $$\{(a,a,b),(a,b,a),(b,a,a)\}$$ with $$a,b\in\{1,2,3,4,5,6\}$$ ($$b \neq a$$). For each possibe $$b$$. In total, you have $$3*6*5$$ possible pairs. probability = $$3*6*5/6^3 = 90/216$$.

4 dices:

number of possible outcomes: $$6^4$$
number of possible pairs:
number of possible $$N$$-tuples with $$a,b,c$$ outcomes $$\{(a,a,b,c), (a,b,a,c), (a,b,c,a), \ldots \}$$, with $$a,b,c \in \{1, \ldots, 6\}$$ times the possible values for $$a,b,c=6*5*4$$ ($$b \neq c\neq a$$).
The number of possible permutations of 4 elements with 2 repetitions is $$4!/2!=12$$, that must be multiplied by the number of possible different faces $$6*5*4$$.
probability: $$12*6*5*4/6^4$$

In general:

the number of possible permutations of $$k$$ with $$2$$ replicates is given by $$k!/2!$$, the number of possible distinct $$k-1$$ values is $$6*5*\ldots*(6-(k-1)+1)$$, and given that all possible permutations are $$6^k$$:

$$P(k)=\frac{k!/2! * 6 * 5 * \ldots * (6-(k-1)+1)}{6^k}=\frac{\frac{k!}{2!} \frac{6!}{(6-(k-1))!}}{6^k}$$

From the formula, it's clear that with $$k = 8$$ the probability becomes 0.