4
\$\begingroup\$

Here is a comprehensive DPR calculator, and here is the mathematics behind it. I'm trying to follow along with the equations.

At the bottom of the second page are formulas for success probability \$L\$ of a Halfling (who has luck) in normal circumstances and with advantage and disadvantage. With advantage it is $$L_{adv} = P_{adv} + \left(\frac{2}{20}(1-P) - \frac{1}{400}\right)P,$$ where:

  • \$P\$ is the probability of succeeding on any single roll and
  • \$P_{adv} = 1 - (1-P)^2\$ is the probability of succeeding with advantage (ie not failing both rolls).

In my attempt for deriving this (below), I have a sign error. Please can someone explain where I've gone wrong/show a correct derivation?

To succeed you require:

  • succeeding outright while advantaged, OR
  • rolling a \$1\$ with die \$a\$ AND failing with die \$b\$, AND THEN succeeding the reroll, OR
  • rolling a \$1\$ with die \$b\$ AND failing with die \$a\$, AND THEN succeeding the reroll, OR
  • rolling two \$1\$s AND THEN succeeding a reroll: $$L_{adv} = P_{adv} + \frac{1}{20}*(1-P)*P + \frac{1}{20}*(1-P)*P + \frac{1}{400}*P\\= P_{adv} + \left(\frac{2}{20}(1-P) + \frac{1}{400}\right)P$$
\$\endgroup\$
1
  • 2
    \$\begingroup\$ @Anagkai Please consider putting that into a full answer below \$\endgroup\$
    – Someone_Evil
    Commented Jun 1, 2020 at 12:25

1 Answer 1

5
\$\begingroup\$

The case where you roll two 1s is actually included in both of the previous two cases (rolling 1 on a, failing on b; rolling 1 on b, failing on a).

Consequently, it has been counted twice and needs to be subtracted from the total instead of added separately.

More generally, this is an example of the Inclusion-Exclusion Principle.

\$\endgroup\$
5
  • \$\begingroup\$ I see. Becuase there is always the underlying assumption that a 1 always fails (either it's combat, or the trivial case when 1 succeeds is neglected)? \$\endgroup\$ Commented Jun 1, 2020 at 10:54
  • \$\begingroup\$ @jonnybolton16 Yeah, it's more about the trivial case being ignored. Unless there's some special case I've missed, if a 1 succeeds then anything succeeds, so P = 1. The given definition of failing doesn't exclude 1, because it's just given as Prob(failure) = 1 - Prob(success) = 1 - P. \$\endgroup\$ Commented Jun 1, 2020 at 10:59
  • 3
    \$\begingroup\$ You cannot reroll both rolls. PHB p.173 "When you have advantage or disadvantage and something in the game, such as the halfling's Lucky trait, lets you reroll the d20, you can reroll only one of the dice." \$\endgroup\$ Commented Jun 1, 2020 at 11:51
  • \$\begingroup\$ @jonnybolton16 Thanks, clearly I missed that! \$\endgroup\$ Commented Jun 1, 2020 at 12:02
  • \$\begingroup\$ @jonnybolton16: Just for completeness - that phrasing has been errataed to also cover things that "replace" rolls. See the basic rules: "When you have advantage or disadvantage and something in the game, such as the halfling's Lucky trait, lets you reroll or replace the d20, you can reroll or replace only one of the dice. You choose which one. For example, if a halfling has advantage or disadvantage on an ability check and rolls a 1 and a 13, the halfling could use the Lucky trait to reroll the 1." \$\endgroup\$
    – V2Blast
    Commented Jun 1, 2020 at 20:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .