Let. $X \sim \mathcal{U}(0,1)$. Given $X = x$, let $Y \sim \mathcal{U}(0,x)$. How can I calculate $\mathbb{E}(X|Y = y)$?

290 Views Asked by At

Suppose that $X$ is uniformly distributed over $[0,1]$. Now choose $X = x$ and let $Y$ be uniformly distributed over $[0,x]$. Is it possible for us to calculate the "expected value of $X$ given $Y = y$", i.e., $\mathbb{E}(X|Y = y)$?

Intuitively, it seems that if $y = 0$, we gain no information, and so $\mathbb{E}(X|Y = 0) = \mathbb{E}(X) = \dfrac{1}{2}$, and also that if $y = 1$, it must be the case that $x = 1$, so $\mathbb{E}(X|Y = 1) = 1$. I don't know if this reasoning is correct, but if it is, then it seems to suggest that $\mathbb{E}(X|Y = y)$ should be a monotonic function of $y$ over $[0,1]$, increasing from $\dfrac{1}{2}$ to $1$.

I can also try to do some calculations with probability densities. From the statement of the problem, we have $f_X = 1$ and $f_{Y|X} = \dfrac{1}{x}$. Now, the joint distribution is $f_{XY} = f_X f_{Y|X} = \dfrac{1}{x}$, and as a sanity check we can verify that indeed $\displaystyle\int_0^1 \int_0^x \dfrac{1}{x} \,\mathrm{d}y \,\mathrm{d}x = 1$.

Now it seems to me that $\displaystyle f_Y = \int_y^1 f_{XY} \,\mathrm{d}y = -\ln(y)$, and so we can do the following calculation:

$$f_{X|Y} = \frac{f_{Y|X} f_X}{f_Y} = -\frac{1}{x \ln y}.$$

Now, I thought that I would be able to perform the following calculation to arrive at my result:

$$\mathbb{E}(X|Y = y) = \int_y^1 -\frac{1}{x \ln y} \cdot x \,\mathrm{d}x = \frac{y-1}{\ln y}.$$

Is this right? If not, where have I gone wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

Everything is correct, except your intuition, which is only partially right: $E[X|Y=0]=0$, not $1/2$. In fact, the smaller $Y$ is, the more likely $X$ is to be small. More precisely, the conditional density of $X$ at $x$ given $Y=y$ is proportional (by Bayes) to that of $Y$ at $y$ given $X=x$, that is, to $1/x$. And since $1/x$ integrates to infinity on $[0,1]$, we get that the conditional density of $X$ converges, as $y\to0 $, to the delta function at $0$.