[Math] Conditional Expected Value of a Joint Probability Density Function

conditional-expectationprobabilityrandom variables

I was wondering if anyone could help me with the following question specifically:

The continuous random variables $X_1$ and $X_2$ have the following joint probability density function: $$f(x_1,x_2)=\frac2{27}$$ over $0< x_1< 3$ and $0< x_2< 9-3x_1.$

Find $$E(X_1\mid X_2=5).$$

I tried to use the method of integrating $xh(x_1\mid x_2)$ but I couldn't get it to work. Thank you in advance!

Best Answer

Detailed calculation using no intuition

The conditional expectation of $X_1$ given that $X_2=5$ can be calculated if we know the corresponding conditional density, $f_{X_2\mid X_1=5}(x_2).$ This conditional density can be calculated as follows:

$$f_{X_1\mid X_2=5}(x_1)=\frac{f_{X_1,X_2}(x_1,5)}{f_{X_2}(5)}=\frac{\frac2{27}}{f_{X_2}(5)}$$ where $f_{X_2}(5)$ is the marginal pdf of $X_2$ at $x_2=5$.

Now, the marginal density of $X_2$ is the integral of the common density with respect to $x_1$:

$$f_{X_2}(x_2)=\int_0^{3-\frac13x_2}f(x_1,x_2)\ dx_1=\frac2{27}\left(3-\frac13x_2\right)$$ if $0\leq x_2\leq 9$ So, $$f_{X_2}(5)=\frac8{3^4}.$$

That is $$f_{X_1\mid X_2=5}(x_1)=\frac34$$ if $0\leq x_1\leq \frac43$.

Indeed, this is uniform over $[0,\frac43]$ . The conditional expectation is then $$\frac23$$ (half of $\frac43$) "because"

$$\frac34\int_0^{\frac43}x_1\ dx_1=\frac23.$$

Related Question