Find $E[X\mid Y]$ where $Y$ is uniform on $[0,1]$ and $X$ is uniform on $[1,e^Y]$

165 Views Asked by At

Let $Y$ a uniform random variable in $[0,1]$, and let $X$ a uniform variable in $[1,e^Y]$

My work

By definition
$E(X\mid Y)=\int_{x\in A}xp(x\mid y)\,dx$

Now, I need the function $f(x\mid y)$.

By definition, $f(x\mid y)=\frac{f(x,y)}{f_y(y)}$

I'm stuck trying to finding $f(x,y)$ and $f_y(y)$. Can someone help me?

2

There are 2 best solutions below

3
On

You don't need $f_Y$ nor $f_{XY}$ here because $f(x\mid y)$ is given straightfowardly.

You know that $X\sim \mathcal{U}[1,e^Y]$, what (being $Y$ a r.v.) gives actually the conditional density of $X$ given $Y$. In particular, what we know is that if you are aware of the fact that $Y$ gets the value $y$, then $X\sim \mathcal{U}[1,e^y]$.

On the other hand, if you want $f(y\mid x)$, then you should calculate both $f_X$ and $f_{XY}$.

0
On

My 2 cents... and I'm not an expert so see if this makes sense to you.

$E[X|Y]$ is a random variable and not a constant. So for my attack I'll first get $E[X|Y=k]$ and then once I get that switch $k$ for $Y$.

$$E[X|Y=k] = \int_{1}^{e^k} x f_{X|Y}(x|y=k) dx$$

We know that $X|Y=k \sim Uniform(1,e^k)$ which means $f_{X|Y}(x|y=k) =\frac{1}{e^k-1}$

So with this knowledge,

$$=\int_{1}^{e^k} \frac{x}{e^k-1} dx =\frac{1}{e^k-1} \int_{1}^{e^k} xdx$$

$$=\frac{e^{2k}-1}{2(e^k-1)}$$

Finally to get $E[X|Y]$ just replace $k$ with $Y$.

$$E[X|Y]=\frac{e^{2Y}-1}{2(e^Y-1)}$$