How do I calculate dice roll probabilities while accounting for bonuses and rerolls?

70 Views Asked by At

I'm trying to learn the easiest way to calculate the percentage chance that a dice roller can meet or exceed a target value under the following rule:

  1. Roll a 20-sided die twice.
  2. Add $\pm x$ to the first roll only.
  3. If either roll equals or exceeds the target value of $y$, you win.

Ultimately, I'm trying to put an equation into a spreadsheet so that I can just adjust for $x$ and $y$ to quickly discover the probability. Thanks in advance for any help!

1

There are 1 best solutions below

4
On BEST ANSWER

Let $R$ be the random variable corresponding to the outcome of the dice throw. Let $E_1$ be the event that $R +x \geq y$ for the first throw. Let $E_2$ be the event that $R \geq y$ for the second throw.

It can be derived from the axioms of probability that,

$P(E_1 \cup E_2) = P(E_1)+P(E_2) - P(E_1\cap E_2)$.

By independence of $E_1,E_2$, $P(E_1\cap E_2) = P(E_1)\cdot P(E_2)$, giving us $P(E_1 \cup E_2) = P(E_1)+P(E_2) - P(E_1)\cdot P(E_2)$

In the setting that the 20 sided die is unbiased, $E_1$ occurs when $R$ takes the values from $\{y-x,y-x+1,\dots,20\}$ and $E_2$ occurs when $R$ takes the values from $\{y,y+1,\dots,20\}$. Therefore, $P(E_1) = \frac{(20-(y-x)+1)}{20}$ and $P(E_2) = \frac{20-y+1}{20}$

Substituting the values will give you: $P(E_1\cup E_2) = \frac{xy-y^2+2y-x+399}{400}$.

In case $x$ and $y$ are not in the range $\{1,\dots,20\}$ or $y-x$ is negative, you need to appropriately bound the values in the above probability.