\documentclass[a4paper,12pt]{article}

\newcommand{\ds}{\displaystyle}
\begin{document}
\parindent=0pt

{\bf Question}

The random pair $X$ and $Y$ has the distribution

\begin{tabular} {cc|ccc|c} {}&{}&{}& $y$&\\{} & {} & 2 & 3 & 4 & Total\\
                           \hline
                           {} & 1 & $\frac{1}{12}$ & $\frac{1}{6}$ & 0
                           & $-$\\
                           $x$ & 2 & $\frac{1}{6}$ & 0 & $\frac{1}{3}$ &
                           $-$\\
                           {} & 3 & $\frac{1}{12}$ & $\frac{1}{6}$ & 0
                           & $-$\\
                           \hline
                           {} & {} & $-$ & $-$ &
                           $-$& 1
\end{tabular}
\begin{description}
\item[(a)]
Are $X$ and $Y$ independent?  Give reasons.

\item[(b)]
Find the conditional pmf of $Y$ given that $X=2$.

Hence find $E(Y|X=2)$.

\end{description}

\medskip

{\bf Answer}

The probability table is

\begin{tabular} {cc|ccc|c} {}&{}&{}& $y$&\\{} & {} & 2 & 3 & 4 & Total\\
                           \hline
                           {} & 1 & $\frac{1}{12}$ & $\frac{1}{6}$ & 0
                           & $\frac{1}{4}$\\
                           $x$ & 2 & $\frac{1}{6}$ & 0 & $\frac{1}{3}$ &
                           $\frac{1}{2}$\\
                           {} & 3 & $\frac{1}{12}$ & $\frac{1}{6}$ & 0
                           & $\frac{1}{4}$\\
                           \hline
                           {} & {} & $\frac{1}{3}$ & $\frac{1}{3}$ &
                           $\frac{1}{3}$& 1
\end{tabular}
\begin{description}
\item[(a)]
Since  $P(X=1,Y=4)  \ne  P(X=1) \cdot P(Y=4)\ \ (0  \ne
\frac{1}{4} \cdot \frac{1}{3}) $

$X$ and $Y$ are dependent.

\item[(b)]
The conditional distribution of $Y|X=2$ is

\begin{tabular} {c|c|c}    $y$ & $f(y|X=2)$ & {}\\
                           \hline
                           2 & $\frac{1}{6} \div \frac{1}{2}$ & $\frac{1}{3}$\\
                           3 & $0 \div \frac{1}{3}$ & 0\\
                           4 & $\frac{1}{3} \div \frac{1}{2}$ & $\frac{2}{3}$\\
\end{tabular}

$E(Y|X=2)=2 \cdot \ds\frac{1}{3}+3 \cdot 0 + 4 \cdot
\ds\frac{2}{3} = \ds\frac{10}{3}.$
\end{description}

\end{document}
