Roll damage twice, take higher - Math?

46 posts / 0 new
Last post
I'm starting to see more and more powers that say "roll damage twice, take the higher". How much is this actually worth?

By my math, a d4 goes from 2.5 average to 3.15, a d6 to 4.47, a d8 becomes 5.81...

If I were more awake, or if I'd done any simple math in the past few years, I'd be able to do this, but really the question is:

How good is rolling twice and taking the higher? Mathematically.

EDIT: Wow, the math is much simpler than I gave it credit for. To two sig figs:

d4 = 0.63
d6 = 0.97
d8 = 1.31
d10 = 1.65
d12 = 1.99

That is the increase on each die. I think. Not huge, then, but not terrible, either.

The d20, for funsies, is an average increase of 3.325. Yay Avenger.
I expect it will depend upon the size of the dice involved.
it depends on how much you care about average damage and how much you care about minimum damage. 

 
Figured it out. Editing, just in case anyone cares about the simple easy math. Whee.
The odd numbers are there for brutal 1 weapons.  
Dice size / expected increase in damage per die
 
3 /0.444
4 /0.625
5 /0.800
6 /0.972
7 /1.143
8 /1.313
9 /1.481
10 /1.650
11 /1.818
12 /1.986

Edit: whoa, this doesn't like Excel. 
In this case, Brutal isn't exactly the same as an odd number, I'm fairly sure, because you're already rerolling. I'm fairly sure 1d4b1, you get less of an upgrade from this than 1d4 normally.

Not 100% sure... can anyone confirm? Going to bed now, too tired for maths.
brutal 1 dx = d(x-1) + 1
brutal  2 dx = d(x-2) + 2

having nasty calculus flashbacks 
Rolling d12 with brutal 2 is the same as d10+2, since the only possible results are 3-12. Therefore the roll-twice advantage is the same as for rolling twice with a d10. Both rolling twice and rerolling low numbers increase the damage, but having a second of them is a much lower increase in DPR than taking the first of them.
Could you post the solution you're using?  I'd like to be able to embed it in my various character option sheets.

"Nice assumptions. Completely wrong assumptions, but by jove if being incorrect stopped people from making idiotic statements, we wouldn't have modern internet subculture." Kerrus
Practical gameplay runs by neither RAW or RAI, but rather "A Compromise Between The Gist Of The Rule As I Recall Getting The Impression Of It That One Time I Read It And What Jerry Says He Remembers, Whatever, We'll Look It Up Later If Any Of Us Still Give A Damn." Erachima

Rolling d12 with brutal 2 is the same as d10+2, since the only possible results are 3-12. Therefore the roll-twice advantage is the same as for rolling twice with a d10. Both rolling twice and rerolling low numbers increase the damage, but having a second of them is a much lower increase in DPR than taking the first of them.



That's what I was starting to suspect, but it was very late and my math stopped agreeing with me.

What about Brutal 1? Is there still easy math?
well, if all you're interested in is average damage with brutal and no damage rerolls, it's simple +0.5 per brutal.

if you reroll damage, you can still analyze it as d(X-1) + 1, despite dice of odd numbers don't exists. math for rerolling would be a bit more complex, but easily calculated with a spreadsheet (real math would include binomial coefficients that I just can't make look acceptable)

to calculate the average of two dices of n faces:
  doubleAvg(n) = (sum of (2i-1)*i where i is from 1 to n)/n^2

in the end if you do the calculations you end up with
  doubleAvg(n) = n*(n+1)(4n-1)/(6n^2)

I can give you the details of the calculation if you are interested so just shout.

Of course to find out the difference with one dice just calculate doubleAvg(n)-avg(n) with avg(n)=(n+1)/2

That gives pretty much the values given above:
Average for double d4 is 3.125 -- Deviation from average of one dice is 0.625
Average for double d6 is 4.472222222222222 -- Deviation from average of one dice is 0.9722222222222223
Average for double d8 is 5.8125 -- Deviation from average of one dice is 1.3125
Average for double d10 is 7.15 -- Deviation from average of one dice is 1.65
Average for double d12 is 8.48611111111111 -- Deviation from average of one dice is 1.9861111111111107
Average for double d20 is 13.825 -- Deviation from average of one dice is 3.3245

For double rolls of Brutal, if my math is right :
doubleAvgBrutal(n, b) = b + doubleAvg(n-b)



for 2d6b1, it will give an average of 1 + doubleAvg(5) = 1+3.8 = 4.8
for 2d8b1, it will give an average of 1 + doubleAvg(7) = 1+5.142857 = 6.142857


for 2d6b2, it will give an average of 2 + doubleAvg(4) = 2+3.125 = 5.125
for 2d8b2, it will give an average of 2 + doubleAvg(6) = 2+4.472222 = 6.472222

From that you will be able to calculate the increase ...

I'm starting to see more and more powers that say "roll damage twice, take the higher". How much is this actually worth?

By my math, a d4 goes from 2.5 average to 3.15, a d6 to 4.47, a d8 becomes 5.81...

If I were more awake, or if I'd done any simple math in the past few years, I'd be able to do this, but really the question is:

How good is rolling twice and taking the higher? Mathematically.

EDIT: Wow, the math is much simpler than I gave it credit for. To two sig figs:

d4 = 0.63
d6 = 0.97
d8 = 1.31
d10 = 1.65
d12 = 1.99

That is the increase on each die. I think. Not huge, then, but not terrible, either.

The d20, for funsies, is an average increase of 3.325. Yay Avenger.



Notice that "roll twice, take the higher number" is NOT distributive; that is, rolling 2d4 pick the higher of two is NOT double the damage of rolling 1d4 pick the higher of two.  For rolls that involve multiple dice the calculations are a lot less pretty; I actually just wrote a short program to calculate it because that seemed easier than actually writing out a formula in excel.  You can look at furious_kender's Sun Warlock thread where I talk about it a bit more if you'd like.

to calculate the average of two dices of n faces:
  doubleAvg(n) = (sum of (2i-1)*i where i is from 1 to n)/n^2

in the end if you do the calculations you end up with
  doubleAvg(n) = n*(n+1)(4n-1)/(6n^2)




An approximation that makes for easy calculations is that if you roll a dN (N-sided die) n times, and let X be the max of the n rolls, for N fairly large, E(X) ~= N*n/(n+1) + 1/2.

E.g., rolling 2 times approximately averages 2N/3 + 1/2, and when we plug in N=20 we get E(X) ~= 13.833, which is very close to the true value of 13.825.

As mentioned, you can't extrapolate this to the question "If I roll 2d6 twice, what's the expected value of the higher result."  I don't know any convenient formulas in that case.

you are right Elric on the approximation. The non-approximated formula is not hard to use though especially with spreadsheets or any programming languages.

I did not look into the "roll 2d6 twice and what is the expected value of the higher result". I presume you are speaking about what is the stochastic distribution of values. Even if no real formula can be found, it will be easy to device the values for each particular case of interest and as the set of interesting case is small in regards to DnD, it should be enough for our need in the game.

Will be fun to try to find a general formula though.
As mentioned, you can't extrapolate this to the question "If I roll 2d6 twice, what's the expected value of the higher result."  I don't know any convenient formulas in that case.

You just diagnolize it. (Actually, I can't recall the right term from stats, but if you chart it out, it ends up looking like a triangular matrix.)

You have a 1/6th chance of rolling 1,2,3,4,5,6 on the first die.
You then calculate the odds of the second die being higher (not hard) for each roll, and then mulitply all the probabilities through.

If you roll a 1 on the first die (1/6th chance), you have a 5/6th chance of getting higher on the second die, for an average gain of +3.
If you roll a 2 on the first die (1/6th chance), you have a 4/6th chance of getting higher on the second die, for an average gain of +2.5
If you roll a 3 (1/6th chance), you have a 3/6th chance of gaining +2
If you roll a 4 (1/6th chance), you have a 2/6th chance of gaining +1.5
If you roll a 5 (1/6th chance), you have a 1/6th chance of gaining +1
If you roll a 6 (1/6th chance), you have no chance of rolling better.

Multiplying them all together you get (15+10+6+3+1)/36 = an average gain of 35/36ths, or almost +1 on the roll, or 4.47 or so. You can also use this method to calculate other interesting qualities of 2d6 pick highest.
Multiplying them all together you get (15+10+6+3+1)/36 = an average gain of 35/36ths, or almost +1 on the roll, or 4.47 or so. You can also use this method to calculate other interesting qualities of 2d6 pick highest.



This is what I gave the approximation for above (the exact formula was already given).

I was referring to "roll 2d6.  Then roll 2d6 again.  Use whichever of these 2d6 results is higher."  The formulas/approximations so far don't apply in that case.

you are right Elric on the approximation. The non-approximated formula is not hard to use though especially with spreadsheets or any programming languages.



True.  For the full formula in the general case: if you roll a dN (N-sided die) n times, and let X be the max of the n rolls, then

E(X) = (N^(n+1) - 1^n - 2^n - 3^n - ... - (N-1)^n)/N^n.
I was referring to "roll 2d6.  Then roll 2d6 again.  Use whichever of these 2d6 results is higher."  The formulas/approximations so far don't apply in that case.

The same solution works, the table is just bigger.
As mentioned, you can't extrapolate this to the question "If I roll 2d6 twice, what's the expected value of the higher result."  I don't know any convenient formulas in that case.

You just diagnolize it. (Actually, I can't recall the right term from stats, but if you chart it out, it ends up looking like a triangular matrix.)

You have a 1/6th chance of rolling 1,2,3,4,5,6 on the first die.
You then calculate the odds of the second die being higher (not hard) for each roll, and then mulitply all the probabilities through.

EDIT: WARNING! The math below is wrong. EDIT
Interesting. So for example a Pally wielding a Radiant Fullblade and wearing a Ring of the Radiant Storm and attacking with Whirlwind Smite (2[W]) would gain an average of about 1.2 extra damage from the reroll property of the ring (not including crits).
ShakaMath:

Result span is 2-24 on 2d12, 78 possible combinations.

If you roll a 2 (1/78th chance), you have a 77/78th chance of gaining +11.5
If you roll a 3 (1/78th chance), you have a 76/78th chance of gaining +11
If you roll a 4 (2/78th chance), you have a 74/78th chance of gaining + 10.5
If you roll a 5 (2/78th chance), you have a 72/78th chance of gaining + 10
If you roll a 6 (3/78th chance), you have a 69/78th chance of gaining + 9.5
If you roll a 7 (3/78th chance), you have a 66/78th chance of gaining + 9
If you roll a 8 (4/78th chance), you have a 62/78th chance of gaining + 8.5
If you roll a 9 (4/78th chance), you have a 58/78th chance of gaining + 8
If you roll a 10 (5/78th chance), you have a 53/78th chance of gaining + 7.5
If you roll a 11 (5/78th chance), you have a 48/78th chance of gaining + 7
If you roll a 12 (6/78th chance), you have a 42/78th chance of gaining + 6.5
If you roll a 13 (6/78th chance), you have a 36/78th chance of gaining + 6
If you roll a 14 (6/78th chance), you have a 30/78th chance of gaining + 5.5
If you roll a 15 (5/78th chance), you have a 25/78th chance of gaining + 5
If you roll a 16 (5/78th chance), you have a 20/78th chance of gaining + 4.5
If you roll a 17 (4/78th chance), you have a 16/78th chance of gaining + 4
If you roll a 18 (4/78th chance), you have a 12/78th chance of gaining + 3.5
If you roll a 19 (3/78th chance), you have a 9/78th chance of gaining + 3
If you roll a 20 (3/78th chance), you have a 6/78th chance of gaining + 2.5
If you roll a 21 (2/78th chance), you have a 4/78th chance of gaining + 2
If you roll a 22 (2/78th chance), you have a 2/78th chance of gaining + 1.5
If you roll a 23 (1/78th chance), you have a 1/78th chance of gaining + 1
If you roll a 24 (1/78th chance), you have no chance of rolling better.

(885.5 + 836 + 777 + 720 + 655.5 + 594 + 527 + 464 + 397.5 + 336 + 273 + 216 + 165 + 125 + 90 + 64 + 42 + 27 + 15 + 8 + 3 + 1)/6084 = an average gain of 7221.5/6084ths, or approx +1.2 on each 2d12 damage roll.

Seems about right. Cool. Thanks!
Test your PC builds' combat prowess and pit them against other builds at the Core Coliseum - the online D&D arena.
The same solution works, the table is just bigger.



Of course.  All problems of this sort can be solved by: "Calculate all possible combinations of rolls, the probability that you get each, determine the relevant outcome, then multiply probabilities by outcomes and add to get an expected value."

However, it's nicer to have a formula that you can plug in without having to brute force the calculation each time.



The same solution works, the table is just bigger.



Of course.  All problems of this sort can be solved by: "Calculate all possible combinations of rolls, the probability that you get each, determine the relevant outcome, then multiply probabilities by outcomes and add to get an expected value."

However, it's nicer to have a formula that you can plug in without having to brute force the calculation each time.


I agree. But this is really hard to capture in a formula, IMO. I get the approximation thing, but that's still an approximation... (Though it should be noted that even though my IQ actually have been tested to be above that of Forrest Gump , I'm not exactly Einstein when it comes to math... )

However, I guess the straight-forward solution could easily be put into an excel sheet in order to be spared the tedious "brute force" work.

Test your PC builds' combat prowess and pit them against other builds at the Core Coliseum - the online D&D arena.
As mentioned, you can't extrapolate this to the question "If I roll 2d6 twice, what's the expected value of the higher result."  I don't know any convenient formulas in that case.

You just diagnolize it. (Actually, I can't recall the right term from stats, but if you chart it out, it ends up looking like a triangular matrix.)

You have a 1/6th chance of rolling 1,2,3,4,5,6 on the first die.
You then calculate the odds of the second die being higher (not hard) for each roll, and then mulitply all the probabilities through.

If you roll a 1 on the first die (1/6th chance), you have a 5/6th chance of getting higher on the second die, for an average gain of +3.
If you roll a 2 on the first die (1/6th chance), you have a 4/6th chance of getting higher on the second die, for an average gain of +2.5
If you roll a 3 (1/6th chance), you have a 3/6th chance of gaining +2
If you roll a 4 (1/6th chance), you have a 2/6th chance of gaining +1.5
If you roll a 5 (1/6th chance), you have a 1/6th chance of gaining +1
If you roll a 6 (1/6th chance), you have no chance of rolling better.

Multiplying them all together you get (15+10+6+3+1)/36 = an average gain of 35/36ths, or almost +1 on the roll, or 4.47 or so. You can also use this method to calculate other interesting qualities of 2d6 pick highest.



Yup, the actually theory behind determining it is pretty straightforward.  But to the best of my knowledge, once you are talking about rerolling 7d6 + 2d10 twice and taking the higher total, you're better off just writing a macro than trying to plug numbers into a formula.  I would love to be proven wrong about this though, since I don't have any formal training in this area, I just couldn't find a simpler reduction than just brute-forcing it.

Edit:  by the way, while in principle there isn't anything different, you did the math for roll 1d6 twice, pick highest; we were talking about roll 2d6 twice, pick highest total.  In that case the guts of the calculation look like:

If you roll a 2 (1/36 chance) you have a 2/36 chance of rerolling a 3, a 3/36 chance of rerolling a 4, a 4/36 chance of rerolling a 5, a 5/36 chance of rerolling a 6...
etc, and that's just for the first possible value out of 11!

As you can see, it quickly becomes a huge pain in the neck to do this calculation by hand, even for rerolling just two dice.  When you get to three or more dice you are talking about hours of calculation if you just write it all out.

By the way, since people were saying they wanted to be able to calculate this in a spreadsheet, here is a macro that will do it for you:

Excel Reroll macro

Function ExpectedRerollValue(diesize As Long, numdice As Long)


 


rolls = diesize * numdice


 


ReDim ProbExact(rolls)
ReDim ProbAtMost(rolls)


Dim j As Long
For j = numdice To rolls


 


    ProbExact(j) = RecurseDieValue(diesize, numdice, j)
    If j = 1 Then
        ProbAtMost(j) = ProbExact(j)
    Else: ProbAtMost(j) = ProbExact(j) + ProbAtMost(j - 1)
    End If
Next j


 


tempval = 0


 


For j = numdice To rolls
    tempval = tempval + ProbExact(j) * ProbAtMost(j) * j
    For x = j + 1 To rolls
        tempval = tempval + ProbExact(j) * ProbExact(x) * x
    Next x
Next j


 


ExpectedRerollValue = tempval


 


End Function


 


Function RecurseDieValue(s As Long, n As Long, k As Long)


    tempvar = 0


    Dim q As Long


    For q = 0 To Int((k - n) / s)
        tempvar = tempvar + (-1) ^ q * Comb(n, q) * Comb(k - s * q - 1, n - 1)
    Next q


    RecurseDieValue = tempvar * 1# / s ^ n


End Function



Function Factorial(x As Long)


tempvar = 1


For i = 1 To x
    tempvar = tempvar * i
Next i
   
Factorial = tempvar
   
End Function


Function Comb(n As Long, k As Long)


    Comb = Factorial(n) / (Factorial(k) * Factorial(n - k))


End Function




To use this, you need to paste everything inside the sblock into a VBA module associated with the spreadsheet you are using.  Then any time you want to calculate the reroll value just put in the expression "ExpectedRerollValue(s,n)", where s in the number of sides on a die (6 for d6, etc) and n is the number of dice you are rerolling.

Note that this version of the macro doesn't support the brutal property or more than one reroll(although those aren't too hard to add in) and it doesn't support the rolling of more than one type of die at a time (which IS quite hard to add in as far as I can tell).

Note that this macro is completely unoptimized in trems of computing efficiency, which means if you input a high number of dice being rolled it WILL lock up excel for a minute while it calculates the number.  This lag time increases by some non-trivial power of the number of dice being rerolled, so I don't recommend using anything greater than maybe n=10 unless you plan on walking away and making a sandwich or something.  But I promise that it doesn't contain anything malicious and is safe to run, despite what office might warn you about.

Edit:  I changed the algorithm so that it won't bog down even for relatively large values of die size and number of dice.
The same solution works, the table is just bigger.



Of course.  All problems of this sort can be solved by: "Calculate all possible combinations of rolls, the probability that you get each, determine the relevant outcome, then multiply probabilities by outcomes and add to get an expected value."

However, it's nicer to have a formula that you can plug in without having to brute force the calculation each time.

Once you work out the pattern, it goes quickly. The best way to do it is by drawing out a table, and then multiplying out the probabilities. If it gets too big, you just have a computer do it for you.

I feel more comfortable with direct calculations than monte carlo simulations, unless it really is too complicated to do otherwise.

The same solution works, the table is just bigger.



Of course.  All problems of this sort can be solved by: "Calculate all possible combinations of rolls, the probability that you get each, determine the relevant outcome, then multiply probabilities by outcomes and add to get an expected value."

However, it's nicer to have a formula that you can plug in without having to brute force the calculation each time.

Once you work out the pattern, it goes quickly. The best way to do it is by drawing out a table, and then multiplying out the probabilities. If it gets too big, you just have a computer do it for you.

I feel more comfortable with direct calculations than monte carlo simulations, unless it really is too complicated to do otherwise.




If you're talking about my macro, it isn't a monte carlo simulation.  It's doing the exact same calculations you'd be doing on paper, just a lot faster and with a lot less mess.  And trust me, try doing the calculations on paper for four or five dice being rerolled at a time and you will see why I consider it too complicated to do otherwise.
Edit:  by the way, while in principle there isn't anything different, you did the math for roll 1d6 twice, pick highest; we were talking about roll 2d6 twice, pick highest total.  In that case the guts of the calculation look like:

If you roll a 2 (1/36 chance) you have a 2/36 chance of rerolling a 3, a 3/36 chance of rerolling a 4, a 4/36 chance of rerolling a 5, a 5/36 chance of rerolling a 6...
etc, and that's just for the first possible value out of 11!

Why not just use the number of possible combinations and the average increase (like I did for 2d12 above), instead giving you:

Result range 2-12 on two d6 dice, 21 possible combinations:
If you roll a 2 (1/21th chance), you have a 20/21th chance of gaining +5.5
If you roll a 3 (1/21th chance), you have a 19/21th chance of gaining +5
If you roll a 4 (2/21th chance), you have a 17/21th chance of gaining +4.5
aso

Of course, this still creates a rather huge calculation. And there's the chore of having to find out the total number of possible combinations.
Test your PC builds' combat prowess and pit them against other builds at the Core Coliseum - the online D&D arena.
What about the second chance halfing power?

How many low your enemy attack?

(you take the second result even if is higher)
 
Edit:  by the way, while in principle there isn't anything different, you did the math for roll 1d6 twice, pick highest; we were talking about roll 2d6 twice, pick highest total.  In that case the guts of the calculation look like:

If you roll a 2 (1/36 chance) you have a 2/36 chance of rerolling a 3, a 3/36 chance of rerolling a 4, a 4/36 chance of rerolling a 5, a 5/36 chance of rerolling a 6...
etc, and that's just for the first possible value out of 11!

Why not just use the number of possible combinations and the average increase (like I did for 2d12 above), instead giving you:

Result range 2-12 on two d6 dice, 21 possible combinations:
If you roll a 2 (1/21th chance), you have a 20/21th chance of gaining +5.5
If you roll a 3 (1/21th chance), you have a 19/21th chance of gaining +5
If you roll a 4 (2/21th chance), you have a 17/21th chance of gaining +4.5
aso

Of course, this still creates a rather huge calculation. And there's the chore of having to find out the total number of possible combinations.



Maybe I'm misunderstanding you, but once you start talking about more than one die, your distributions are no longer uniform.  Furthermore, if you count combinations of dice, you're not taking into account that some combinations come up more often than others (for example, {2,1} is twice as likely as {1,1}).

I am getting a different number than you did for the 2d12 example.  You came up with about 1.5.  I am getting an increase of about 2.8 based on my method.
What about the second chance halfing power?

How many low your enemy attack?

(you take the second result even if is higher)
 



Second chance is different because you are choosing whether or not to reroll the die based on the result of the first one.  Because it contains an element of choice, there is no simple probability tally for it.
Second chance is different because you are choosing whether or not to reroll the die based on the result of the first one.  Because it contains an element of choice, there is no simple probability tally for it.


yes, the situation is different, but even with a choice involved you can make calculations as if there was no choice/a clear choice.

For example, 50% to get hit, 50% that a reroll means 1 less hit. We can calculate how many hits it takes before possibly turning a hit into a miss become negligible. On one attack, it's 25% chance to take a hit (50% miss, 25% hit which turns into a miss, 25% hit which is rerolled into a hit), for two attacks it's 12,5% chance to get hit twice (25% for two hits, but one is rerolled with a 50% hitchance). In-game, the benefit is often much greater than shown here, for example a forced reroll is better against a crit or when you´ve just boosted your defences or is low on hp.
In-game, the benefit is often much greater than shown here, for example a forced reroll is better against a crit or when you´ve just boosted your defences or is low on hp.



Well that's sort of my point.  Any math you do about second chance is going to be wildly inaccurate and misleading because in order to do the math on it you have to start making all sorts of assumptions about enemy AC, damage, and your defenses.
Edit:  by the way, while in principle there isn't anything different, you did the math for roll 1d6 twice, pick highest; we were talking about roll 2d6 twice, pick highest total.  In that case the guts of the calculation look like:

If you roll a 2 (1/36 chance) you have a 2/36 chance of rerolling a 3, a 3/36 chance of rerolling a 4, a 4/36 chance of rerolling a 5, a 5/36 chance of rerolling a 6...
etc, and that's just for the first possible value out of 11!

Why not just use the number of possible combinations and the average increase (like I did for 2d12 above), instead giving you:

Result range 2-12 on two d6 dice, 21 possible combinations:
If you roll a 2 (1/21th chance), you have a 20/21th chance of gaining +5.5
If you roll a 3 (1/21th chance), you have a 19/21th chance of gaining +5
If you roll a 4 (2/21th chance), you have a 17/21th chance of gaining +4.5
aso

Of course, this still creates a rather huge calculation. And there's the chore of having to find out the total number of possible combinations.



Maybe I'm misunderstanding you, but once you start talking about more than one die, your distributions are no longer uniform.

Could you please elaborate (my math-fu is rather rusty)? Are you referring to the fact that you're six times as likely to get the result 7 than the result 2 when rolling 2d6?

Furthermore, if you count combinations of dice, you're not taking into account that some combinations come up more often than others (for example, {2,1} is twice as likely as {1,1}).

Yes, of course! I confused the number of numerical combinations with the number of die roll combinations that lead to a certain result. Should've seen that... Thanks! (I guess I should be imagining the dice as having two different colors or something.)

I am getting a different number than you did for the 2d12 example.  You came up with about 1.5.  I am getting an increase of about 2.8 based on my method.

Heh, it was actually more wrong than that - I came up with about 1.2...! (OK, stop laughing please... I'm a Business Strategy Consultant, for crying out loud, I'm used to having other people doing my math for me!)

And 2.8 sounds a lot more reasonable, considering that the increase on 1d12 is approx. 1.99.

Btw, does the net increase per die decrease exponentially the more dice you roll? If so, someone well versed in math (hello Molecule!) could create a "short-cut" formula for each die size.

Anyhow, it would be interesting to compare the increase per die for (for example) 2d, 3d, 4d, 5d etc, as it gives you a fair hint if, for example, the Ring of the Radiant Storm will give you a larger net benefit than the War Ring, and the maximum number of dice your average attack typically should have in order to keep a damage reroll ability competetive. Guess I'll have to set up your spread sheet.


Test your PC builds' combat prowess and pit them against other builds at the Core Coliseum - the online D&D arena.
Could you please elaborate (my math-fu is rather rusty)? Are you referring to the fact that you're six times as likely to get the result 7 than the result 2 when rolling 2d6?



Yes.  The mathematical ramification of this is that you can't assume that rolling higher than a 2 will average 5.5; the actual average of 2d6 excluding the result of 2 (or to be more precise, treating the result of 2 as zero) is 250/36 or 6.94.

Conceptually, this is the result we would expect; a number very close to the expected value including the result of 2 (that is, the average value of 2d6, or 7), as it is both a small value and very unlikely to happen so removing that outcome should have a very small.



Btw, does the net increase per die decrease exponentially the more dice you roll? If so, someone well versed in math (hello Molecule!) could create a "short-cut" formula for each die size.




Yes (I'm not sure about exponentially in the mathematical sense, but the benefit per die does decrease per die the more dice you roll).  The reason for this is that at one die, you are equally likely to roll an extremely high or extremely low number.  At a large number of dice, almost every result you get will be pretty close to the average, so the two different rolls are likely to be much closer together.

Unfortunately, as far as shortcuts go, writing it out as a formula is long and messy, and it's very likely that anyone that couldn't just program a macro to perform it isn't going to get any insight of seeing it written out anyway.
Sorry to derail the convo...

Upho, I miss your avatar from before the board switch. I'm pretty visual, so it took me until a couple days ago to associate the new avatar with previous interactions with you on these boards.

Carry on, gentlemen.
Second chance is different because you are choosing whether or not to reroll the die based on the result of the first one.  Because it contains an element of choice, there is no simple probability tally for it.



Actually, when there's a choice ("...and use the second roll even if it's lower") it's really easy to deal with any specific case.

Success/failure rolls: reroll failures.
Success/failure rolls, special case: if your chance of failing is less than your chance of a critical success, reroll everything except critical successes.
Gradient rolls, such as damage or healing: reroll when on the undesired side of average.

Success/failure example: you hit on 12 or above. Without reroll you crit 5%, hit non-crit 40% of the time, miss 55% of the time. With reroll you crit 7.75% of the time, hit non-crit 62% of the time, miss 30.25% of the time.

Special case example: You've arranged feats etc. so you get a critical on 18-20. You miss only on 1. Without reroll, you crit 15% of the time and miss 5% of the time. With reroll, you crit 27.75% of the time and miss 5% of the time.

Gradient example: D8 Brutal 1 gives a damage result from 2 to 8, so average 5. D8 Brutal 1 with reroll, you'll keep the initial roll if it's 5 or above, averaging 6.5 damage on 4/7 of your attacks. On the other 3/7 you'll reroll and average 5 damage. The total is 5.85 average.

(If there is no penalty for rerolling, i.e. if you can look at both rolls and then pick which to use, you might as well ALWAYS reroll.)
"The world does not work the way you have been taught it does. We are not real as such; we exist within The Story. Unfortunately for you, you have inherited a condition from your mother known as Primary Protagonist Syndrome, which means The Story is interested in you. It will find you, and if you are not ready for the narrative strands it will throw at you..." - from Footloose
Well that's sort of my point.  Any math you do about second chance is going to be wildly inaccurate and misleading because in order to do the math on it you have to start making all sorts of assumptions about enemy AC, damage, and your defenses.



yes, the situation is different, but even with a choice involved you can make calculations as if there was no choice/a clear choice.

For example, 50% to get hit, 50% that a reroll means 1 less hit. We can calculate how many hits it takes before possibly turning a hit into a miss become negligible. On one attack, it's 25% chance to take a hit (50% miss, 25% hit which turns into a miss, 25% hit which is rerolled into a hit), for two attacks it's 12,5% chance to get hit twice (25% for two hits, but one is rerolled with a 50% hitchance). In-game, the benefit is often much greater than shown here, for example a forced reroll is better against a crit or when you´ve just boosted your defences or is low on hp.



To rephrase these points: Since Second Chance is an encounter power, you'll have to decide when to use it based on expectations of attacks in the future (particularly how often those attacks will hit and how much damage the attacks will do).  In evaluating the overall worth of Second Chance, it doesn't make sense to assume that you're hit one time and you have to use Second Chance now or never, so you use it.  Also, Second Chance can always be used when you're hit by an attack; this means that if your main goal is to avoid getting knocked unconscious, say, you have a lot of leeway to save Second Chance for that last attack, which means that uncertainty about when to use it matters less than a power like Shield, which you'll probably end up using the first time it applies.

Let's ignore these objections and assume you want to maximize the average amount of damage Second Chance prevents in an encounter, and all attacks do the same average damage on a regular hit, and the same damage on a (natural 20) crit (higher than the damage on a regular hit).  We'll assume you know how many attacks there will be against you after the current one (and it's a set number).

Here, optimal use of Second Chance involves solving a dynamic programming problem to determine whether you should reserve it for a critical or should simply use it on any hit.  Optimal strategy in this simple example would presumably be "if there will be k or more attacks against me left after this attack, only use Second Chance against a critical hit; otherwise use it against any hit."  From this you can determine the optimal k relatively easily.

If we assume a crit is equivalent to 1.5 regular hits, and the chance to hit is 0.5 (0.45 of that non-crit, 0.05 of that a critical hit), we get optimal k=4.  That is, if there will be 4 or more attacks against you after the current attack, only use Second Chance against a critical hit; if there will be fewer than 4 attacks against you after the current attack, use Second Chance against any hit (side note: assuming that the player knows exactly how many attacks there will be against him helps to use Second Chance more effectively, but as long as the player has a pretty good idea of the number of attacks he’ll face, this shouldn’t change much).

Doing some further calculations, the “regular hit equivalents” blocked by Second Chance here are a function of the number of attacks as follows:

# attacks   Regular-hit equivalents blocked
1     0.263
2     0.394
3     0.459
4     0.492
5     0.516
6     0.539
7     0.561
8     0.582
9     0.601
10     0.620
11     0.638
12     0.655
   
Edit- I messed up these numbers a bit initially because Second Chance can also turn regular hits into critical hits if you're unlucky!  This version is more likely correct, but I haven't checked it that closely.

Could you please elaborate (my math-fu is rather rusty)? Are you referring to the fact that you're six times as likely to get the result 7 than the result 2 when rolling 2d6?



Yes.  The mathematical ramification of this is that you can't assume that rolling higher than a 2 will average 5.5; the actual average of 2d6 excluding the result of 2 (or to be more precise, treating the result of 2 as zero) is 250/36 or 6.94.

Conceptually, this is the result we would expect; a number very close to the expected value including the result of 2 (that is, the average value of 2d6, or 7), as it is both a small value and very unlikely to happen so removing that outcome should have a very small.

Yes, good reality check if any numbers you get look suspicious.


Btw, does the net increase per die decrease exponentially the more dice you roll? If so, someone well versed in math (hello Molecule!) could create a "short-cut" formula for each die size.

Yes (I'm not sure about exponentially in the mathematical sense, but the benefit per die does decrease per die the more dice you roll).

I mean in the mathematical sense: we already know the average damage increase of rolling 1d12 twice (approx 1.99) and rolling 2d12 twice (approx 1.4 per die), so theoretically I suppose only the addition of the 3d12 result is needed in order to determine the exponential decay - or a "good enough approximation" - of the damage increase for each added die.

Unfortunately, as far as shortcuts go, writing it out as a formula is long and messy, and it's very likely that anyone that couldn't just program a macro to perform it isn't going to get any insight of seeing it written out anyway.

I can definitely believe that. So of course, even if you can determine the exact exponential decay, there's no guarantee it can be expressed in a simple and easily understandable way. At least if total amateurs like myself are supposed to be able to apply it...

But as I mentioned, I don't think it actually has to be exact, only "good enough" for game purposes (ie an error margin of say max 0.1 in the 1d--9d span). Besides providing entertainment for the odd number fetishist, greater accuracy would have no CO value IMO. So my thought was, if the exact formula would be too complex and messy, perhaps a decent "shortcut" version derived from the results in the relevant span would suffice? Or do you think it would be impossible to determine and write it out as a simplified formula that has acceptable accuracy?
Test your PC builds' combat prowess and pit them against other builds at the Core Coliseum - the online D&D arena.
Good news:

After plugging in and graphing the data for various values of s and n, it seems that the trend follows the form:

r = k*sqrt(n)

where:

r is the increase in value from rerolling (not per die, but overall)
k is a constant that depends on the size of the die
n is the number of times you reroll

The value of k for a given die size appears to be given by the formula k = .17s - .06

Here are sample values for k based on the number of sides on the die:

s = 4 k = 0.63
s = 6 k = 0.97
s = 8 k = 1.31
s = 10 k = 1.65
s = 12 k = 1.98 

You can extend this data to work for brutal weapons by treating (for example) 2d6 brutal 1 as 2d5 + 2.

To sum everything up in terms of simply the values that you can get off the top of your head:

r = (.17*s-.06)*sqrt(n)

As for why these relationships work out so cleanly the way they do, you would have to ask someone that has some kind of formal training in statistics; the closest thing I have to that is a quarter-long nightmare of a physical chemistry class, and I'm sorry to say that I retained very little from it.

My numbers here aren't perfect, unfortunately; there doesn't seem to be a way in excel to fit a curve to a best-fit square root formula, so my sample data to calculate k is slightly inaccurate (but I would guess <1% inaccurate).  If someone knows an easy way to fit a curve to a square root function, that would improve the accuracy a little bit, but if not then this probably serves as a more than good enough approximation.
So if you have 100 rerolls, you get 10x the gain? Doesn't seem right.
So if you have 100 rerolls, you get 10x the gain? Doesn't seem right.



If you have 100 rerolls, you get 10 times the gain over rolling one die.  This means if you go from 3.5 to 4.5 from rolling 1d6 and taking the higher, you'll go from 350 to about 360 from rolling 100d6 twice and taking the higher of the two totals.  This doesn't seem out of the question to me, and regardless the number of dice you are realistically going to reroll is much smaller than that, so if there is some virial coefficient or something that becomes significant at high N, it really isn't going to matter for run of the mill DPR calculations.  For what it's worth, the increase is a pretty excellent fit (R^2 > .9999) to a power function with .49 less than p less than .51 for up to 10 dice, so I'm comfortable saying that this estimate will most likely serve.