# Probability of winning a dice roll when the two players have difference die sizes

Say for a moment two people each have a single die. One has $$m$$ sides while the other has $$n$$ sides. Assuming the dice are each fair (as in, each die has an equal chance to roll any side... obviously if $$m > n$$ it doesn't seem fair!) how can I calculate the chance of either one winning?

In my exact situation, my "dice" have many thousands of sides, so it would be prohibitive of me to make a "truth table" so to speak. I doubt that affects the formulas but figured I should add it for relevance.

I was thinking that assuming $$m > n$$, then when $$m$$ rolls a 1, then $$n$$ wins $$n-1$$ number of times (i.e. when they don't roll a 1). Same situtation where $$m$$ rolls a 2, $$n$$ has $$n-2$$ rolls that win. So we have this $$n - 1 + n - 2 ...$$ which seems to be $$(n *( n+1))/2$$ for large n. Since there are $$m*n$$ number of possible combos, the chance of $$n$$ winning is $$((n*n+1)/2)/(m*n)$$ and cancelling $$n$$ yields $$(n+1)/(2*m)$$ but I could be completely off base with it and could use some guidance.

This result doesn't sit well with me because for very large n (say 5000 and 5001) they should be very, very close to eachother where this gives a massive bonus to the 5001. So clearly I messed something up!

For purposes of this, you may ignore ties. It is sufficient to select one player as the "interesting" player and simply determine if that player "wins" or not. For such large n, ties are effectively irrelevant anyway.

The number of outcomes where player $$M$$ beats (or ties) player $$N$$ is given by the sum $$\sum_{i=1}^{n}\sum_{j=i}^m1 = \sum_{i=1}^{n}(m-i) = mn - \sum_{i=1}^{n}i = mn-\frac{n(n+1)}{2}.$$ Dividing through by the total number of outcomes $$mn$$ yields $$P(\text{M does not lose}) = 1 - \frac{n+1}{2m},$$ which for large $$n, m$$ roughly equal is close to $$\frac{1}{2}$$ as expected.

• Oh duh, of course the $2m$ in that denominator means it's about 1/2... I was thinking it should be 1 but that makes so much sense, logically. – corsiKa Sep 4 at 4:24
• In general, if $n$ and $m$ are large then we can ignore the 1 in the numerator to get $P(loss) = \frac{1}{2}\cdot\frac{n}{m}$, which makes sense since intuitivelly the win/loss ratio should depend solely on the ratio of $n$ to $m$. – Andrew Sep 4 at 4:28
• Yet another way of looking at it: if the $m$-sided die rolls $\gt n$ then it always wins; the probability of this is $(m-n)/m$. If it rolls $\leq n$ (which happens with probability $n/m$) then $m$ wins with probability $(n^2-n)/2n^2$ = $(n-1)/2n$. So the total probability that the $m$-sided die wins is $\frac{m-n}m+\left(\frac nm\right)\left(\frac{n-1}{2n}\right)$ $=\frac{2(m-n)}{2m}+\frac{n-1}{2m}$ $=\frac{2m-n-1}{2m}$, the same expression that Andrew derives. – Steven Stadnicki Sep 4 at 5:07

Assuming "winning" means having a greater number than the other player.

Die $$n$$ has sides $$1,2,3,...,n$$ and die m has sides $$1,2,3,...,m$$. We can treat this as a probability tree, starting with $$n$$ rolling. Each side $$i$$ of $$n$$ has a $$1/n$$ probability of being rolled. Given a side $$i$$, the probability of $$m$$ winning is $$(m-i)/m$$.

Thus, the initial formula is: $$\left(\frac{1}{n}\right) \times \sum_{i=1}^n\frac{m-i}{m}$$

The sum can be written as: $$\frac{nm - \sum_{i=1}^ni}{m}$$

Since $$\sum_{i=1}^ni = \frac{n(n+1)}{2}$$, the final formula then becomes: $$\frac{2m-n-1}{2m}$$

• This is excellent - is there a cute trick that would allow me to calculate that sum? Like, in Excel? =) – corsiKa Sep 4 at 4:15
• You can undoubtedly do it using python, I'm not super familiar with excel but I imagine there should be some similar trick. – Poseidon23 Sep 4 at 4:18
• After some thought, the sum is equivalent to (mn - in)/m – Poseidon23 Sep 4 at 4:23