Covariance – Covariance of Functions of Uniform Random Variables $X$, $Y$ ~ $\\text{Uniform}(0,1)$

covarianceexpected valuerandom variablesuniform distribution

Given 2 independent Uniform random variables $X$ and $Y$ ~ $\mathrm{Uniform}(0,1)$. $Z=\max(X,Y)$ and $W=\min(X,Y)$. I want to find $\mathrm{Cov}(Z,W)$.

I know that $\mathrm{Cov}(Z,W) = E\{ZW\} – E\{Z\}.E\{W\}$. So, I proceed as follows :

I could compute the CDF of $Z$ and $W$ as follows:
$$F_Z(z) = P(Z \le z) = P(Max(X,Y) \le z)$$ $$ = P(X \le z).P(Y \le z) = z^2, \forall z \in[0,1]$$
$$F_W(w) = P(W \le w) = P(Min(X,Y) \le w)$$$$ = P(X \le w).P(Y \ge w) + P(X \ge w).P(Y \le w) + P(X \le w).P(Y \le w)$$$$=w(1-w)+w(1-w)+w^2 = 2w-w^2, \forall w \in [0,1]$$

Based on their CDF, the PDF of $Z$ and $W$ can be given by:
$$f_Z(z) = 2z, \forall z \in[0,1]$$ $$f_W(w) = 2-2w, \forall w\in[0,1]$$

From here I can find the expectations as $E\{Z\} = \frac{2}{3}, E\{W\} = \frac{1}{3}$, I am stuck at finding $E\{ZW\}$?

The solved example has very easily mentioned the following :

$$\mathrm{Cov}(Z,W) = E\{ZW\} – E\{Z\}.E\{W\}$$
$$= E\{XY\} – E\{Z\}.E\{W\}$$ My doubt is by what mathematical argument can we directly write $E\{ZW\} = E\{XY\}$? Any theorem or law of Expectation making this possible would be great to know.

Best Answer

$Max(X,Y).Min(X,Y) = X.Y$, always, since either:

  1. $X \geq Y$ in which case $Max(X,Y).Min(X,Y) =X.Y$, or
  2. $X < Y$, in which case $Max(X,Y).Min(X,Y) =Y.X = X.Y$.

So, the relation $Z.W = X.Y$ is always true.

Related Question