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.
The most simple calculation I can imagine is
$$\mathbb{E}(|X_1-X_2|)=\frac{2}{36}\cdot \sum_{i=1}^5 \sum_{j=i+1}^6 (j-i)$$
I used the symmetry here.
The sigma sign term can be easily written down:
$\color{blue}{\text{i 1 2 3 4 5}}$
$\ \text{ 1 1 1 1 1}$
$\ \text{ 2 2 2 2}$
$\ \text{ 3 3 3}$
$\ \text{ 4 4}$
$\ \text{ 5}$
The sums of the columns are just the sums of $n$ consecutive numbers, which is $\frac{n\cdot (n+1)}{2}$. Or you just write down the sums , starting with most right column: $1+3+6+...$