Conditional expectation of $X$ given $Z$, where $Z = 1$ if $X > Y$ and $-1$, otherwise

112 Views Asked by At

Let $X\sim\operatorname{Exp}(1)$ and $Y\sim\operatorname{Exp}(2)$ be independent random variables. Define $Z$ by

$$ Z = \begin{cases} 1,& X>Y\\ -1,& X\leqslant Y. \end{cases} $$ I want to calculate $E[X|Z]$.

Not quite sure which formula to use because $Z$ is discrete and $X$ is continuous?

If I use this formula, would this be a good start?

$$ E[X|Z] = \sum_x x P(X = x|Z = z) = \sum_x x \frac{P(X = x, Z = z)}{P(Z = z)}$$

1

There are 1 best solutions below

2
On

Wanted to put this in comments instead but not enough yet so I apologize.

Here is a naive method that may help you get going and pretty easy to understand.

Recall for joint density $$ f_{X,Y}(x,y)=f(x)f(y|X=x)=f(y)f(x|Y=y) $$ So $$ E[X|Z]=\int_X x\cdot f(x|Z=z)dx=\int_X x\cdot \frac{f_X(x)P(Z=z | X=x)}{P(Z=z)}dx $$ Then you can plug $z=\{1,-1\}$ and work it out.