How to calculate the probability of rolling matching dice?
Hello!
I'm trying to design a new dice system for a table-top roleplaying game. I think that a multinomial distribution or some sort of simulation (probably 100,000 simulations of rolling 10-sided 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 ten-sided 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 same-sided dice (i.e. rolling a number of 8-sided dice, a number of 10-sided dice, or a number of 12-sided 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 with and accepted the answer, or
- The answer was evaluated as being 100% correct by the judge.
![Amas](https://matchmaticians.com/storage/user/100831/thumb/AEdFTp4xXsLI37yQ6JAiRbP5aC17Yy-BA0ay-_yO2k6c-avatar-512.jpg)
-
Thank you! I'll give this a try soon.
- answered
- 523 views
- $10.00
Related Questions
- Cramer's Theorem question
- Find a number for 𝛼 so f(x) is a valid probability density function
- joint continuous probability function finding covariance
- Probability - what is the probability that a given tire length will lie in a lenght of interest
- Determining which excel T-Test to use
- X is number of (fair) coin flips needed to land m heads OR m tails. m is arbitrary natural number. Delfine CDF of X. (in It's simplest form)
- Compound Interest with monthly added capital
- What are the odds of drawing the two tarot cards that I wanted, then reshuffling the pack, and drawing them both again straight away, in the same order?
We could solve this but I suggest increasing the bounty to $25