Mathematical types - stat problem!

Several years ago, someone posted an interesting article discussing dice probabilities. In that article there is a link to this nifty tool (by the same author) that calculates all sorts of probabilities. The interface is very spartan and you need to also install Moscow ML in order to compile it.

EDIT: I just found out that the author has updated the tool here.
 
Last edited:

log in or register to remove this ad


Good stuff - thanks guys! :)

I don't suppose there is also any way to generalize the formulae to a greater number of dice?
 

Good stuff - thanks guys! :)

I don't suppose there is also any way to generalize the formulae to a greater number of dice?

If you roll a dN (N-sided die) n times and let X be the max of the n rolls, then the probability that X = k is:

p_k = (k^n - (k-1)^n)/N^n.

Thus, the expected value of X is:

E(X) = (N^(n+1) - 1^n - 2^n - 3^n - ... - (N-1)^n)/N^n.

For example, if N = 20 and n = 3, you'd get 15.4875, as was mentioned above.
 

I assume the extra reroll replaces the dice it rolled, even if it's worse than the original? Otherwise, this is the same as just rolling three dice and picking the highest result.

If my understanding of your question is correct, then it clearly matters which die you reroll, and you always want to reroll the lower die.

It was specified that the OP always re-rolls the lower die. Given that, it's equivalent to rolling three dice and picking the highest; the die that is re-rolled is one that would be discarded anyway.
 

If you roll a dN (N-sided die) n times and let X be the max of the n rolls, then the probability that X = k is:

p_k = (k^n - (k-1)^n)/N^n.

Thus, the expected value of X is:

E(X) = (N^(n+1) - 1^n - 2^n - 3^n - ... - (N-1)^n)/N^n.

For example, if N = 20 and n = 3, you'd get 15.4875, as was mentioned above.

To add to this a bit: 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) approximately= N*n/(n+1) + 1/2.

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



Remove ads

Top