What is the exact relationship between $E(Y\mid X=x)$ and $E(Y\mid X)$?

125 Views Asked by At

I know that $E(Y\mid X)$ is a random variable of $X$, while $E(Y\mid X=x)$ is a value. However, when they both appear in a problem like the one below, I cannot tell the exact relationship between them.


Problem:

Assume that $(X,Y)$ has a jointly probability density function

$$f(x,y)= \begin{cases} \frac{21}{4}x^2y, & \text{if } x^2 \le y \le 1, \\ 0, & \text{else}. \end{cases}$$

(1) Show the probability density function of $X$, i.e. $f_X(x)$;

(2) Fixed $x\in (-1,1)$, show the conditional expectation of $Y$ given $X=x$, i.e. $E(Y\mid X=x)$;

(3) Show $E(Y|X)$.


I have finished the first 2 subproblems:

(1) $\displaystyle f_X(x) =\int_{-\infty}^{\infty}f(x,y)\,dy =\ldots =\begin{cases} \frac{21}{8}x^2(1-x^4), & \text{if } x^2 \le 1,\\ 0, & \text{else}. \end{cases}$

(2) $\displaystyle f_{Y|X=x}(y|x) =\frac{f(x,y)}{f_X(x)} =\begin{cases} \frac{2y}{1-x^4}, & \text{if } x^2 \le y \le 1 \text{ and } x \in (-1,0)\cup(0,1),\\ 0, & \text{else}. \end{cases}$

$E(Y\mid X=x)=\int_{-\infty}^{+\infty}yf_{Y\mid X=x}(y\mid x)dy=\cdots=\frac{2}{3}\frac{1+x+x^2}{(1+x)(1+x^2)}, x\in (-1,0)\cup(0,1)$

I'm confused with the relationship between $E(Y\mid X=x)$ and $E(Y \mid X)$, especially when the definition domain is something like the things here.

Also, though I finished the subproblem (2), I still cannot understand how the $x=0$ disappears and what the meaning behind it is.


Please help me, thanks a lot!