Chances of pairs and triples on ten-sided dice pools 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:

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!
 A: 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!
A: 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.
