Answer:
![E[X |Y=y] = \int_(-\infty)^(\infty) x f_(X,Y) (x|y) dx](https://img.qammunity.org/2021/formulas/mathematics/college/qb1rsydy7agcy3d7fqebkc8mmq5tmvknvy.png)
![E[X|Y=y] =\sum_(x) x f_(X,Y) (x|y)](https://img.qammunity.org/2021/formulas/mathematics/college/xmc5td19hfbfiszdlviarqngscmfph0ack.png)
Explanation:
For this case we assume that we have two random variable X and Y continuous, and we define the conditional density of X given Y like this:

Where
is the joint density function. And we can define the conditional probability like this:

In order to find the expected value of X given Y=y we just need to find this:
![E[X | Y=y] = \int_(-\infty)^(\infty) x f_(X,Y) (x|y) dx](https://img.qammunity.org/2021/formulas/mathematics/college/j9fsjxg18hc3kttve3h9ldnpx6cxsta2qp.png)
And if we assume that the random variable is discrete then the conditional expectation would be given by:
![E[X|Y=y] =\sum_(x) x f_(X,Y) (x|y)](https://img.qammunity.org/2021/formulas/mathematics/college/xmc5td19hfbfiszdlviarqngscmfph0ack.png)
And as we can se just change the integral by a sum over the values defined for X, and with this we have the general formulas in order to find the conditional expectation of X given Y=y for the possible cases for a random variable.