For context, part of the Elven Accuracy feat (Xanathar's Guide to Everything, p. 74) states:
Whenever you have advantage on an attack roll using Dexterity, Intelligence, Wisdom, or Charisma, you can reroll one of the dice once.
So the obvious way to handle this, mechanically, is to roll two dice, pick the lowest, and roll it again. But as an effort to save time, I've proposed instead simply rolling three dice simultaneously, and picking the highest rolled value.
The problem is that I'm not certain that this is mathematically correct.
I created a code simulation that was intended to model the probability curve of both methods, and it suggests that the two methods are mathematically equivalent, but the simulation only performs direct sampling of random numbers and their results; it has unavoidable error in the results, and it doesn't attempt to solve the underlying mathematical principles involved.
//Roll 3, pick highest
ResultSet: Double Advantage
Average: 15.48246
Variance: 14.94721234837884
Std. Deviation: 3.8661624834425727
95% range: [6, 20]
Mode: 20
Median: 16
//Roll 2, reroll lowest, pick highest
ResultSet: Alternate Double Advantage
Average: 15.488486
Variance: 14.944649427739675
Std. Deviation: 3.8658310138623073
95% range: [6, 20]
Mode: 20
Median: 16
Is it correct to say that these two dice-rolling methods are equivalent, or should I stick to the RAW interpretation of how these dice should be rolled?
For full context, I'm planning out a build for a Shadow Sorcerer that fights only in melee combat, and if this character has the ability to nearly-permanently shroud themselves in Darkness (which is one of their class features), it'll give them nearly permanent Advantage against creatures that don't have Devil's Sight or Truesight (or a reliable, spammable Counterspell/Dispel Magic). So simplifying this roll can matter in terms of time saved.
Best Answer
As other answers have stated, this method is equivalent for the higher/highest die but is ambiguous as to the value of the lower die.
That said, here is an intuitive way to think about this and convince yourself that the methods are equivalent for the higher/highest die: Instead of "rolling a die" by immediately tossing it onto a surface and waiting for it to settle, replace that with the two-step process of (1) rattling it under an opaque cup, and (2)removing the cup to reveal the die. The key here is that any amount of time can go between steps (1) and (2).
Now think about the roll two and reroll method, specifically as follows:
Vs the roll three method:
Is anything fundamentally different happening here? No. Nothing is really changing except the order of the reveals. You will always end up selecting the same highest die. But again, there is ambiguity for the identity of the second die.
I find thinking about reroll situations in this way (i.e., separating the generation of the number from my knowledge of it) helpful to sharpen my intuition about how randomness actually works.