TITLE: Expected winning amounts for $2$ players with different number of sided dice
QUESTION [5 upvotes]: The following is an interview question. 

Given $2$ fair dice. My dice consists of $20$ sides with number from $1$ to $20$. The other player has a  $30$-sided die with numbers from $1$ to $30$. We both flip our own die. If my number is bigger, then the other player gave me my number of dollars and vice versa. But if we got the same number, I will pay the other player the number of dollars. What is the expected value of my winning or lost?

My attempt:
Let $X$ and $Y$ be the score obtained by my die and my opponent respectively.
Therefore, for each $2\leq i\leq 20,$
$$P(I \text{ win } i \text{ amount}) = P(Y<i)\cdot P(X=i) = \frac{(i-1)\times 1}{30\times 20}.$$
On the other hand, for each $-30\leq j\leq -1,$ we have 
$$P(I \text{ lose } j \text{ amount}) = P(X=j)P(Y\geq j) = \frac{1}{20} \frac{30-j+1}{30}$$
It follows that my expected wining amounts is 
$$-\sum_{j=-30}^{-1} j P(I \text{ lose } j \text{ amount}) + \sum_{i=2}^{30} i P(I \text{ win } i \text{ amount}).$$
I am not sure whether I am on the right track.

REPLY [3 votes]: A simpler way of getting the same answer is as follows (again I assume $m>n$ are the two sizes of dice, with yours smaller).

If your opponent rolls higher than $n$, (probability $\frac{m-n}{m}$), you lose the amount he rolls. This is uniform between $n+1$ and $m$, so on average it is $\frac{n+1+m}{2}$. So this gives a contribution of $-\frac{(m-n)(n+m+1)}{2m}=-\frac{m^2-n^2+m-n}{2m}$.
If you both roll different numbers which are $n$ or below (probability $\frac{n-1}{m}$) then it is totally symmetrical so your expected win/loss is $0$.
If you both roll the same number (probability $\frac{1}{m}$), then you lose however much that number is; on average it is $\frac{1+n}{2}$. So this contributes $-\frac{1+n}{2m}$.

Your total expectation is therefore $-\frac{m^2-n^2+m+1}{2m}$, which is the same as Math1000's result.
(This also gives you a quick way to get the answer if you have the larger die, but still pay your opponent when the rolls are equal: just make the first term positive before adding them. Here $m$ is now the number of sides on your die since we assume $m>n$.)