Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Let $X$ and $Y$ be independent discrete random variables, each taking values $1$ and $2$ with probability $1/2$ each. How do I calculate the covariance between $max(X,Y)$ and $min(X,Y)$?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

First, $$ \begin{array}{} \mathrm{P}(\max(X,Y)=2)=\frac34\qquad\text{and}\qquad\mathrm{P}(\max(X,Y)=1)=\frac14\\ \mathrm{P}(\min(X,Y)=2)=\frac14\qquad\text{and}\qquad\mathrm{P}(\min(X,Y)=1)=\frac34\\ \end{array} $$ Therefore, $$ \mathrm{E}(\max(X,Y))=\frac74\qquad\text{and}\qquad\mathrm{E}(\min(X,Y))=\frac54 $$ Furthermore, $$ \begin{align} \mathrm{P}(\max(X,Y)\min(X,Y)=4)=\mathrm{P}(\min(X,Y)=2)&=\frac14\\ \mathrm{P}(\max(X,Y)\min(X,Y)=2)\hphantom{\ =\mathrm{P}(\min(X,Y)=2)}&=\frac12\\ \mathrm{P}(\max(X,Y)\min(X,Y)=1)=\mathrm{P}(\max(X,Y)=1)&=\frac14\\ \end{align} $$ Therefore, $$ \mathrm{E}(\max(X,Y)\min(X,Y))=\frac94 $$ Thus, $$ \begin{align} &\mathrm{Cov}(\max(X,Y),\min(X,Y))\\ &=\mathrm{E}(\max(X,Y)\min(X,Y))-\mathrm{E}(\max(X,Y))\mathrm{E}(\min(X,Y))\\ &=\frac1{16} \end{align} $$

share|improve this answer
    
Shouldn't $9/4-7/4*5/4=1/16$? –  idealistikz Oct 1 '12 at 6:00
1  
@idealistikz: Indeed! Thanks for catching that. –  robjohn Oct 1 '12 at 7:22

Let $W=\min\{X,Y\}$ and $Z=\max\{X,Y\}$; then the desired covariance is $\mathrm{E}[WZ]-\mathrm{E}[W]\mathrm{E}[Z]$. $W=1$ unless $X=Y=2$, so $\mathrm{Pr}(W=1)=\frac34$ and $\mathrm{Pr}(W=2)=\frac14$, and therefore

$$\mathrm{E}[W]=\frac34\cdot1+\frac14\cdot2=\frac54\;.$$

The calculation of $\mathrm{E}[Z]$ is similar. So is that of $\mathrm{E}[WZ]$: just average the four possibilities according to their respective probabilities.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.