Q:

Finding probability density function of a conditional expectation

I´m solving the next exercise of a probability book about conditional expectation:
Let $(X,Y)$ a discrete random vector with probability density function given by
$$f_{x,y}(x,y)=(x+y)/36\quad  x,y\in\{1,2,3\}$$ and zero in other case.
a) Find the probability density function of the random variable $E(X|Y).$
b) Check the formula $E(E(X|Y))=E(X)=78/36.$
I've begun computing marginal density for variable $Y.$ My computations lead me to get $$f_{Y}(y)=\dfrac{2+y}{12}\quad\text{if}\quad y\in\{1,2,3\}$$ and zero in other case.
Then I use the definition of $E(X|Y=y),$ so doing the computations I get $$E(X|Y=y)=\dfrac{6y+14}{6+3y}.$$ 
Due to the above, we conclude that $E(X|Y)=\dfrac{6Y+14}{6+3Y}.$ Then we want to calculate $$P(\dfrac{6Y+14}{6+3Y}=y)$$ which is equivalent to compute $f_{Y}(\frac{6y-14}{6-3y}),$ but here is my problem. I don't know how to calculate that term, because random variable $Y$ is discrete, so the point of evaluation must be a natural number where marginal density of $Y$ takes these values.
How can I compute that value? I would like that $\frac{6y-14}{6-3y}=z$ for every value of $z\in\{1,2,3\},$ but when I do that, the new values of $y$ are rationals.
What am I doing wrong? Is there another way to solve this easily?
Any kind of help is thanked in advanced. 

A:

$$f_{X,Y}(x,y)=(x+y)/36\quad\Big[(x,y)\in\{1,2,3\}^2\Big]$$

a) Find the probability density function of the random variable 
  $\newcommand{\E}{\operatorname{\mathsf E}}\newcommand{\P}{\operatorname{\mathsf P}}\E(X\mid Y)$.

I have no idea why you would want to do this save as a pure exercise. However you were almost there, when you found that, if we let $Z=\E(X\mid Y)$ :
$$\begin{align}f_Y(y) & = \sum_{x=1}^3 (x+y)/36~\Big[(x,y)\in\{1,2,3\}^2\Big] \\[1ex] &= (2+y)/12 \quad\Big[y\in\{1,2,3\}\Big]\\[2ex]Z &= \mathsf E(X\mid Y) \\[1ex] &= \frac{\sum_{x=1}^3 x(x+Y)/36}{\sum_{x=1}^3 (x+Y)/36}\quad\Big[y\in\{1,2,3\}\Big] \\[1ex] &= \frac{2(7+3Y)}{3(2+Y)}\quad\Big[y\in\{1,2,3\}\Big]\end{align}$$
At this point you started to go awry. Because what you were looking for should have been: $\P(Z=z)=\P(\tfrac{6Y+14}{6+3Y}=z)=\P(Y=\tfrac{14-6z}{3z-6})$.   That is:
$$\begin{align} Y &= \frac{2(7-3Z)}{3(Z-2)} \quad\Big[z\in\{\tfrac{20}{9},\tfrac{26}{12},\tfrac{32}{15}\}\Big]\\[2ex] f_Z(z) & = f_Y(\tfrac{2(7-3z)}{3(z-2)}) \\[1ex] &= \frac{2+\frac{2(7-3z)}{3(z-2)}}{12}\quad\Big[z\in\{\tfrac{20}{9},\tfrac{26}{12},\tfrac{32}{15}\}\Big]\\[1ex] &= \frac{1}{18 (z - 2)}\quad\Big[z\in\{\tfrac{20}{9},\tfrac{26}{12},\tfrac{32}{15}\}\Big]\end{align}$$
Then you find $\mathsf E(Z)=\tfrac{13}6$ as ... expected.

