I am trying to solve the question in this post using an alternative. For completeness, I will retype the question in my post.
What is the average result of rolling two dice, and only taking the value of the higher dice roll? For example: I roll two dice and one comes up as a four and the other a six, the result would just be six.
My attempt: Let $X_1,X_2$ be the score by dice $1$ and $2$ respectively. Since we have $$\max(X_1,X_2)=\frac{|X_1+X_2| + |X_1-X_2|}{2},$$ it follows that \begin{align*} \mathbb{E}[\max(X_1,X_2)] & = \frac{1}{2}\left[\mathbb{E}(|X_1+X_2|) + \mathbb{E}(|X_1-X_2|)\right] \\ & = \frac{1}{2}\left[ \mathbb{E} (X_1) + \mathbb{E}(X_2) + \mathbb{E}(|X_1-X_2|) \right] \\ & = \frac{1}{2}\left[ 7 + \mathbb{E}(|X_1-X_2|) \right]. \end{align*} where I apply the fact that $X_1,X_2>0$ at second equality. I got stuck at evaluating $$\mathbb{E}(|X_1-X_2|).$$ Any hint is appreciated.
Just for record purpose, the answer is $$\mathbb{E}[\max(X_1,X_2)] = \frac{161}{36}.$$
This is an interview question. So, I expect that there is an easy way to calculate the expectation.