I was hoping someone might be able to help me in calculating dice probability with custom dice. The desired outcome would be being able to change the values on a 6 sided die (rather than 1-6), as well as the number of dice being rolled, and solve for the probability that outcome A or outcome B, ect would occur when all dice are rolled at the same time.
For example, as I have been trying to figure this out, I have been using two custom dice. Essentially one for an "attack" roll and another one defending. The dice are both d6 but with different values on each side.
Attack Die: [0,1,1,1,2,2] Defense Die: [0,0,-1,-1,-1,-2]
The negative numbers are meant to reduce the total amount of damage the attack die would otherwise deal. This could perhaps be easier calculated using [0,0,1,1,1,2] and subtracting the outcome from the attacking die. I was able to make a chart showing the number of chances a certain outcome could occur if one of each of these was used:
I divided the number of chances each possible outcome had of occurring by the total number of possible outcomes and got my probability for each. The problem I have is calculating anything beyond two dice. I am pretty savvy with Excel, so I am trying to make a spreadsheet where I change the number of dice, or can tweak the faces of each die and the outcomes would adjust accordingly. Is there a simplified equation I can use that would factor in these variables and give the probability of a desired outcome?
Thank you for your time, I hope this post makes sense :)
Say you have $n$ attack dice. Then the total attack points $TA$ has possible values $0$ through $2n$. Now: to calculate the chance of the total attack points being $i$, i.e. $P(TA=i)$, note the following ways to get $i$ points:
If $i$ is even, i.e. $i=2k$, and $i \le \frac{n}{2}$, then you can either have $k$ dice with $2$, and $n-k$ dice with $0$, or $k-1$ dice with $2$, $2$ dice with $1$, and $n-k-1$ dice with $0$ or .... or $0$ dice with $2$, $i$ dice with $1$, and $n-i$ dice with $0$. So:
$$P(TA=i=2k)=\sum_{j=0}^k (\frac{1}{3})^j \cdot (\frac{1}{2})^{i-2j} \cdot (\frac{1}{6})^{n-i+j} \cdot {n \choose j} \cdot {{n-j} \choose {i-2j}}$$
You should be able to create likewise formula's for when $i > \frac{n}{2}$ (I would treat that one separately, since now you definitely need some number of dice with a $2$), and then likewise two formulas for when $i$ is odd.