I'm trying to compute the probability of achieving a certain number of successes when rolling a die pool for both open-ended/exploding and closed tests. Success is defined as a roll above a certain (variable) threshold. If a roll is open-ended, any die which rolls the maximum value triggers an additional die to be rolled. This is for a role-playing game (Burning Wheel Gold).
Assume the use of a $n$-sided die. Additionally, we assume $d$ to be the number of dice, $r$ to be the required number of successes, and $c$ to be the minimum value accepted as a success. I'm breaking the question down into two blocks: one for open-ended rolls, and one for closed rolls.
Closed roll: For closed rolls, we can define a probability recurrence as follows:
$$Pr\left[r,d\right] = \begin{cases} \\1-\frac{c}{n}:Pr\left[d-1,r\right]\\\frac{c}{n}:Pr\left[d-1,r-1\right] \end{cases}$$
With probability $\frac{c}{n}$, a success will be met. However, I'm not sure how to solve this recurrence relation for any number of dice/required successes. There's probably an easier way to do this, but I haven't done much discrete probability.
Edit: It looks like a binomial probability distribution works for this part of the problem. This comes in the form of:
$${{d}\choose{r}}\left(\frac{c}{n}\right)^{r}\left(1-\frac{c}{n}\right)^{d-r}$$
Open ended roll: For open-ended rolls, we can find the equivalent number of rolled dice. This is going to be equal to:
$$d+\sum_{j=1}^{\infty}\left(\frac{d}{6^{j}} \right)=\frac{6d}{5}$$
This implies that, given a number of dice $n$, rolling open-ended results in approximately $\frac{6}{5}n$ dice rolled. If we had an easy way to solve the above for any number of dice $n$, it would be easy: we could just input the non-integer value $n$ and get our result. However, since the above is defined with a recurrence relation is a binomial distribution, and thus uses combinations, it won't work for a non-integer number. Thus, we can define a probability recurrence relation as follows:
$$Pr\left[ r,d\right] = \begin{cases} \\1-\frac{c}{n}:Pr\left[d-1,r\right]\\\frac{c-1}{n}:Pr\left[d-1,r-1\right]\\\frac{1}{n}:Pr\left[d,r-1\right] \end{cases}$$
The probability of no significant result is $1-\frac{c}{n}$, the probability of a regular success is $\frac{c-1}{n}$, and the probability of an 'exploding' or open-ended result is $\frac{1}{n}$. However, I don't know how to solve this recurrence relation, either.
So these are my questions:
- For closed rolls, how do I find the probability of $n$ successes? I've looked at existing probability tables (PDF), but they don't actually contain the math for their generation, and it's non-intuitive to discern from the table. Edit: See above; the binomial formula applies.
- For open rolls, can the closed roll formula be applied to a non-integer number $\frac{6n}{5}$? Edit: No. See above; the binomial formula uses combinations, thus requires integer numbers.
- So, how do I solve the closed roll recurrence relation and/or find the open probability?