# Maximum of 2 random variables

This might be an easy question but currently I'm fighting over it with our TA who gave it in the final exam.

Let $X, Y$ random variables and define $Z= \max \{X, Y\}$ what is the distribution of $Z \mid \{X > Y\}$?

Should be $Z\mid \{X>Y\}\sim X$, right?!

Thank you all.

-
I dislike phrasing this as "the distribution of $Z\mid\{X>Y\}$", because students misconstrue it as "the distribution of $\Big( Z\mid\{X>Y\}\Big)$", as if there were a thing called $Z\mid\{X>Y\}$ whose distribution is sought. It's actually $\Big( \text{the distribution of }Z \Big) \mid\{X>Y\}$. –  Michael Hardy May 9 '12 at 17:21

The distribution of $Z=\max(X,Y)$ given that $X>Y$ is in general not at all the same as the distribution of $X$. There are many examples.

For instance, let us suppose that $X$ and $Y$ are independent, and take on the values $0$ and $1$, each with probability $1/2$. Let $Z=\max(X,Y)$.

Given that $X>Y$, then for sure $Z=1$. Thus the distribution of $Z$ is entirely different from the distribution of $X$. The distribution of $Z$ turns out to be the same as the distribution of $X$, given that $X>Y$. But the conditional distribution of $X$, given that $X>Y$, is not the same thing as the distribution of $X$.

Remark: There is a very large difference between a random variable $V$ and the value that $V$ happens to take on at a particular $\omega$ in the sample space.

-
+1 It's true that the datum $X>Y$ tells us that $Z$ equals $X$, but it also tells us something more about $X$. –  leonbloy May 9 '12 at 13:36

Summaryzing the previous answers, a possible answer to the question is simply $$Z\mid\{X>Y\} \sim X \mid \{X>Y\}\ .$$ I don't know if this is enough for the question but it seems correct to me.

-

In a formal way: you have for any measurable set $A\subseteq \mathbb R$: $$P(\omega:Z(\omega)\in A,X(\omega)>Y(\omega)) = P(\omega:X(\omega)\in A,X(\omega)>Y(\omega))$$ since $Z(\omega) = X(\omega)$ for all $\omega$ such that $X(\omega)>Y(\omega)$.

From the definition of the conditional expectation $\displaystyle{P(\Phi|\Psi) = \frac{P(\Phi,\Psi)}{P(\Psi)}}$ you have $$P(Z\in A|X>Y) = \frac{P(Z\in A,X>Y)}{P(X>Y)} = \frac{P(X\in A,X>Y)}{P(X>Y)}$$ which is in general different from $P(X\in A)$ which is the distribution of $X$.

As an example: let $X\sim\mathcal N(1,1)$ and $Y = 2X$. Then $P(X\geq 1) = 0.5$ and $$P(X>Y) = P(X<0) = p>0$$ is some positive value, but $P(X\geq 1,X>Y) = P(X\geq 1,X<0) = 0$ so $P(Z\geq 1|X>Y) = 0$.

-
nice counter-example! (+1) –  robjohn May 9 '12 at 14:33

The conditional PDF of $Z$ conditionally on $[X\gt Y]$ is the only function $g$ such that, for every bounded measurable function $u$, $$\int u(z)g(z)\mathrm dz=\mathrm E(u(Z)\mid X\gt Y)\propto\mathrm E(u(X); X\gt Y),$$ where $\propto$ means that a factor independent of $u$ was omitted. Let us assume that $X$ and $Y$ are independent. Write $f_X$ for the PDF of $X$ (when this exists) and $G_Y$ for the function defined by $G_Y(y)=\mathrm P(Y\lt y)$ for every $y$ (thus, $G_Y$ is a modified CDF of $Y$ where the inequality sign is strict). Then, $$\mathrm E(u(X); X\gt Y)=\iint u(x)\,[x\gt y]f_X(x)\mathrm d\mathrm P_Y(y)=\int u(x)G_Y(x)f_X(x)\mathrm dx.$$ By identification, $g(z)\propto f_X(z)G_Y(z)$, hence $$\color{red}{g(z)=c^{-1}f_X(z)G_Y(z)},\qquad c=\int f_X(x)F_Y(x)\mathrm dx=\mathrm E(G_Y(X))=\mathrm P(X\gt Y).$$ In particular, $g=f_X$ means that $G_Y$ is constant on $S_X=\{x\mid f_X(x)\ne0\}$. Two examples: (i) If $S_X$ is the whole real line, this is impossible. (ii) If $S_X=(0,+\infty)$, this means that $Y\leqslant0$ with full probability.

In general, assuming the distribution of $X$ is $\mu$, one sees that the distribution of $Z$ conditionally on $[X\gt Y]$ is $\nu$ with $$\color{blue}{\mathrm d\nu(z)=c^{-1}G_Y(z)\mathrm d\mu(z)},\qquad c=\int G_Y(x)\mathrm d\mu(x)=\mathrm E(G_Y(X))=\mathrm P(X\gt Y).$$

-

Let rephrase the question this way: What is the conditional distribution of $X$, given that $X>Y$?

Suppose $\displaystyle X\sim\left.\begin{cases} 1 & \text{with probability }p, \\ 0 & \text{with probability }1-p \end{cases}\right\}$, and $Y$ is an independent copy of $X$.

What is the conditional probability distribution of $X$, given that $X>Y$? It is $$\Pr(X=1\mid X>Y)=1.$$

What is the conditional probability distribution of $X$, given that $X\ge Y$? It is $$\Pr(X=1\mid X \ge Y) = \frac{p}{1-p+p^2}.$$

POSTSCRIPT: I dislike phrasing this as $$\text{the distribution of }Z\mid\{X>Y\},$$ because students misconstrue it as $$\text{the distribution of }\Big( Z\mid\{X>Y\}\Big),$$ as if there were a thing called $Z\mid\{X>Y\}$ whose distribution is sought. It's actually $$\Big( \text{the distribution of }Z \Big) \mid\{X>Y\}.$$

-