1
$\begingroup$

When I need to find $E(X|Y=1)$ and have: $f(x,y)=\begin{cases}\lambda^3xe^{-\lambda y} & 0\lt x\lt y\\ 0 & \text{elsewhere}\end{cases}$ Do I need to find both marginal densities to do this? I know that the definition of $E(X|Y=y)=$\begin{align}\int_{-\infty}^{\infty} g(x)f_X(x|Y=1)dx\\ =\int_{-\infty}^{\infty}g(x)P(x|Y=1)dx\\=\int_{-\infty}^{\infty}g(x)*\frac{f(x,y)}{f_Y(y)} dx\end{align} This is the definitiion given in my textbook. Is the $g(x)$ supposed to be the marginal density of $X$?

2 Answers 2

1

First you need to find $f_Y(y) = \int_{-\infty}^{\infty}f(x,y)dx$.

Then, $E(X|Y=y) = \int_{-\infty}^{\infty}x\frac{f(x,y)}{f_Y(y)}dx$ The formula you have written is correct for $E(g(X)|Y=y)$, which is a generalized version of the above.

  • 0
    It is OK to change the limits to the range where $f(x,y)$ is non-zero.2012-12-13
2

I think your book is telling you $E[g(X)\mid Y = y]$ for arbitrary measurable function $g(\cdot)$, not $E[X\mid Y = y]$. And yes, you do need to compute the marginal density of $Y$ in order to divide $f_{X,Y}(x,y)$ in your formula. But you don't need to find both marginal densities, and in this simple case, it is even unnecessary to compute $f_Y(y)$ explicitly; one can get find $f_{X\mid Y=1}$ without knowing the formula for $f_Y(y)$ or what kind of random variable $Y$ is (it is a Gamma random variable, by the way).

The way I would approach the problem is to say that given $Y = 1$, the conditional density of $X$ has shape given by $f(x,1)$ which is a linear function of $x$ for $x \in (0,1)$. The graph shows a triangle whose area must equal $1$ in order to get a valid density. So the conditional density must be $f_{X\mid Y=1}(x\mid Y=1) = 2x\mathbf 1_{(0,1)}$ and so the mean is $\frac{2}{3}$.

  • 0
    Well, I didn't actually bother to _compute_ $f_Y(y)$ _explicitly_. Instead, I claim that the conditional density of $X$ given $Y = y_0$ is _proportional_ to $f_{X,Y}(x,y_0) = (\lambda^3\exp(-\lambda y_0))\cdot x\mathbf 1_{(0,y_0)} = c\cdot x\mathbf 1_{(0,y_0)}$ whose graph is a straight line with value $0$ at $x=0$ and value $c\cdot y_0$ as $x\to y_0$. The area under this curve is $\frac{1}{2}(c\cdot y_0)y_0$, and so it must be that $f_{X\mid Y=y_0}(x\mid Y=y_0) = \frac{2}{y_0^2}x\mathbf 1_{(0,y_0)}.$2012-12-13