# How can I interpret $\max(X,Y)$?

My textbook says:

Let $X$ and $Y$ be two stochastically independent, equally distributed random variables with distribution function F. Define $Z = \max (X, Y)$.

I don't understand what is meant by this. I hope I translated it correctly.

I would conclude that $X=Y$ out of this. And therefore $Z=X=Y$.

How can I interpret $\max(X,Y)$?

-
It is defined pointwise: for a fixed $\omega\in\Omega$: $Z(\omega)=\max(X(\omega),Y(\omega))$, i.e it is the largest of the two real numbers $X(\omega)$ and $Y(\omega)$. – Stefan Hansen Jan 14 '13 at 18:26
For example: $X$ is the outcome of the first roll of a die (1 to 6), $Y$ is the outcome of the second roll (independent). Given the two results, take the maximum, that is the value of $Z$. So $Z$ has possible values 1 to 6 again, but value 1 is unlikely compared to value 6. – GEdgar Jan 14 '13 at 18:31
@GEdgar But $X$ and $Y$ are equally distributed random variables. So why can't I conclude that $X=Y=Z$ ? – Kasper Jan 14 '13 at 18:33
OK, maybe this is your confustion. "Equally distributed" means they have the same distribution, but not that they are equal random variables. So, in my example: the two rolls of the die are equally distributed, but could well come out differently: not all rolls of two dice are "doubles". – GEdgar Jan 14 '13 at 18:42

One concrete example:

Suppose each of the four cells below has probability $1/4$: $$\begin{array}{|c|c|} \hline X=0,\ Y=0 & X=1,\ Y=0 \\ \hline X=0,\ Y=1 & X=1,\ Y=1 \\ \hline \end{array}$$

Then here is how $\max\{X,Y\}$ is distributed: $$\begin{array}{|c|c|} \hline \max=0 & \max=1 \\ \hline \max=1 & \max=1 \\ \hline \end{array}$$ Each cell still has probability $1/4$, so $\Pr(\max\{X,Y\}=1) = 3/4$.

-

What's the problem? Max is the usual maximum of two real numbers (or two real-valued random variables, so that we can define, more explicitely, that $$Z = \begin{cases} X & \text{if X \ge Y} \\ Y & \text{if Y \ge X} \\ \end{cases}$$ So your conclusion is most surely wrong! There is no base for concluding that $Z=X=Y$.

-
But $X$ and $Y$ are equally distributed random variables. So why can't I conclude that $X=Y=Z$ ? – Kasper Jan 14 '13 at 18:34
They are equally distributed, that is very different from being equal! One example: If $X$ is standard normal, and $Y=-X$, then $Y$ is also standard normal, so $X$ and $Y$ has the same distribution, but the probability that $X=Y$ is identically zero. – kjetil b halvorsen Jan 14 '13 at 18:44

Think of it this way: to sample from $Z$, take one sample point from $X$ ($x_i$) and one from $Y$ ($y_i$). The point you sampled from $Z$ is $\max(x_i,y_i)$.

If by $X = Y$ you mean that $X$ and $Y$ are the same distribution AND they're perfectly correlated, then indeed $X = Y = Z$. Otherwise, no. Take for example $X$ and $Y$ to be independent, uniform distributions on $[0, 1]$. Then $Z = \max(X, Y)$ will follow a triangular distribution: $P(Z = z_i) = 2z_i$.

-

A random variable is a function from a sample space to $\mathbb{R}$. Therefore $Z=\max(X,Y)$ means $Z(p):=\max(X(p), Y(p))$ for each $p$ in the sample space.

Also, from that you can't conclude $X=Y=Z$.

-
But what if the sample space is different for $X$ and $Y$? – Kasper Jan 14 '13 at 18:31
$Z$ is still a function so it has to be defined over one sample space, and for that expression to make sense that sample space must be contained in the intersection of sample spaces of $X$ and $Y$. – Z. L. Jan 14 '13 at 18:33