A three dice roll question I got this question from an interview.
A and B are playing a game of dice as follows. A throws two dice and B throws a single die. A wins if the maximum of the two numbers is greater than the throw of B. What is the probability for A to win the game?
My solution.
If $(X,Y)$ are the two random throws of A and $Z$ is the random throw of B, then the problem asks (if I guessed correctly) to compute $P(\max(X,Y)>Z)$. But how to do it? I highly appreciate your help.

Here's a fairly simple way — based on a symmetry argument — to get the solution for dice with $n$ sides, for arbitrarily large $n$, without having to consider up to $n$ different cases.  Instead, the number of cases we need to consider is only proportional to the number of dice involved (i.e. three, in your example).
First note that, if we knew (and thus conditioned the problem on) that no two dice were tied for the highest roll, then the answer would clearly be $\frac23$.  This is because each of the three dice rolled is equally likely to be the one that rolls the highest number, and player A, with two dice for B's one, is twice as likely to own this highest rolling die as B.
However, to get the correct answer for your problem, we do need to consider the possibility of ties.  So let's break up the problem into cases based on how many dice are tied for the highest roll:

*

*The probability that all three dice are tied for highest is clearly $p_3 = \frac1{n^2}$ (where, again, $n = 6$ is the number of sides on the dice).


*The probability that exactly two of the three dice are tied for highest is a bit harder to calculate, but a moment's thought shows that it must equal the probability that there is a two-way tie (but not a three-way one) divided by two (since half the time the two dice that are tied will roll lower than the third one that isn't).  By applying the inclusion-exclusion principle we can see* that the probability of getting a two-way tie is $\frac{3n - 3}{n^2}$, and thus the probability of a two-way tie for the highest roll is half of that, i.e. $p_2 = \frac{3n - 3}{2n^2}$.


*Finally, the probability that there is no tie for the highest roll, i.e. that a single die rolls the unique highest result, is of course $p_1 = 1 - p_2 - p_3 = 1 - \frac{3n - 3}{2n^2} - \frac1{n^2} = \frac{2n^2 - 3n + 1}{2n^2}$.
Now, by the rules of your game:

*

*If all three dice are tied, player B always wins.

*If two dice are tied for highest, player A wins if they have both of these dice, i.e. with probability $\frac13$.

*If there is a single highest die, player A wins if they have it, i.e. with probability $\frac23$.

Thus, the overall probability of player A winning your game is $$p = \frac13 p_2 + \frac23 p_1 = \frac{3n - 3}{6n^2} + \frac{4n^2 - 6n + 2}{6n^2} = \frac{4n^2 - 3n - 1}{6n^2}.$$
In particular, for $n = 6$, $p = \frac{4\cdot36 - 3\cdot6 - 1}{6\cdot36} = \frac{144 - 18 - 1}{216} = \frac{125}{216} ≈ 0.5787.$

*) Specifically, label the dice as $a$, $b$ and $c$, and note that there are three pairs of dice — $(a,b)$, $(a,c)$ and $(b,c)$ — that can be tied.  Let $T_{a,b}$, $T_{a,c}$ and $T_{b,c}$ be the events where each of these pairs is tied, and note that $$P(T_{a,b}) = P(T_{a,c}) = P(T_{b,c}) = \tfrac1n,$$ while $$P(T_{a,b} \cap T_{a,c}) = P(T_{a,b} \cap T_{b,c}) = P(T_{a,c} \cap T_{b,c}) = P(T_{a,b} \cap T_{a,c} \cap T_{b,c}) = \tfrac1{n^2},$$ as any two pairs being tied implies that all three are.
Thus, by the inclusion–exclusion principle, the probability of getting at least a two-way tie is $$\begin{aligned}
P(T_{a,b} \cup T_{a,c} \cup T_{b,c})
&= P(T_{a,b}) + P(T_{a,c}) + P(T_{b,c}) \\
&\qquad - P(T_{a,b} \cap T_{a,c}) - P(T_{a,b} \cap T_{b,c}) - P(T_{a,c} \cap T_{b,c}) \\
&\qquad + P(T_{a,b} \cap T_{a,c} \cap T_{b,c}) \\
&= 3 \tfrac1n - 3 \tfrac1{n^2} + \tfrac1{n^2} = \tfrac{3n-2}{n^2}.
\end{aligned}$$
But the number we actually want is the probability of getting an exactly two-way tie, i.e. $$P(T_{a,b} \cup T_{a,c} \cup T_{b,c}) - P(T_{a,b} \cap T_{a,c} \cap T_{b,c}) = \tfrac{3n-3}{n^2}.$$
