How to calculate the probability of rolling matching dice?
Hello!
I'm trying to design a new dice system for a tabletop roleplaying game. I think that a multinomial distribution or some sort of simulation (probably 100,000 simulations of rolling 10sided dice) might be the right way to go, but I need some help with the statistics and coding up a solution in python.
In the game, the player will roll a number of tensided dice. Every dice that matches the value of at least one other dice will count as a "match". If a player rolls 8 dice with values {1, 2, 3, 3, 3, 4, 4, 5}, they will have 5 total "matches" because there are three 3s and two 4s. I've been able to intuit that if the player rolls only 2 dice, they would expect to have a 90% chance of no matches, and a 10% chance of 2 matches (one pair of matching dice).
At some point I expect more dice to mean a lower chance of getting "n" matches  for example, if you rolled 12 dice it would be impossible to get less than 3 matches {1,2,3,4,5,6,7,8,9,10,1,1}.
I'd like to be able to generate probabilities of getting "n" matches with a specified number of samesided dice (i.e. rolling a number of 8sided dice, a number of 10sided dice, or a number of 12sided dice). I'd like to be able to specify the # of matches I want a probability for, the # of dice to be rolled, and the # of sides on the dice rolled (all dice rolled can have the same # of sides).
Thank you!
Answer
 The questioner was satisfied and accepted the answer, or
 The answer was disputed, but the judge evaluated it as 100% correct.

Thank you! I'll give this a try soon.
 answered
 67 views
 $10.00
Related Questions
 Convergence in probability and uniform integrability implies convergence in Lp
 Probabilities
 Find the maximum likelihood estimate
 [Combinatorics] Selections, Distributions, and Arrangements with Multiple Restrictions
 Probability that a pump will fail during its design life
 Questions for Statistics Project
 Probability/statistics
 Insurance question involving net premium
We could solve this but I suggest increasing the bounty to $25