We toss a symmetric coin three times. Let $X$ denote the number of tails in the first two tosses, and $Y$ the number of tails in the last two tosses.
Find the conditional distribution of $X$ given $Y = l$ for $l = 0, 1, 2$.
Compute $E[X| Y = l]$ for $l = 0, 1, 2$.
My Solution:
Range of $X$ = $R_X = \{0,1 ,2\} = R_Y$ = Range of $Y$.
We know that in case of three coin tosses,
$\text{TTT} = (2,2)$
$\text{TTH} = (2,1)$
$\text{THT} = (1,1)$
$\text{THH} = (1,0)$
$\text{HTT} = (1,2)$
$\text{HTH} = (1,1)$
$\text{HHT} = (0,1)$
$\text{HHH} = (0,0)$
So,
$ \begin{array}{|c|c|} \hline \text{Pattern} & \text{Count} \\\hline (2,2) & 1\\\hline (2,1) & 1\\\hline (1,1) & 2\\\hline (1,0) & 1\\\hline (1,2) & 1\\\hline (0,1) & 1\\\hline (0,0) & 1\\\hline \end{array} $
So, our joint distribution table would be:
$ \begin{array}{|c|c|c|c|c|} \hline Y\overset{\LARGE\setminus}{\phantom{.}}\overset{\Large X}{\phantom{l}} & 0 & 1 & 2 & \text{Sum} \\ \hline 0 & \frac{1}{8} & \frac{1}{8} & 0 & \frac{2}{8} \\ \hline 1 & \frac{1}{8} & \frac{2}{8} & \frac{1}{8} & \frac{4}{8} \\ \hline 2 & 0 & \frac{1}{8} & \frac{1}{8} & \frac{2}{8} \\ \hline \text{Sum} & \frac{2}{8} & \frac{4}{8} & \frac{2}{8} & 1 \\ \hline \end{array} $
Conditional distribution of $X$,
$P(X=0|Y=0) = \frac{\frac{1}{8}} {\frac{2}{8}} = \frac{1}{2}$
$P(X=1|Y=0) = \frac{\frac{1}{8}} {\frac{4}{8}} = \frac{1}{4}$
$P(X=2|Y=0) = \frac{0} {\frac{2}{8}} = 0$
$P(X=0|Y=1) = \frac{\frac{1}{8}} {\frac{2}{8}} = \frac{1}{2}$
$P(X=1|Y=1) = \frac{\frac{2}{8}} {\frac{4}{8}} = \frac{2}{4}$
$P(X=2|Y=1) = \frac{\frac{1}{8}} {\frac{2}{8}} = \frac{1}{2}$
$P(X=0|Y=2) = \frac{0} {\frac{2}{8}} = 0$
$P(X=1|Y=2) = \frac{\frac{1}{8}} {\frac{4}{8}} = \frac{1}{4}$
$P(X=2|Y=2) = \frac{\frac{1}{8}} {\frac{2}{8}} = \frac{1}{2}$
Now for the second part $E[X|Y=l]$ for $l=0,1,2$,
From previous calculation we get:
$E[X|Y=0] = (0 \times \frac{1}{2}) +
(1 \times \frac{1}{4}) +
(2 \times 0) = 0.25$
$E[X|Y=1] = (0 \times \frac{1}{2}) +
(1 \times \frac{2}{4}) +
(2 \times \frac{1}{2}) = 1.5$
$E[X|Y=2] = (0 \times 0) +
(1 \times \frac{1}{4}) +
(2 \times \frac{1}{2}) = 1.25$
Is this calculation correct?
Yes. You're method is perfect, and I've not seen any arithmetic mistakes!