How do I calculate the probability of rolling K-of-a-kind or better on N number of D-sided dice?

Hey /r/math, I’ve been hunting for a solution to this for a while. I’ve gotten pretty far, but I’m up against some big topics and I’m hoping for a little help or direction to get me over the line. I’ve done some research, and found answers like this one, but I haven’t been able to fully grasp the answer and implement it for myself.

I understand combinatorics for the most part, but it’s the inclusion-exclusion principle where I start to get lost. For context, I’m working towards building a couple probability tables for a dice rolling mechanic for a tabletop RPG, so we can see how likely getting pairs on 4d6 is, or tripples on 5d8. I have written a script to brute force some of the smaller values (including the examples I just gave), but I know there’s a more elegant way, and now I’m just curious.

Any help would be greatly appreciated.

submitted by /u/pdwtu
[link] [comments]

Published by

Nevin Manimala

Nevin Manimala is interested in blogging and finding new blogs

Leave a Reply

Your email address will not be published. Required fields are marked *