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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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|cite|improve this question
up vote 3 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|cite|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|cite|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.