Answer:
[tex] E[X |Y=y] = \int_{-\infty}^{\infty} x f_{X,Y} (x|y) dx[/tex]
[tex] E[X|Y=y] =\sum_{x} x f_{X,Y} (x|y)[/tex]
Step-by-step 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:
[tex] f_{X|Y} (x|y) = \frac{f_{X,Y} (x,y)}{f_Y (y)}[/tex]
Where [tex] f_{X,Y} (x,y)[/tex] is the joint density function. And we can define the conditional probability like this:
[tex] P(a\leq X \leq b | Y = y) = \int_{a}^b f_{X,Y} (x|y) dx[/tex]
In order to find the expected value of X given Y=y we just need to find this:
[tex] E[X | Y=y] = \int_{-\infty}^{\infty} x f_{X,Y} (x|y) dx[/tex]
And if we assume that the random variable is discrete then the conditional expectation would be given by:
[tex] E[X|Y=y] =\sum_{x} x f_{X,Y} (x|y)[/tex]
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.