# Some excercises on independent and identically distributed random variables

Let $X_1, X_2, X_3$ be three independent and identically distributed random variables with

$$P(X_1 = 0) = 1/5, P(X_1 = 1) = 4/5.$$

Define

$$Y_1 = max\{X_1, X_2\}, \ Y_2 = max\{X_2, X_3\}.$$

Determine the distributions, the expected values and the variances of $Y_1, Y_2$ and determine $Cov(Y_1, Y_2)$.

I believe that, since $X_1, X_2$ and $X_3$ are identically distributed, we are allowed to assume that $max\{X_1, X_2\} = X_1$. Furthermore, due to their identical distribution, we have that $P_{Y_1} = P_{Y_2}$. We receive:

$$P{Y_1}(0) = P(Y_1 = 0) = P(X_1 = 0) = 1/5,$$

$$P{Y_1}(1) = P(Y_1 = 1) = P(X_1 = 1) = 4/5.$$

$X_1, X_2$ and $X_3$ are Bernoulli-distributed, hence

$$E(Y_1) = E(X_1) = 0P(X_1 = 0) + 1P(X_1 = 1) = 4/5 = E(Y_2),$$

$$Var(Y_1) = Var(X_1) = P(X_1 = 0)P(X_1 = 1) = 4/25 = Var(Y_2).$$

Last but not least, since $X_1, X_2$ and $X_3$ are independent, $Y_1$ and $Y_2$ are independent too, hence

$$Cov(Y_1, Y_2) = 0.$$

Is that correct or did I do something wrong?

• I cannot follow your belief that we can assume $\max(X_1,X_2)=X_1$ on base of iid. – drhab Mar 20 '17 at 10:26
• Being of identical distribution does not imply that the variables themselves will be identical, and indeed being of independent distribution in fact guarantees that they need not realise the same value. – Graham Kemp Mar 20 '17 at 10:30

On base of the data we find $Y_i\in\{0,1\}$ a.s. for $i=1,2$, and also that $Y_1,Y_2$ have the same distribution.

Observe that: $$Y_1=0\iff X_1=0\wedge X_2=0$$ so that:$$\Pr(Y_1=0)=\Pr(X_1=0\wedge X_2=0)=\Pr(X_1=0)\Pr(X_2=0)=\frac15\frac15=\frac1{25}$$

Then it follows that: $$\Pr(Y_1=1)=\frac{24}{25}$$

This makes us find the expectation and variance on the way you describe, but with different outcomes:$$\mathbb EY_1=\frac{24}{25}\text{ and Var}Y_1=\frac{24}{25}\frac{1}{25}=\frac{24}{625}$$

For finding $\text{Covar}(Y_1,Y_2)$ we can use the well known equality:$$\text{Covar}(Y_1,Y_2)=\mathbb EY_1Y_2-\mathbb EY_1\mathbb EY_2$$

The expectations $\mathbb EY_i$ are found above, so it remains to find $\mathbb EY_1Y_2$.

I will leave that up to you (give me a signal if you get stuck), and by this realize that $Y_1Y_2$ also takes values in $\{0,1\}$ a.s..

• Thanks for your answer! I would say, if $Y_1Y_2 = 1$, then $Cov(Y_1, Y_2) = E(1) - 24^2/625 = 1 - 24^2/625$, and if $Y_1Y_2 = 0$, then $Cov(Y_1, Y_2) = E(0) - 24^2/625 = 0 - 24^2/625$. – Borol Mar 20 '17 at 10:57
• The covariance of $Y_1,Y_2)$ is a real number. It depends on the common distribution of $Y_1,Y_2$ and not on the outcomes of the random variables $Y_1,Y_2$ (as you seem to think). Can you find $\mathbb EY_1Y_2$? Note that $\mathbb EY_1Y_2=\Pr(Y_1Y_2=1)$ since $Y_1Y_2$ takes values in $\{0,1\}$ a.s. – drhab Mar 20 '17 at 11:03
• So $P(Y_1Y_2 = 1) = P(Y_1 = 1, Y_2 = 1) = P(Y_1 = 1) P(Y_2 = 1) = 24/25 * 24/25 = 24^2 / 25^2$. Hence, $Cov(Y_1, Y_2) = 24^2/25^2 - 24^2/25^2 = 0$. – Borol Mar 20 '17 at 14:25
• Why do you think that $\Pr(Y_1=1,Y_2=1)=\Pr(Y_1=1)\Pr(Y_2=1)$? – drhab Mar 20 '17 at 14:31
• Okay, you're right, that's not correct. So I'd better start off with $P(Y_1 = 1, Y_2 = 1) = P(X_1 = 1 \ or \ X_2 = 1, X_2 = 1 \ or \ X_3 = 1)$? – Borol Mar 20 '17 at 14:35

$\def\P{\operatorname{\mathsf P}}\def\E{\operatorname{\mathsf E}}\def\Cov{\operatorname{\mathsf {Cov}}}$No.   Two random variables being of identical and independent distribution does not mean that their maximum will have the same distribution.   Why would it?

In fact we have, $\P(Y_1=0)~=~\P(\max\{X_1,X_2\}=0) ~=~ \P(X_1=0 \cap X_2=0)~=~1/25\\ \P(Y_1=1)~=~\P(\max\{X_1,X_2)=1)~=~\P(X_1=1\cup X_2=1)~=~24/25\\\E(Y_1) ~=~\E(\max\{X_1,X_2\})~=~24/25$

And so forth.

Use similar argument to find the joint probabilities, and mainly $\P(Y_1=1, Y_2=1)$, to evaluate $$\Cov(Y_1,Y_2)= \E(\max\{X_1,X_2\}\max\{X_2,X_3\})-\E(\max\{X_1,X_2\})\E(\max\{X_2,X_3\})$$