If two standard dices are thrown and $X$ denote the number shown on the first die and $Y$ is the greater of the two numbers shown, then find the correlation coefficient of $X$ and $Y$.
I am able to find the individual distribution functions of $X$ and $Y$ but I cannot find the joint distribution function of $X$ and $Y$ which would allow me to calculate the covariance.
Can anyone please help?
Edit:- After reading @steven mai's solution. I had somewhat of an idea to develop the joint distribution function. $$f(i,j)\left(X=i,Y=j\right) = P(X=i)\cdot P(Y=j\vert X=i)=\frac{1}{6}\cdot P(Y=j\vert X=i)$$ f(i,j)= 1/36 if i<j
=i/36 if i=j
=0 if i>j
(Sorry for not typing in latex as I do not know how to allign the equations).
Is my deduction correct or did I go wrong somewhere?
Let Z be the outcome of the second roll. $$E[XY] = \sum_{x=1}^6 P(X=x)E[XY|X=x] \\ = \sum_{x=1}^6 \frac{x}{6} E[Y|X=x] \\ = 1/6 \sum_{x=1}^6 x (E[Y|X=x, Z\leq x]P(Z\leq x)+E[Y|X=x,Z>x]P(Z>x))$$ Now $E[Y|X=x,Z \leq x] = x$, and $P(Z \leq x) = x/6$, $P(Z>x) = 1-x/6$. $E[Y|X=x,Z>x]=E[Z|X=x,Z>x]=\frac{(x+1)+6}{2}$. You can now evaluate this sum, and find the covariance $Cov(X,Y)=E[XY]-E[X]E[Y]$. Then divide by standard deviations, and you have correlation.