The game plays like this:
You roll two dices at the same time. If you get same number on both dices, you have to roll again, until you get different numbers. If you get different numbers, you stop.
your payout is the sum of the number on both dices, at the final roll.
What is the expectation of your payout
Follow up questions Guys. I encountered this question in a phone interview. How can I do it quickly and explain it clearly. The methods in the answers are clear and correct, but obviously I couldn't list down all the scenarios. That will take too long and make recruiter feel boring.
Please do advice a good way to explain while thinking.Thanks alot !!
EDIT: I understand that the gain is the sum of the dice values on the terminating throw, that is, when you get different values, you only gain the sum.
There are obviously 6 cases of "continuing the game": 1+1,2+2,3+3,4+4,5+5,6+6. All other cases are terminating throws, and then you get up the gain of every case: $$\begin{array}{ccccccccc} 1+2&=&3&&&&&&&&&&&&&&&&&\\ 1+3&=&4&&2+3&=&5&&&&&&&&&&&&\\ 1+4&=&5&&2+4&=&6&&3+4&=&7&&&&&&&&\\ 1+5&=&6&&2+5&=&7&&3+5&=&8&&4+5&=&9&&&&\\ 1+6&=&7&&2+6&=&8&&3+6&=&9&&4+6&=&10&&5+6&=&11\\ \end{array}$$ Note these cases repeat twice: $X=1;Y=2$ and $X=2;Y=1$ are different events.
So, the expected value of the gain of this "terminating throw" is the average of the possible gains, over all possible $36-6=30$ cases, that is, $$\mathbb{E}\{\text{gain}\}=2\cdot\frac{3+4+5+6+7+5+6+7+8+7+8+9+9+10+11}{30}=7$$
This is because all sums are equiprobable. If the events of gain were not equiprobable, you should calculate the wheighted average.
Why are they equiprobable? Let's see the probability of having a repeating throw, that is, equal values on both dices: $$P_e=P(\text{dice 1}=\text{dice 2})=\sum_{k=1}^6P(X=k\cap Y=k)=6\cdot P(X=k)^2=\frac{1}{6}$$
Then, the probability of having different values is: $$P_n=P(\text{dice 1}\neq\text{dice 2})=1-\frac{1}{6}=\frac{5}{6}$$ And it does not depend on the values!
EDIT 2: this observation comes from comments made during the writing of this answer.
Now, that was the expected gain of one "terminating throw", given that I understand that you only gain the sum of the throw with different values. If you understand that the total gain is the sum of every throw (repeating and terminating throws), we should calculate the probability of having $n$ throws, the associated gain, and then calculate the expected value (using total probability or something like that).
EDIT 3: this is yet another observation from comments.
If you were to define a "winning strategy", that is, try to have a different outcome given that the present "repeating throw" is (1,1) or (2,2), it just doesn't matter because all throws are independent!