Given a joint density function, what is the conditional expectation $E[Y|x]$? The random variables $X$ and $Y$ have the joint density $$f_{X,Y}(x,y)=
\left\{\begin{matrix}e^{-y}, \mbox{ } 0\leq x \leq y \le \infty
\\ 0,  \mbox{   otherwise}\end{matrix}\right.$$
Evaluate the conditional expectation $E[Y|x]$.  
I'm not sure if I'm doing this correctly. Please let me know if something is off in my solution. Thanks for reading.
My solution:
(My expected value is negative, which I'm pretty sure can never be the case. Also in line 4 and 8, are the domains correct?)
$$E[Y|x] = \int_{-\infty}^{\infty}yf_{Y|X}(y|x)dy.$$
$$f_{Y|X}(y|x) = \frac{f_{X,Y}(x,y)}{f_{X}(x)}.$$ 
$$f_{X}(x) = \int_{-\infty}^{\infty}f_{X,Y}(x,y)dy$$ 
$$= \int_{0}^{\infty}e^{-y}dy $$
$$=\left [ -e^{-y} \right]\Big|_0^\infty $$
$$ = -e^{-\infty}-(-e^{0})=1. $$
$$f_{X}(x) = 1, x \geq 0.$$
Thus, 
$$E[Y|x] = \int_{0}^{\infty}-ye^{-y}dy$$
$$= -\int_{0}^{\infty}ye^{-y}dy$$
After integration by parts, 
$$E[Y|x] = \left [ ye^{-y}+e^{-y} \right]\Big|_0^\infty$$
$$=0-[e^{0} + 0]=-1$$
Therefore, $E[Y|x] = -1.$
Thanks in advance for reading this long problem and responding!
 A: The limits in your fourth line are wrong since you know the joint density is $0$ unless $0\leq x \leq y \le \infty$ so it should be  $$f_{X}(x) = \int_{x}^{\infty}e^{-y}dy , \mbox{ } 0\leq x  \le \infty $$ leading to $$f_{X}(x)=
\left\{\begin{matrix}e^{-x}, \mbox{ } 0\leq x  \le \infty
\\ 0,  \mbox{   otherwise}\end{matrix}\right.$$
That will then give you 
$$f_{Y \mid X=x}(y)=
\left\{\begin{matrix}\dfrac{e^{-y}}{e^{-x}}, \mbox{ } 0\leq x  \leq y \le \infty
\\ 0,  \mbox{   otherwise}\end{matrix}\right.$$ and $$E[Y \mid X=x]=
\int_{x}^{\infty}y\frac{e^{-y}}{e^{-x}}dy = x+1$$
which is an example of the memorylessness property of the exponential distribution
A: Yes, that negative expected value is absurd and a sign you did something wrong.

$$f_X(x) = \int_0^{\infty} e^{-y}\,dy$$

This line is the first mistake. The density function is zero unless $y\ge x$, so that should be $\int_x^{\infty}$ instead, and the probability you're dividing by will depend on $x$ - in a way that makes it a single-variable density. A constant density of $1$ on $[0,\infty)$ for $f_X(x)$ is also an absurdity you could have caught.

$$E(Y|x) = \int_0^\infty -ye^{-y}\,dy$$

All right, this should be divided by what we just got for $f_X$ - but that's not the only problem. How, exactly, did a minus sign appear here out of nowhere? The integrand should be a probability density function times $y$, and densities are nonnegative.
Also, again, this will be an integral from $x$ to $\infty$, as the density is zero unless $y \ge x$.
Oh, and here's a neat interpretation of this distribution: Choose $x$ and $z$ independently from exponential distributions of parameter $1$, and then let $y=x+z$.
