Finding conditional expectation $E[X_1 | X_2 = x_2]$

conditional-expectationprobabilitystatistics

I am trying to find $E[X_1 | X_2 = x_2]$ under these premises.

$X_1 \sim Unif(0,1) \space , \space X_2 \sim Unif(0,x_1)$

I was able to find that the joint pdf is

$$f(x_1,x_2) = \frac{1}{x_1} \space , \space 0 < x_2 < x_1 <\infty$$

So, I am thinking that $E[X_1 | X_2 = x_2]$ can be obtained from

$$\int_0^1 x_1*\frac{\frac{1}{x_1}}{1} dx_1$$

because I obtained (with low confidence …)

$$f_{X_2}(x_2) = \int_0^{x_1} \frac{1}{x_1} dx_2 = 1$$

So the solution to the question is equal to $1$ according to my calculation, however
I am intuitively alarmed to think that the expectation of a Uniform Distribution is equal to the upper limit.

I do not think that knowing $x_2$ would do such a thing and I would like to know what my error is.

May I have some help, please?

Best Answer

You are given that $X_2\mid X_1\sim U(0,X_1)$ where $X_1\sim U(0,1)$.

This means that the joint pdf of $(X_1,X_2)$ is

$$f(x_1,x_2)=\frac{1}{x_1}\mathbf1_{0<x_2<x_1}\mathbf1_{0<x_1<1}=\frac{1}{x_1}\mathbf1_{0<x_2<x_1<1}$$

Rewriting the above you have $$f(x_1,x_2)=\frac{1}{-x_1\ln x_2}\mathbf1_{x_2<x_1<1}(-\ln x_2)\mathbf1_{0<x_2<1}$$

That is, $X_1\mid X_2$ has the pdf

$$g(x_1\mid x_2)=\frac{1}{-x_1\ln x_2}\mathbf1_{x_2<x_1<1}$$

Hence, $$E\,[X_1\mid X_2=x_2]=\int x \,g(x\mid x_2)\,dx=\cdots$$

Related Question