 # Two random variables, X and Y, have the joint density function: f <mo stretchy="false">( gaitaprepeted05u 2022-04-30 Answered
Two random variables, X and Y, have the joint density function:
$f\left(x,y\right)=\left\{\begin{array}{ll}2& 0
Calculate the correlation coefficient between X and Y.
You can still ask an expert for help

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it haillarip0c9
Step 1
Let X and Y random variables with joint density function given by
$f\left(x,y\right)=\left\{\begin{array}{l}2,\phantom{\rule{1em}{0ex}}\text{if}\phantom{\rule{1em}{0ex}}0
The coefficient correlation of X and Y is given by,
$\overline{){\rho }_{XY}=\frac{\mathrm{C}\mathrm{o}\mathrm{v}\left(X,Y\right)}{{\sigma }_{X}{\sigma }_{Y}}=\frac{{\sigma }_{XY}}{{\sigma }_{X}{\sigma }_{Y}}}$
where $\mathrm{C}\mathrm{o}\mathrm{v}\left(X,Y\right)=\mathbb{E}\left[XY\right]-\mathbb{E}\left[X\right]\mathbb{E}\left[Y\right]$ is the covariance of X and Y and ${\sigma }_{X}$ and ${\sigma }_{Y}$ standard deviations.
Now,
${f}_{X}\left(x\right)={\int }_{x}^{1}f\left(x,y\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}y=2\left(1-x\right).$
${f}_{Y}\left(y\right)={\int }_{0}^{y}f\left(x,y\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}x=2y.$
$\mathbb{E}\left[X\right]={\int }_{-\mathrm{\infty }}^{+\mathrm{\infty }}x{f}_{X}\left(x\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}x={\int }_{0}^{1}x\left(2-2x\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}x=\frac{1}{3}$
$\mathbb{E}\left[{X}^{2}\right]={\int }_{-\mathrm{\infty }}^{+\mathrm{\infty }}{x}^{2}{f}_{X}\left(x\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}x={\int }_{0}^{1}{x}^{2}\left(2-2x\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}x=\frac{1}{6}$
$\mathbb{E}\left[Y\right]={\int }_{-\mathrm{\infty }}^{+\mathrm{\infty }}y{f}_{Y}\left(y\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}y={\int }_{0}^{1}y\left(2y\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}y=\frac{2}{3}$
$\mathbb{E}\left[{Y}^{2}\right]={\int }_{-\mathrm{\infty }}^{+\mathrm{\infty }}{y}^{2}{f}_{Y}\left(y\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}y={\int }_{0}^{1}{y}^{2}\left(2y\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}y=\frac{1}{2}$
$\mathbb{E}\left[XY\right]={\int }_{-\mathrm{\infty }}^{+\mathrm{\infty }}{\int }_{-\mathrm{\infty }}^{+\mathrm{\infty }}xyf\left(x,y\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}x\mathrm{d}y={\int }_{0}^{1}{\int }_{0}^{y}xy\left(2\right)\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}x\mathrm{d}y={\int }_{0}^{1}{y}^{3}\phantom{\rule{thinmathspace}{0ex}}\mathrm{d}y=\frac{1}{4}$
$\mathrm{C}\mathrm{o}\mathrm{v}\left(X,Y\right)=\mathbb{E}\left[XY\right]-\mathbb{E}\left[X\right]\mathbb{E}\left[Y\right]=\frac{1}{4}-\frac{1}{3}×\frac{2}{3}=\frac{1}{36}$
${\sigma }_{X}=\sqrt{\mathrm{V}\mathrm{a}\mathrm{r}\left(X\right)}=\sqrt{\mathbb{E}\left[{X}^{2}\right]-\left(\mathbb{E}\left[X\right]{\right)}^{2}}=\sqrt{\frac{1}{6}-{\left(\frac{1}{3}\right)}^{2}}=\frac{\sqrt{2}}{6}$
${\sigma }_{Y}=\sqrt{\mathrm{V}\mathrm{a}\mathrm{r}\left(Y\right)}=\sqrt{\mathbb{E}\left[{Y}^{2}\right]-\left(\mathbb{E}\left[Y\right]{\right)}^{2}}=\sqrt{\frac{1}{2}-{\left(\frac{2}{3}\right)}^{2}}=\frac{\sqrt{2}}{6}$
Therefore,
${\rho }_{XY}=\frac{\mathrm{C}\mathrm{o}\mathrm{v}\left(X,Y\right)}{{\sigma }_{X}{\sigma }_{Y}}=\frac{1/36}{\left(\sqrt{2}/6{\right)}^{2}}=\frac{1}{2}>0.$
Since ${\rho }_{XY}>0$ then X and Y they are positively, linearly correlated, but not perfectly so.
###### Not exactly what you’re looking for? Norah Small
Step 1
The correlation coefficient between X and Y is defined as follows:
${\rho }_{X,Y}=\frac{\mathbb{E}\left[\left(X-{\mu }_{X}\right)\left(Y-{\mu }_{Y}\right)\right]}{{\sigma }_{X}{\sigma }_{Y}}$
However, $\rho$ can be expressed in terms of uncentered moments:

Step 2
It seems that you are struggling with the orders of integration. It helps to recall the Law of Total Expectation, which states that
$\mathbb{E}\left[X\right]=\mathbb{E}\left[\mathbb{E}\left[X|Y\right]\right]$ and $\mathbb{E}\left[Y\right]=\mathbb{E}\left[\mathbb{E}\left[Y|X\right]\right]$
Step 3
Then, the integrals you need to compute are:
$\mathbb{E}\left[X\right]=\mathbb{E}\left[\mathbb{E}\left[X|Y\right]\right]={\int }_{0}^{1}{\int }_{0}^{y}xf\left(x,y\right)\phantom{\rule{thinmathspace}{0ex}}dx\phantom{\rule{thinmathspace}{0ex}}dy$
$\mathbb{E}\left[{X}^{2}\right]=\mathbb{E}\left[\mathbb{E}\left[{X}^{2}|Y\right]\right]={\int }_{0}^{1}{\int }_{0}^{y}{x}^{2}f\left(x,y\right)\phantom{\rule{thinmathspace}{0ex}}dx\phantom{\rule{thinmathspace}{0ex}}dy$
$\mathbb{E}\left[Y\right]=\mathbb{E}\left[\mathbb{E}\left[Y|X\right]\right]={\int }_{0}^{1}{\int }_{x}^{1}yf\left(x,y\right)\phantom{\rule{thinmathspace}{0ex}}dy\phantom{\rule{thinmathspace}{0ex}}dx$
$\mathbb{E}\left[{Y}^{2}\right]=\mathbb{E}\left[\mathbb{E}\left[{Y}^{2}|X\right]\right]={\int }_{0}^{1}{\int }_{x}^{1}{y}^{2}f\left(x,y\right)\phantom{\rule{thinmathspace}{0ex}}dy\phantom{\rule{thinmathspace}{0ex}}dx$
$\mathbb{E}\left[XY\right]={\int }_{0}^{1}{\int }_{x}^{1}xyf\left(x,y\right)\phantom{\rule{thinmathspace}{0ex}}dy\phantom{\rule{thinmathspace}{0ex}}dx$