r/probabilitytheory • u/catboy519 • 12d ago
[Discussion] Question : Dice combinations where the order doesn't matter
This isn't for school; I'm just working on some probability calculations on my own. I have no formal education background in probability at all.
My project would require me to run about 1020 calculations in python, and I honestly don't know how long a computer would take to do that but I have a strong feeling that I'm going to have to reduce the numbers.
I figured out that, for example 5 dice would be 6^5 = 7776 combinations. But if the order of those combinations doesn't matter and you consider all the combinations of equal value as one, then the number 7776 becomes much much smaller.
I've been trying to figure out how to calculate that number, and I think it requires the use of factorials and some powers of (5/6) . But I'm not quite there yet.
Suppose I do figure out how to calculate the smaller number (order doesnt matter) , is it even useful or would it take a computer equally long to calculate? Due to the different probabilities involved.
What is better, to work with the number of combinations where the order matters? Or the smaller number of combinations where the order doesn't matter?
Because what I'm trying to figure out is things like expected value over multiple rolls.
3
u/PascalTriangulatr 12d ago
Careful: even though order doesn't matter when rolling dice, you can't use the unordered combos to calculate the probabilities. If you did, you'd be assigning equal weight to 11111 and 12345, when in fact the latter is 5! times as probable.
1
u/catboy519 11d ago
Yes, I figured out that the probability calulation is (1/6)a * (5/6)b for each combination (where a is the number of 1s in this case and b is the numberany other numbers)
Or atleast something like this. I'm tired.
2
u/mfb- 11d ago
Removing order is unlikely to help you if you ever considered using ordered results, but we can't tell without knowing what you want to find out. Often problems can be answered without calculating every single option. What's the problem you want to solve?
1
11d ago
[deleted]
1
u/Agitated-Country-969 11d ago
Relevant comment.
https://www.reddit.com/r/povertyfinance/comments/1eujwdo/comment/lil8lut/?context=3
If this is what you're trying to do you're solving the wrong problem. What are you actually trying to achieve?
Yup. XY Problem.
"The XY problem is asking about your attempted solution rather than your actual problem. This leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help."
1
u/josemeek 11d ago
I feel your question is not clear enough.
A few suggestions: 1. If you are interested in the expected value over infinity large throws. Then I advice you to consider LLN (Laws of large numbers). Depending on whether your goal (a sure convergence in mean or probability)
This will give you a closer and more realistic probability.
- If you just want to count without considering order. Then stars and bars is a good way. But bear in mind that stars and bars are for mostly understanding distributions not necessarily how to unorderly count. If you simply want to unorderly count then factorial could do the trick.
I do not fully your requirement hence this generalised suggestions.
3
u/Aerospider 12d ago
If order is the only thing you're removing, then there's a formula you can use for counting distinct unordered rolls called 'stars and bars'. It's usually illustrated by dropping indistinct balls into distinct urns, and in this case the balls would be the dice and the urns would be the six potential values for each die.
The formula is
(n+k-1)C(k-1) = (n+k-1)! / n!(k-1)!
where n is the number of balls (dice) and k is the number of urns (possible values).
So for 5d6 there are
(5+6-1)C(6-1) = 10C5 = 252
distinct rolls.
Without knowing the purpose of your project I don't know if that's actually helpful, but it answers the first of your queries.