Post · 8 min read· pp. 371–376

5.3.3 Solved Problems


Problem Let XX and YY be two jointly continuous random variables with joint PDF \begin{equation} \nonumber f_{XY}(x,y) = \left{ \begin{array}{l l} 2 & \quad y+x \leq 1, x>0, y>0 \ & \quad \ 0 & \quad \text{otherwise} \end{array} \right. \end{equation} Find Cov(X,Y)\textrm{Cov}(X,Y) and ρ(X,Y)\rho(X,Y).

  • Solution
    • For $0 \leq x \leq 1$, we have \begin{align}%\label{} \nonumber f_X(x)&=\int_{-\infty}^{\infty} f_{XY}(x,y)dy \ \nonumber &=\int_{0}^{1-x}2dy\ \nonumber &=2(1-x). \end{align} Thus, \begin{equation} \nonumber f_{X}(x) = \left{ \begin{array}{l l} 2(1-x) & \quad 0 \leq x \leq 1 \ & \quad \ 0 & \quad \text{otherwise} \end{array} \right. \end{equation} Similarly, we obtain \begin{equation} \nonumber f_{Y}(y) = \left{ \begin{array}{l l} 2(1-y) & \quad 0 \leq y \leq 1 \ & \quad \ 0 & \quad \text{otherwise} \end{array} \right. \end{equation} Thus, we have \begin{align}%\label{} \nonumber EX&=\int_{0}^{1}2x(1-x)dx\ \nonumber &=\frac{1}{3}=EY, \end{align} \begin{align}%\label{} \nonumber EX^2&=\int_{0}^{1}2x^2(1-x)dx\ \nonumber &=\frac{1}{6}=EY^2. \end{align} Thus, \begin{align}%\label{} \nonumber Var (X)=Var(Y)=\frac{1}{18}. \end{align} We also have \begin{align}%\label{} \nonumber EXY&=\int_{0}^{1} \int_{0}^{1-x}2xydydx\ \nonumber &=\int_{0}^{1}x(1-x)^2dx\ \nonumber &=\frac{1}{12}. \end{align} Now, we can find Cov(X,Y)\textrm{Cov}(X,Y) and ρ(X,Y)\rho(X,Y): \begin{align}%\label{} \nonumber \textrm{Cov}(X,Y)&=EXY-EXEY\ \nonumber &=\frac{1}{12}-\left(\frac{1}{3}\right)^2\ \nonumber &=-\frac{1}{36}, \end{align} \begin{align}%\label{} \nonumber \rho(X,Y)&=\frac{\textrm{Cov}(X,Y)}{\sqrt{Var(X) Var(Y)}}\ \nonumber &=-\frac{1}{2}. \end{align}

Problem I roll a fair die nn times. Let XX be the number of $1$'s that I observe and let YY be the number of $2$'s that I observe. Find Cov(X,Y)\textrm{Cov}(X,Y) and ρ(X,Y)\rho(X,Y). Hint: One way to solve this problem is to look at Var(X+Y)Var(X+Y).

  • Solution
    • Note that you can look at this as a binomial experiment. In particular, we can say that XX and YY are Binomial(n,16)Binomial(n,\frac{1}{6}). Also, X+YX+Y is Binomial(n,26)Binomial(n,\frac{2}{6}). Remember the variance of a Binomial(n,p)Binomial(n,p) random variable is np(1−p)np(1-p). Thus, we can write \begin{align}%\label{} \nonumber n\frac{2}{6}.\frac{4}{6}&=Var(X+Y)\ \nonumber &=Var(X)+Var(Y)+2\textrm{Cov}(X,Y)\ \nonumber &=n\frac{1}{6}.\frac{5}{6}+n\frac{1}{6}.\frac{5}{6}+2\textrm{Cov}(X,Y). \end{align} Thus, \begin{align}%\label{} \nonumber \textrm{Cov}(X,Y)=-\frac{n}{36}. \end{align} And, \begin{align}%\label{} \nonumber \rho(X,Y)=\frac{\textrm{Cov}(X,Y)}{\sqrt{Var(X) Var(Y)}}=-\frac{1}{5}. \end{align}

Problem In this problem, you will provide another proof for the fact that ∣ρ(X,Y)∣≤1|\rho(X,Y)| \leq 1. By definition ρXY=Cov(U,V)\rho_{XY}=\textrm{Cov}(U,V), where $ U$ and VV are the normalized versions of XX and YY as defined in Equation 5.22: \begin{align} U=\frac{X-EX}{\sigma_X}, \hspace{10pt} V=\frac{Y-EY}{\sigma_Y}. \end{align} Use the fact that Var(U+V)≥0\textrm{Var}(U+V) \geq 0 to show that ∣ρ(X,Y)∣≤1|\rho(X,Y)| \leq 1.

  • Solution
    • We have \begin{align}%\label{} \nonumber \textrm{Var}(U+V)&=\textrm{Var}(U)+\textrm{Var}(V)+2 \textrm{Cov}(U,V)\ \nonumber &=1+1+2\rho_{XY}. \end{align} Since Var(U+V)≥0\textrm{Var}(U+V) \geq 0, we conclude ρ(X,Y)≥−1\rho(X,Y) \geq -1. Also, from this we conclude that \begin{align}%\label{} \nonumber \rho(-X,Y) \geq -1. \end{align} But ρ(−X,Y)=−ρ(X,Y)\rho(-X,Y)=-\rho(X,Y), so we conclude ρ(X,Y)≤1\rho(X,Y) \leq 1.

Problem Let XX and YY be two independent Uniform(0,1)Uniform(0,1) random variables. Let also Z=max⁡(X,Y)Z=\max(X,Y) and W=min⁡(X,Y)W=\min(X,Y). Find Cov(Z,W)\textrm{Cov}(Z,W).

  • Solution
    • It is useful to find the distributions of ZZ and WW. To find the CDF of ZZ, we can write \begin{align}%\label{} \nonumber F_Z(z)&=P(Z \leq z) \ \nonumber &=P(\max(X,Y) \leq z)\ \nonumber &=P\bigg((X \leq z) \textrm{ and } (Y \leq z)\bigg)\ \nonumber &=P(X \leq z) P(Y \leq z) &(\textrm{since }X \textrm{ and }Y \textrm{ are independent})\ \nonumber &=F_X(z)F_Y(z). \end{align} Thus, we conclude \begin{equation} \nonumber F_Z(z) = \left{ \begin{array}{l l} 0 & \quad z<0 \ z^2 & \quad 0 \leq z \leq 1 \ 1 & \quad z>1 \end{array} \right. \end{equation} Therefore, \begin{equation} \nonumber f_Z(z) = \left{ \begin{array}{l l} 2z & \quad 0 \leq z \leq 1 \ 0 & \quad \text{otherwise} \end{array} \right. \end{equation} From this we obtain EZ=23EZ=\frac{2}{3}. Note that we can find EWEW as follows \begin{align}%\label{} \nonumber 1=E[X+Y]&=E[Z+W] \ \nonumber &=EZ+EW\ \nonumber &=\frac{2}{3}+EW. \end{align} Thus, EW=13EW=\frac{1}{3}. Nevertheless, it is a good exercise to find the CDF and PDF of WW, too. To find the CDF of WW, we can write \begin{align}%\label{} \nonumber F_W(w)&=P(W \leq w) \ \nonumber &=P(\min(X,Y) \leq w)\ \nonumber &=1-P(\min(X,Y) > w)\ \nonumber &=1-P\bigg((X > w) \textrm{ and } (Y > w)\bigg)\ \nonumber &=1-P(X > w) P(Y > w) &(\textrm{since }X \textrm{ and }Y \textrm{ are independent})\ \nonumber &=1-(1-F_X(w))(1-F_Y(w))\ \nonumber &=F_X(w)+F_Y(w)-F_X(w)F_Y(w). \end{align} Thus, \begin{equation} \nonumber F_W(w) = \left{ \begin{array}{l l} 0 & \quad w<0 \ 2w-w^2 & \quad 0 \leq w \leq 1 \ 1 & \quad w>1 \end{array} \right. \end{equation} Therefore, \begin{equation} \nonumber f_W(w) = \left{ \begin{array}{l l} 2-2w & \quad 0 \leq w \leq 1 \ 0 & \text{otherwise} \end{array} \right. \end{equation} From the above PDF we can verify that EW=13EW=\frac{1}{3}. Now, to find Cov(Z,W)\textrm{Cov}(Z,W), we can write \begin{align}%\label{} \nonumber \textrm{Cov}(Z,W)&=E[ZW]-EZEW \ \nonumber &=E[XY]-EZEW\ \nonumber &=E[X]E[Y]-E[Z]E[W] &(\textrm{since }X \textrm{ and }Y \textrm{ are independent})\ \nonumber &=\frac{1}{2}.\frac{1}{2}-\frac{2}{3}.\frac{1}{3}\ \nonumber &=\frac{1}{36}. \end{align} Note that Cov(Z,W)>0\textrm{Cov}(Z,W)>0 as we expect intuitively.

Problem Let XX and YY be jointly (bivariate) normal, with Var(X)=Var(Y)Var(X)=Var(Y). Show that the two random variables X+YX+Y and X−YX-Y are independent.

  • Solution
    • Note that since XX and YY are jointly normal, we conclude that the random variables X+YX+Y and X−YX-Y are also jointly normal. We have \begin{align}%\label{} \nonumber \textrm{Cov}(X+Y,X-Y)&=\textrm{Cov}(X,X)-\textrm{Cov}(X,Y)+\textrm{Cov}(Y,X)-\textrm{Cov}(Y,Y)\ \nonumber &=Var(X)-Var(Y)\ \nonumber &=0. \end{align} Since X+YX+Y and X−YX-Y are jointly normal and uncorrelated, they are independent.

Problem Let XX and YY be jointly normal random variables with parameters μX=0\mu_X=0, σX2=1\sigma^2_X=1, μY=−1\mu_Y=-1, σY2=4\sigma^2_Y=4, and ρ=−12\rho=-\frac{1}{2}.

  1. Find P(X+Y>0)P(X+Y>0).
  2. Find the constant aa if we know aX+YaX+Y and X+2YX+2Y are independent.
  3. Find P(X+Y>0∣2X−Y=0)P(X+Y>0|2X-Y=0).
  • Solution
      1. Since XX and YY are jointly normal, the random variable U=X+YU=X+Y is normal. We have \begin{align}%\label{} \nonumber &EU=EX+EY=-1, \end{align} \begin{align} \nonumber Var(U)&=Var(X)+Var(Y)+2 \textrm{Cov}(X,Y) \ \nonumber &=1+4+2 \sigma_X \sigma_Y \rho(X,Y)\ \nonumber &=5-2 \times 1\times2\times\frac{1}{2}\ \nonumber &=3. \end{align} Thus, U∼N(−1,3)U \sim N(-1,3). Therefore, \begin{align}%\label{} \nonumber P(U>0)=1-\Phi\left(\frac{0-(-1)}{\sqrt{3}}\right)=1-\Phi\left(\frac{1}{\sqrt{3}}\right)=0.2819 \end{align}
      2. Note that aX+YaX+Y and X+2YX+2Y are jointly normal. Thus, for them, independence is equivalent to having Cov(aX+Y,X+2Y)=0\textrm{Cov}(aX+Y,X+2Y)=0. Also, note that Cov(X,Y)=σXσYρ(X,Y)=−1\textrm{Cov}(X,Y)=\sigma_X \sigma_Y \rho(X,Y)=-1. We have \begin{align} \nonumber \textrm{Cov}(aX+Y,X+2Y)&=a\textrm{Cov}(X,X)+2a\textrm{Cov}(X,Y)+\textrm{Cov}(Y,X)+2\textrm{Cov}(Y,Y) \ \nonumber &=a-(2a+1)+8\ \nonumber &=-a+7. \end{align} Thus, a=7a=7.
      3. If we define U=X+YU=X+Y and V=2X−YV=2X-Y, then note that UU and VV are jointly normal. We have \begin{align} \nonumber &EU=-1, Var(U)=3,\ \nonumber &EV=1, Var(V)=12, \end{align} and \begin{align}%\label{} \nonumber \textrm{Cov}(U,V)&=\textrm{Cov}(X+Y,2X-Y)\ &=2\textrm{Cov}(X,X)-\textrm{Cov}(X,Y)+2\textrm{Cov}(Y,X)-\textrm{Cov}(Y,Y)\ \nonumber &=2Var(X)+\textrm{Cov}(X,Y)-Var(Y)\ \nonumber &=2-1-4\ \nonumber &=-3. \end{align} Thus, \begin{align}%\label{} \nonumber \rho(U,V)&=\frac{\textrm{Cov}(U,V)}{\sqrt{Var(U) Var(V)}}\ \nonumber &=-\frac{1}{2}. \end{align} Using Theorem 5.4, we conclude that given V=0V=0, UU is normally distributed with \begin{align}%\label{} \nonumber &E[U|V=0]=\mu_U+ \rho(U,V) \sigma_U \frac{0-\mu_V}{\sigma_V}=-\frac{3}{4}, \ \nonumber &Var(U|V=0)=(1-\rho_{UV}^2)\sigma^2_U=\frac{9}{4}. \end{align} Thus \begin{align}%\label{} \nonumber P(X+Y>0|2X-Y=0)&=P(U>0|V=0)\ \nonumber &=1-\Phi\left(\frac{0-(-\frac{3}{4})}{\frac{3}{2}}\right)\ &= 1-\Phi\left(\frac{1}{2}\right)=0.3085. \end{align}