Chances of pairs and triples on ten-sided dice pools

1.3k Views Asked by At

I am trying to figure out probabilities for ten-sided dice for my RPG system just to make sure my stats are correct, but I thought I'd check my workings with better maths brains than mine.

The lowdown:

  • This system requires you to roll a pool of d10 of between 2 dice and 9 dice.
  • You look for matching pairs and matching triples. A pair is a success, and so is a triple.
  • (A triple is treated as a pair, with the third dice 'discarding' itself to give you a bonus effect of modifying its pair up or down by +1/-1, which is sometimes advantageous, as higher and lower pairs both have different advantages in system).
  • More pairs mean more successes. So we want as many as we can.
  • Naturally, with 2 dice rolled, the chance of a pair is 10%. There is an early biased curve of any success occuring, rising to 84.88% by the time you reach six dice rolled, and 99.64% at nine dice. This, I'm all good with.

Where I'm not sure I'm doing things right is working out the possibilites for a single triple, and then two pairs in a given pool.

What I've been doing for a triple is taking the chance of a pair, and then multiplying it by (1/10) + (1/10) for each extra dice besides the two dice already in the pair.

Hence, for a triple in six dice: $$0.8488 \times ((1/10)+(1/10)+(1/10)+(1/10))$$

And then, for the chance of two pairs in six dice, multiplying the chance of a pair in a pool of six dice by the chance of a pair in four dice.

So: $$(0.8488 \times 0.4960)$$

Which gives us this chart:

probability chart

Now, assuming all this is correct, it means that, once we reach six dice rolled, the chance of there being two pairs exceeds that of there being a triple.

Which surprises me. It sounds like an anomoly. I may just be being thick about this, and that really is truly the case, but I just want to make sure I'm not doing something terribly wrong here!

Thanks!

3

There are 3 best solutions below

5
On

As you suspected, you didn't calculate the probability of a triple correctly.

Take the case of $3$ dice, for example. To get a triple, the first die can be anything, but then there is a $10$% chance the second die matches the first, and also a $10$% chance the third matches it as well. Hence, the probability of getting a triple with $3$ dice is $0.01$, rather than $0.028$

OK, so why can't you multiple the chance of getting a pair, and multiply by $0.1$ for the third die? It's because the probability of a pair is already taking all $3$ dice into account. It would make sense to multiply by $0.1$ the probability of the first two dice being a pair ... and indeed given that that probability is $0.1$, you end up with the correct $0.01$. Similarly, for more than $3$ dice, it only makes sense to multiply by $0.1$ the probability of the first $n-1$ dice to form a single pair, but the probability you are working with again takes all dice account already.

To get the formula for the probability of getting a triple, I would (like you do with the pair), calculate the probability of not getting a triple and subtract from $1$. OK, but how to calculate that? I am thinking that some generating function will be applicable here, but I am not good with those. So, let's do this the hard way.

Take $4$ dice. How not to get a triple? Well, they can all be different, or there can be one pair, or there can be two pairs. Now, you already calculated the chance of all different, which is $\frac{10\cdot9\cdot8\cdot7}{10^4}=0.504$. For exactly one pair: there are $10$ options for the number that occurs as a pair, and $9 \choose 2$ options for the other two numbers, there are $4 \choose 2$ ways for that pair to occur among the $4$ dice, and $2$ ways for the other two numbers, giving a total of $10\cdot{9 \choose 2} \cdot {4\choose 2}\cdot 2$ ways for exactly one pair to happen, thus giving a probability of $\frac{10\cdot{9 \choose 2} \cdot {4\choose 2}\cdot 2}{10^4}$ for that to happen. For two pairs: $10 \choose 2$ possibilities for the two numbers, and $4 \choose 2$ for those two pairs to be distributed among the $4$ dice, so ${10 \choose 2}\cdot {4 \choose 2}$ ways to get two pairs, giving a probability of $\frac{{10 \choose 2}\cdot {4 \choose 2}}{10^4}$

OK, that's not a closed formula .. but maybe you can do this process in Excel without too much trouble for more dice. Good luck!

3
On

Consider $n$ fair $10$-sided dice, where $n$ is a positive integer between $3$ and $20$. (By the pigeonhole principle, if there are more than $20$ dice, we are guaranteed to obtain at least one triplet.)

Now we are interesting in grouping the undesired outcomes (no triplets) by the number of distinct values $k$ showing when the dice are rolled, such that no value occurs more than twice. For $n = 3$, we can have $k \in \{2, 3\}$; for $n = 4$, we can have $k \in \{2, 3, 4\}$; for $n = 5$, we can have $k \in \{3, 4, 5\}$; and it is not too hard to see that for general $n$, we can have $$\lceil n/2 \rceil \le k \le \min(n, 10).$$

With $k$ distinct values on $n$ dice, there are $n-k$ values that appear exactly twice, and $2k-n$ that appear exactly once. There are $$\frac{10!}{(10-k)!}$$ orderings of the $k$ distinct values, each of which admits $$\frac{n!}{(2!)^{n-k} (n-k)!(2k-n)!}$$ ways to order the $n$ dice. Thus there are a total of $$S(n) = \sum_{k = \lceil n/2 \rceil}^{\min(n,10)} \frac{10!}{(10-k)!} \cdot \frac{n!}{2^{n-k} (n-k)!(2k-n)!} = \frac{10! \, n!}{2^n} \sum_{k=\lceil n/2 \rceil}^{\min(n,10)} \frac{2^k}{(10-k)!(n-k)!(2k-n)!}$$ outcomes without a triplet, and the desired probability is $$1 - \frac{S(n)}{10^n}.$$ This gives the table

$$ \begin{array}{|c|c|c|} \hline n & \text{probability} & \text{approx.}\\ \hline 3 & \frac{1}{100} & 0.01 \\ 4 & \frac{37}{1000} & 0.037 \\ 5 & \frac{107}{1250} & 0.0856 \\ 6 & \frac{197}{1250} & 0.1576 \\ 7 & \frac{6289}{25000} & 0.25156 \\ 8 & \frac{90673}{250000} & 0.362692 \\ 9 & \frac{604187}{1250000} & 0.48335 \\ 10 & \frac{3776179}{6250000} & 0.604189 \\ 11 & \frac{17896057}{25000000} & 0.715842 \\ 12 & \frac{202679881}{250000000} & 0.81072 \\ 13 & \frac{552756829}{625000000} & 0.884411 \\ 14 & \frac{2925783983}{3125000000} & 0.936251 \\ 15 & \frac{60553812757}{62500000000} & 0.968861 \\ 16 & \frac{123360298937}{125000000000} & 0.986882 \\ 17 & \frac{622134354217}{625000000000} & 0.995415 \\ 18 & \frac{624218460241}{625000000000} & 0.99875 \\ 19 & \frac{62485150744579}{62500000000000} & 0.999762 \\ 20 & \frac{624985150744579}{625000000000000} & 0.999976 \\ \ge 21 & 1 & 1 \\ \hline \end{array} $$ I have not given much thought to enumerating outcomes where we have at least two pairs, but it seems fairly simple. I encourage you to try it, now that you have seen how we reasoned in the triplet case. When I have time I might get around to amending this answer.

2
On

One approach is to use an exponential generating function.

Let's say we want to compute the probability that there are no triples when rolling $n$ ten-sided dice. There are $10^n$ possible outcomes, all of which we assume are equally likely. We would like to count the number of outcomes in which there are no triples; call this number $a_n$. We define the exponential generating function, $f(x)$, by $$f(x) = \sum_{n=0}^{\infty} \frac{a_n}{n!} x^n$$ In order for there to be no triples, each number from one to ten must appear zero, one, or two times in the $n$ dice. So $$f(x) = \left[ 1 + x + \frac{1}{2!} x^2 \right]^{10} $$ Expanding the right-hand side with a computer algebra program, we have $$f(x) =1+10 x+50 x^2+165 x^3+\frac{1605 x^4}{4}+762 x^5+1170 x^6+1485 x^7+\frac{12645 x^8}{8}+\frac{5695 x^9}{4}+\frac{4363 x^{10}}{4}+\frac{5695 x^{11}}{8}+\frac{12645 x^{12}}{32}+\frac{1485 x^{13}}{8}+\frac{585 x^{14}}{8}+\frac{381 x^{15}}{16}+\frac{1605 x^{16}}{256}+\frac{165 x^{17}}{128}+\frac{25 x^{18}}{128}+\frac{5 x^{19}}{256}+\frac{x^{20}}{1024}$$ So, for example, $$a_6 = 6! \times 1,170 = 842,400$$ which is the number of possible outcomes in rolling six ten-sided dice with no triples. Therefore the probability of getting no triple in six dice is $$\frac{a_6}{10^6}=0.8424$$ and the probability of getting at least one triple is $$1 - 0.8424 = 0.1576$$ The probabilities of getting at least one triple for other numbers of ten-sided dice are easy to calculate by the same method, using the expanded form of $f(x)$ above. Notice that $a_n=0$ for $n>20$, which captures the fact that there is always at least one triple when rolling more than $20$ dice, as we know from the Pigeonhole Principle.