995
editsAdvantage: Difference between revisions
Jump to navigation
Jump to search
Replaced hideous math formatting with proper MathML. LaTeX is love. LaTeX is life.
(added the Language of The Universe, i.e. math) |
(Replaced hideous math formatting with proper MathML. LaTeX is love. LaTeX is life.) |
||
Line 85: | Line 85: | ||
A more general way of looking at advantage/disadvantage is calculating the effect on the average of dice rolls. This makes it more broadly applicable than looking at specific rolls and makes it easier to compare to other bonuses and penalties which may apply to a roll. | A more general way of looking at advantage/disadvantage is calculating the effect on the average of dice rolls. This makes it more broadly applicable than looking at specific rolls and makes it easier to compare to other bonuses and penalties which may apply to a roll. | ||
For this we first need to clarify the notations used | For this we first need to clarify the notations used below: D{{math|n}} represents an {{math|n}}-sided die, {{math|P(i)}} is the probability that a variable has value {{math|a}}, {{math|\mathbb{E} }} denotes the average or expected value of a roll, the subscript "adv" means "with advantage", and {{math|1=\textstyle\sum_{i=a}^b x_i}} denotes the sum of a series of numbers {{math|x}} over an index {{math|i}} with {{math|i}} going from {{math|a}} through {{math|b}}. | ||
The formula to calculate the | The formula to calculate the expected value, {{math|\mathbb{E}[x]}}, of a variable {{math|x}} is equal to the sum of every possible value of {{math|x}} multiplied by the chance for {{math|x}} to have that value. | ||
In the case of an {{math|n}}-sided die, D{{math|n}}, this becomes: | |||
* {{math|1=\mathbb{E}[\text{D}n] = \sum_{i=1}^n (i \cdot P(i))}} | |||
* | For a regular dice roll the probability distribution is uniform, which means {{math|1=P(i) = 1/n}} for any {{math|i}}, and using {{math|1=\textstyle\sum_{i=1}^n i = \frac{n(n+1)}{2} }}, we get | ||
For a regular dice roll the | * {{math|1=\mathbb{E}[\text{D}n] = \sum_{i=1}^n(i \cdot P(i)) = \frac{1}{n}\left(\frac{n(n+1)}{2}\right) = \frac{n+1}{2} }} | ||
* | For a dice roll with advantage the chance to roll the number {{math|i}} is equal to the chance that the first die rolls {{math|i}} multiplied by the chance that the second die rolls {{math|i}} or less, multiplied by 2 (because the 2 dice are interchangeable), minus the chance of both dice rolling {{math|i}} (because we counted that possibility twice by multiplying by 2). This gives | ||
For a dice roll with advantage the chance to roll the number | * {{math|1=P_\text{adv}(i) = 2P(i)\sum_{j=1}^i P(j) - P(i)^2 = 2\frac{1}{n} \cdot \frac{i}{n} - \frac{1}{n^2} = \frac{2i - 1}{n^2} }} | ||
* | |||
Applying that to the formula of an average of a die Dx we get | Applying that to the formula of an average of a die Dx we get | ||
* | * {{math|1=\mathbb{E}[\text{D}n \text{ with advantage}] = \sum_{i=1}^n i \cdot\frac{2i - 1}{n^2} = \frac{2}{n^2} \cdot \sum_{i=1}^n i^2 - \frac{1}{n^2} \cdot \sum_{i=1}^n i}} | ||
Here we can use that the sum of squares is | Here we can use that the sum of squares is {{math|1=\textstyle\sum_{i=1}^n i^2 = n(n + 1)(2n + 1)/6}}, which gives | ||
* | * {{math|1= \mathbb{E}[\text{D}n \text{ with advantage}] = \frac{2}{n^2}\left(\frac{n(n+1)(2n+1)}{6}\right) - \frac{1}{n^2}\left(\frac{n(n+1)}{2}\right) = \frac{2n}{3} + 1 + \frac{1}{3n} - \frac{1}{2} - \frac{1}{n} = \frac{2n}{3} + \frac{1}{2} - \frac{1}{6n} }} | ||
To know what bonus having advantage gives to our roll, we calculate | To know what bonus having advantage gives to our roll, we calculate | ||
* | * {{math|1= \mathbb{E}[\text{D}n \text{ with advantage}] - \mathbb{E}[\text{D}n] = \frac{2n}{3} + \frac{1}{2} - \frac{1}{6n} - \frac{x + 1}{2} = \frac{1}{6}\left(n - \frac{1}{n}\right) }} | ||
When we apply this elegant expression to a D20 we get that '''having advantage is equivalent to an average bonus of +3.325'''. | When we apply this elegant expression to a D20 we get that '''having advantage is equivalent to an average bonus of +3.325'''. | ||
Because of symmetry, having disadvantage instead of advantage means we can simply make the permutation of | Because of symmetry, having disadvantage instead of advantage means we can simply make the permutation of {{math|\{1, \dots, n\} \to \{n, \dots, 1\} }} for the values of dice rolls and all the calculations will remain the same. Therefore the size of the bonus of advantage is equal to the size of the penalty of disadvantage. | ||
==Application: [[Savage Attacker]]== | ==Application: [[Savage Attacker]]== |