# How to calculate Yahtzee-like probability without too much by-hand work [closed]

So I'm working on a game that's got (to my knowledge) a novel mechanic; at least as far as tabletop roleplaying goes.

So the central game mechanic is essentially lifted from Yahtzee: characters want X of a kind or a straight of X dice in a row, but they also need to do this Y times in a particular roll.

The dice pool is of variable size.

Unfortunately, I can't think of any way to program this for something like AnyDice, and while I wasn't bad at math in high school I primarily did math in high school so I wouldn't have to do it in college.

With that said, here's the insight that I've gotten so far:

Every possible combination that yields X in a straight or row is acceptable, so you've got a pretty good chance of having at least some straights or rows, even with the system minimum of three dice.

X*Y will likely be a significant factor; if you want X>=3, Y>=1 in a pool of 3, your chances are roughly 6% (between the three of a kinds [6/216] and three-length straights [6/216] that are possible, but my math may be off here when doing the permutations). I believe that trying the same thing with X>=1, Y>=3 is the same calculation (e.g. you'd need results like 2, 4, 6 or 1, 3, 5). You also have the opportunity to have X>=2, Y>=2, which works out to something like 10-12% (I tested this by hand because I have no clue how to calculate this. Obviously if X or Y is greater than Z there is 0 chance of success, because you can't roll four of a kind with 3 dice, but X+Y>Z still leads to some successes, and actually more than X=Z or Y=Z. Where X+Y=

I think this would need a matrix to represent potential probabilities, but I'm also pretty sure that there's a handy formula to calculate the probability of a result given X, Y, and Z that I'm just unaware of.

## closed as off-topic by Bloodcinder, Miniman, linksassin, V2Blast♦, MikeQFeb 20 at 4:14

• This question does not appear to be about role-playing games within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• I'm voting to close this question as off-topic because there doesn't seem to be any need for RPG-specific expertise. – Miniman Feb 20 at 3:44
• Perhaps Mathematics would be better suited? Probability questions seem at home there. – Zhuge Feb 20 at 3:48
• In order for this question to be about RPGs, we would need to know what game design goal you're trying to accomplish with this scheme. What's the intent behind using this kind of randomization? – kviiri Feb 20 at 7:18
• This is probably a better fit for mathematics. Incidentally, swapping X and Y does not leave the probability the same. You can see this by noting that you will always get one-of-a-kind. – frodoskywalker Apr 4 at 20:04