One of the universally unwritten rules of Dungeons and Dragons (D&D) is to give the dungeon master a hard time, and of all the banter, no better blow exists than simply proving them wrong. Therefore, when my good friend recently presented our D&D party with what he claimed was a “fair” encounter, despite it ending in failure, it was time to strike… with probability. The following is a description of the encounter:
Grok (a large turtle) was initially tasked to hit the feral wolf of the Canis Collective at least twice in 5 attempts. Grok had a 50% chance to hit the wolf in each of the 5 attempts. If he were to be successful in hitting the wolf at least twice, he would face one final test – to strike the wolf given only a single attempt, in which he had a 33% chance of succeeding.
The probability that Grok would have been successful in his encounter with the wolf can be formulated as the intersection of two events, P(S1) and P(S2).
Assuming that these two events are independent, the probability of success can be reduced to:
Now, considering the first event and its possible outcomes, it is clear that the binomial distribution is a suitable model. The binomial distribution is used to calculate the probability that an outcome will occur n times, given that there are only two possible outcomes. In this example, the two possible events include: Grok striking the wolf and Grok missing the wolf. Below are the equations for both the cumulative binomial distribution function and the binomial coefficient, where p is the probability of success.
To calculate the probability of success of the first event, the cumulative binomial distribution function needs to be evaluated starting at n' = 2 with N = 5 and p = .5. However, to reduce the number of calculations, the probability of failure can be calculated using the cumulative binomial distribution function starting at n' = 0 with N = 1 and p = .5, and then subtracting the total result from 1. This is a direct application of a property of the CDF given below.
Exploiting this CDF property, the probability of failure of the 1st event was calculated below. Note that the only way Grok can fail the 1st event with the wolf is if he is successful on hitting the wolf either zero or one time.
After calculating the individual probabilities of failure, the probability that the 1st event can be completed successfully is:
Finally, knowing that the probability of success for the 2nd event is 33%, the overall probability that Grok’s encounter with the wolf would have been successful is:
Poor Grok – it may be time for my friend to reassess his definition of “fair.”