Find $E(Y|X) $ for $f(x,y)=e^{-y}$, where $0 \leq x \leq y$:
I know that $E(Y|X)=\int_{0}^x tf(y|x)dt = \int_{0}^x \frac{tf(x,y)dt}{f(x)}=\int_{0}^x \frac{te^{-y}dt}{\int_{x}^\infty e^{-y}dy}$.
However, I know that the answer should be $E(Y|X)=x+1$, and my work above does not give me this answer. I think my problem comes from my bounds of integration for $f(x)$. I also tried $0$ and $\infty$ but that did not give me $x+1$ as well. Did I do something wrong? Any help is appreciated.
You have to take care here (it's okay to use any dummy variable you want in integrating, but you have to make sure to plug it in for all instances). Also we have $y\ge x$ as the support for $y$ so all the integrals go from $x$ to $\infty:$ $$ E(Y|X=x) = \int_x^\infty yf(y\mid x) \;dy = \int_x^\infty y \frac{f(y,x)}{f(x)}\; dy = \frac{1}{\int_x^\infty e^{-y}dy}\int_x^\infty ye^{-y}dy$$