\documentclass[a4paper,12pt]{article}
\begin{document}

QUESTION Discrete random variables X and Y have the joint
probability
  function given in the following table.

  \begin{tabular}{cccc}
  Y$\backslash$X&1&2&3\\
  1&0.1&0.2&0\\
  2&0.1&0.1&0.1\\
  3&0.2&0&0.2
  \end{tabular}

  \begin{description}

   \item[(i)]
    Calculate E(X), E(Y), Var(X), Var(Y), Cov(X,Y).

   \item[(ii)]
    Tabulate the probability function of Z=2Y-X and use these
    calculations to find E(Z) and Var(Z). Check your values using
    the results obtained in(i).

   \item[(iii)]
    $(X_1,Y_1)$ and $(X_2,Y_2)$ are independent pairs of random
    variables where each pair has the joint probability function
    given above. Calculate $P(X_1+Y_1=2(X_2+Y_2))$.

  \end{description}

ANSWER
 \begin{tabular}{c|ccc|c}
  Y$\backslash$X&1&2&3&$P_Y(y)$\\
  \hline
  1&0.1&0.2&0&0.3\\
  2&0.1&0.1&0.1&0.3\\
  3&0.2&0&0.2&0.4\\
  \hline
  $P_X(x)$&0.4$0.3$0.3
  \end{tabular}

  \begin{description}

   \item[(i)]
    $E(X)=0.4\times1+0.3\times 2+0.3\times3=1.9\\
    E(Y)=0.3\times1+0.3\times 2+0.4\times3=2.1\\
    E(X^2)=0.4\times1^2+0.3\times 2^2+0.3\times3^2=4.3\\
    Var(X)=4.3-1.9^2=0.69\\
    E(Y^2)=0.3\times1^2+0.3\times 2^2+0.4\times3^2=5.1\\
    Var(Y)=5.1-2,1^2=0.69\\
    E(XY)=0.1\times1+0.2\times 2+0\times+0.1\times2+0.1\times 4+0.1\times6+0.2\times3+0\times
    6+0.2\times9=4.1\\
    Cov(X,Y)=4.1-1.9\times2.1=0.11$

   \item[(ii)]
    Z=2Y-X takes values from 0(Y=1,X=2) to 5(Y=3,X=1)

    \begin{tabular}{ccccccc}
    Z&0&1&2&3&4&5\\
    Y=1&0.2&0.1\\
    Y=2&&0.1&0.1&0.1\\
    Y=3&&&&0.2&&0.2\\
    p(z)&0.2&0.2&0.1&0.3&&0.2
    \end{tabular}
    $E(Z)=1\times 0.2+2 \times 0.1 +3 \times 0.3+5 \times0.2=2.3\\
    E(2Y-Z)=2E(Y)-E(X)=4.2-1.9=2.3\\
    E(Z^2)=1^2\times 0.2+2^2 \times 0.1 +3^2 \times 0.3+5^2
    \times0.2=8.3$\\
    Var$(Z)=8.3-2.3^2=3.01$\\
    \begin{tabular}{ccc}
    Var(2Y-Z)&=&4Var(Y)+Var(X)-4Cov(X,Y)\\
    &=&4 $\times$0.69+ 0.69- 4$\times$ 0.11=3.01
    \end{tabular}

   \item[(iii)]
    $X_1 +Y_1$ and $X_2+Y_2$ take values 2,3,4,5,6.\\
     $P(X_1+Y_1=2(X_2+Y_2))$
    \begin{eqnarray*}
   &=&P(X_1+Y_1=2,X_2+Y_2=4\textrm{ or
    }X_1+Y_1=3, X_2+Y_2=6)\\
    &=&P(X_+Y_1=2)P(X_2+Y_2=4)+P(X_1+Y_1=3)P(X_2+Y_2=6)\\
    &=&P(X_1=1,Y_1=1)P \left(\begin{array}{c}
    X_2=1,Y_2=3\\X_2=2,Y_2=2\\X_2=3,Y_2=1\end{array}\right)\\
    &+&P\left(\begin{array}{c}
    X_1=1,Y_1=2\\X_1=2,Y_1=1\end{array}\right)P(2=3,Y_2=3)\\
    &=&0.1 \times 0.3+ 0.3\times 0.2 =0.9
    \end{eqnarray*}

  \end{description}

\end{document}
