We throw a fair die twice. Let $X$ be equal to the result of the first throw and $Y$ be the non-negative difference of the throws. Calculate $E(X\mid Y)$ and $E(Y^2\mid X)$.
I want to ensure my reasoning and calculations are correct.
$X$ can take on values $1, 2, 3, 4, 5, 6$, whereas $Y$: $0, 1, 2, 3, 4, 5$. Therefore the table of probabilities for those two random variables would look something like this:
$$\begin{array}{|c|c|c|c|c|c|c|c|} \hline \downarrow Y\backslash X \rightarrow & 1 & 2 & 3 & 4 & 5 & 6 & P(Y=j)\\ \hline 0 & \frac{1}{36} & \frac{1}{36} & \frac{1}{36} & \frac{1}{36} & \frac{1}{36} & \frac{1}{36} & \frac{6}{36}\\ \hline 1 & \frac{1}{36} & \frac{2}{36} & \frac{2}{36} & \frac{2}{36} & \frac{2}{36} & \frac{1}{36} & \frac{10}{36}\\ \hline 2 & \frac{1}{36} & \frac{1}{36} & \frac{2}{36} & \frac{2}{36} & \frac{1}{36} & \frac{1}{36} & \frac{8}{36}\\ \hline 3 & \frac{1}{36} & \frac{1}{36} & \frac{1}{36} & \frac{1}{36} & \frac{1}{36} & \frac{1}{36} & \frac{6}{36} \\ \hline 4 & \frac{1}{36} & \frac{1}{36} & 0 & 0 & \frac{1}{36} & \frac{1}{36} & \frac{4}{36} \\ \hline 5 & \frac{1}{36} & 0 & 0 & 0 & 0 & \frac{1}{36} & \frac{2}{36}\\ \hline P(X=i) & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6}\\ \hline \end{array}$$
(So e.g. $P(X=3 \cap Y=2) = \frac{2}{36}$).
Since both $X$ and $Y$ are discrete variables, both expected values would be: $E(X\mid Y)(\omega)=\sum\limits_{i=1}^6 i \cdot P(X=i\mid Y=j)$ and $E(Y^2\mid X)(\omega) =\sum\limits_{j=0}^5 j^2 \cdot P(Y=j\mid X=i)$.
I will give an example of how I calculated each of them:
$$P(X=k\mid Y=1)=\frac{P(X=k \cap Y =1)}{P(Y=1)}=\left\{\begin{matrix} \frac{\frac{1}{36}}{\frac{10}{36}} = \frac{1}{10}, & k\in \{1,6\} \\ \frac{\frac{2}{36}}{\frac{10}{36}} = \frac{2}{10}, & k\in \{2,3,4,5\} \end{matrix}\right.$$
Thus $E(X\mid Y=1)=\frac{1}{10}(1+6) + \frac{2}{10}(2+3+4+5) = \frac{35}{10}$ and:
$$E(X\mid Y)(\omega)=\left\{\begin{matrix} \frac{7}{2}, & \omega \in \{Y=0 \}\\ \frac{7}{2}, & \omega \in \{Y=1 \}\\ \frac{7}{2}, & \omega \in \{Y=2\} \\ \frac{7}{2}, & \omega \in \{Y=3\}\\ \frac{7}{2}, & \omega \in \{Y=4\}\\ \frac{7}{2}, & \omega \in \{Y=5\} \end{matrix}\right.$$
Similarly, for the second conditional expected value we have:
$$P(Y=k\mid X=1) = \frac{P(Y=k \cap X=1)}{P(X=1)} = \frac{\frac{1}{36}}{\frac{1}{6}}=\frac{1}{6}$$
$E(Y^2\mid X=1) = \sum\limits_{k=0}^{5}k^2 P(Y=k\mid X=1) = (0+1+4+9+16+25) \cdot \frac{1}{6} = \frac{55}{6}$
Finally:
$$E(Y^2\mid X)(\omega) = \left\{\begin{matrix} \frac{55}{6}, & \omega \in \{ X= 1 \} \\ \frac{31}{6}, &\omega \in \{ X= 2 \} \\ \frac{19}{6}, &\omega \in \{ X= 3 \} \\ \frac{19}{6}, &\omega \in \{ X= 4 \} \\ \frac{31}{6}, & \omega \in \{ X= 5 \} \\ \frac{55}{6}, & \omega \in \{ X= 6 \} \end{matrix}\right.$$
However, as you can see, some of the final results for both of them are symmetrical. Although I can see why this is the case for $E(Y^2\mid X)$, I don't understand why it happened in $E(X\mid Y)$ and I had to calculate each value separately. Is there any way to see this more quickly?
Let $X_1,X_2$ be the results of the two trials.
The following table gives the nonnegative differences $Y:$ $$ \begin{array}{|c|cccccc|} \hline \downarrow X_2\backslash X_1 \rightarrow & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline 1 & 0 & 1 & 2 & 3 & 4 & 5 \\ 2 & 1 & 0 & 1 & 2 & 3 & 4 \\ 3 & 2 & 1 & 0 & 1 & 2 & 3 \\ 4 & 3 & 2 & 1 & 0 & 1 & 2 \\ 5 & 4 & 3 & 2 & 1 & 0 & 1 \\ 6 & 5 & 4 & 3 & 2 & 1 & 0 \\ \hline \end{array} $$ Suppose we want the probability distribution of $X_1$ given that $Y=4.$ Then we're looking at this: $$ \begin{array}{|c|cccccc|} \hline \downarrow X_2\backslash X_1 \rightarrow & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline 1 & & & & & 4 & \\ 2 & & & & & & 4 \\ 3 & & & & & & \\ 4 & & & & & & \\ 5 & 4 & & & & & \\ 6 & & 4 & & & & \\ \hline \end{array} $$ We have $X_1=1,2,5,6$ with equal probabilities, and that distribution is symmetric about the average, which is $7/2.$
But now suppose we want the conditional distribution of $X_1$ given that $Y=2.$ Then we're looking at this: $$ \begin{array}{|c|cccccc|} \hline \downarrow X_2\backslash X_1 \rightarrow & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline 1 & & & 2 & & & \\ 2 & & & & 2 & & \\ 3 & 2 & & & & 2 & \\ 4 & & 2 & & & & 2 \\ 5 & & & 2 & & & \\ 6 & & & & 2 & & \\ \hline \end{array} $$ Then we have $$ X_1 = \begin{cases} 1 & \text{with probability } p, \\ 2 & \text{with probability } p, \\[4pt] 3 & \text{with probability } 2p, \\ 4 & \text{with probability } 2p, \\[4pt] 5 & \text{with probability } p, \\ 6 & \text{with probability } p, \end{cases} $$ so $p+p+2p+2p+p+p = 1,$ and thus $p=1/8,$ so $X_1=1,2,5,\text{ or }6$ each with probability $1/8$ and $X_1=3\text{ or }4$ each with probability $1/4.$
This is still symmetric about the average of all six numbers, which is still $7/2.$
And similarly with the other numbers.