the maximum of two random variable The maximum of two random varibles $X$ and $Y$ is:
$$Z=\max\{X,Y\}=
\begin{cases}
X & \text{if } X \geq Y \\
Y & \text{if } Y \geq X
\end{cases}$$
I don't understand. So if I roll two dice, and let the first dice to be $X=\{1,\dots,6\}$ and second to be $Y=\{1,\dots,6\}$, and let $Z$ to be the maximum of the two. How do I define $Z$ then?

If we define $Z$ as tabstop suggested above, we could write
$$\begin{aligned}\ P(Z=z) = P\left[((X=z)\cap(Y\leq z))\cup\left(X<z)\cap(Y=z)\right)\right] \\ \ = P(X=z) \cdot P(Y\leq z) + P(X<z)\cdot P(Y=z) \\ \ = \frac{1}{6}\cdot \frac{z}{6}+\frac{z-1}{6}\cdot\frac{1}{6}  \\ \ = \frac{2z-1}{36} \end{aligned} $$
If we make a $6\times 6$ table with the numbers $1$ through $6$ running the columns and the rows, and fill each entry in the table with the max of its column and row index, then we can see that the above fraction describes the distribution of $Z$.
