1
$\begingroup$

Given that $X,Y\stackrel{\text{i.i.d.}}{\sim}\text{Exp}$ with mean $\lambda(>0)$ and $Z=\mathbf{1}_{X<Y}$, what is $\mathbb{E}(X\mid Z=z)$ ?

We have $Z=1$ with probability $\Pr(X<Y)$ and $Z=0$ with probability $1-\Pr(X<Y)$.

But $\Pr(X<Y)=\frac{1}{2}$ as $X$ and $Y$ are i.i.d. random variables.

Does this mean I can simply say that $Z\sim\text{Ber}\left(\frac{1}{2}\right)$ ?

Then, $\mathbb{E}(X)=\mathbb{E}(X\mid Z=0)\times\frac{1}{2}+\mathbb{E}(X \mid Z = 1) \times \frac{1}{2}$

$\implies2\lambda=\mathbb{E}(X\mid Z=0)+\mathbb{E}(X\mid Z=1)$.

But I cannot conclude anything from here. I couldn't find the conditional distribution of $X\mid Z$ either. Maybe I have to condition on another variable $U$ so that $\mathbb{E}(X\mid Z)=\mathbb{E}\,[\mathbb{E}(X\mid Z,U)\mid Z]$.

$\endgroup$

4 Answers 4

3
$\begingroup$

$$\mathbb E[X\mid X<Y]=\frac{\mathbb E[X\mathbf 1_{X<Y}]}{\mathbb P(X<Y)}=2\mathbb E[X\mathbf 1_{X<Y}].$$ To find expectation of any measurable function $g(X,Y)$ of pair of independent r.v.'s $X$ and $Y$ with pdf's $f_X(x)$ and $f_Y(y)$, use Law of the unconscious statistician: $$ \mathbb E[g(X,Y)] = \iint g(x,y)f_X(x)f_Y(y)\,dx\,dy. $$ So, $$ \mathbb E[X\mathbf 1_{X<Y}] = \int\limits_0^\infty \int\limits_0^\infty x\mathbf 1_{x<y} f_X(x)f_Y(y)\,dx\,dy = \ldots = \frac{\lambda}{4} $$ So, $$ \mathbb E[X\mid X<Y]= \frac{\lambda}{2}. $$ You can do the same for $\mathbb E[X\mid X>Y]$.

On the other side, you can notice that $$\mathbb E[X\mid X<Y]=\mathbb E[\min(X,Y)],$$ $$\mathbb E[X\mid X>Y]=\mathbb E[\max(X,Y)]$$ and find these expectations from distributions of $\min(X,Y)$ and $\max(X,Y)$.

$\endgroup$
11
  • 1
    $\begingroup$ No. $\mathbb E[X|\mathbf 1_{X<Y}=1]=\mathbb E[X|X<Y]$. $\endgroup$
    – NCh
    Mar 3, 2018 at 15:49
  • 3
    $\begingroup$ @StubbornAtom No. $\mathbb E(X\mid\mathbf1_{X<Y})$ is a random variable, but $\mathbb E(X\mid X<Y)$ is only a real number. We do have $\mathbb E(X\mid\mathbf1_{X<Y}=1)=\mathbb E(X\mid X<Y)$ $\endgroup$
    – drhab
    Mar 3, 2018 at 15:49
  • 1
    $\begingroup$ Ah thanks. I was trying to compute the conditional expectation for any $Z=z$, which is not possible. One has to do it separately for $z=0$ and $z=1$. $\endgroup$ Mar 3, 2018 at 16:07
  • 1
    $\begingroup$ Note this conspicuous typographical difference: $$ 2\mathbb E[X\mathbf 1_{X<Y}] \text{ versus } 2\operatorname{\mathbb E}[X\mathbf 1_{X<Y}] $$ The spacing to the left and right of things within \operatorname{} depends on the context. $\endgroup$ Mar 3, 2018 at 17:00
  • 1
    $\begingroup$ @Did Thank you. I read not only the title and also the text of the question, which asks for calculation of $\operatorname{\mathbb E[X|Z=z]}$ (see yellow text). The above calculations are for $z=1$. If it is not quite clear, I am sorry. $\endgroup$
    – NCh
    Mar 4, 2018 at 11:12
2
$\begingroup$

By definition, since $P(Z\in\{0,1\})=1$, $E(X\mid Z)$ is the random variable equal to $$E(X\mid Z)=E(X\mid Z=1)\mathbf 1_{Z=1}+E(X\mid Z=0)\mathbf 1_{Z=0}$$ and, for every $z$ in $\{0,1\}$, $E(X\mid Z=z)$ is the real number equal to $$E(X\mid Z=z)=\frac{E(X;Z=z)}{P(Z=z)}$$ In your case, $P(Z=1)=P(Z=0)=\frac12$ by symmetry.

To complete the formulas for $E(X\mid Z)$ and $E(X\mid Z=z)$, note that, by independence of $(X,Y)$, $$P(X<Y\mid X)=1-F_Y(X)=e^{-X/\lambda}$$ hence $$E(X;Z=1)=E(X;X<Y)=E(Xe^{-X/\lambda})=\int_0^\infty xe^{-x/\lambda}\,e^{-x/\lambda}\,dx/\lambda=\lambda/4$$ and $$E(X;Z=0)=E(X)-E(X;Z=1)=3\lambda/4$$

$\endgroup$
2
  • $\begingroup$ Not that it helps solving the problem, but is the conclusion that $Z$ is Bernoulli correct? $\endgroup$ Mar 4, 2018 at 17:56
  • 1
    $\begingroup$ Indeed $Z$ is Bernoulli, since $Z\in\{0,1\}$ almost surely. Every indicator random variable $\mathbf 1_A$ with $A$ measurable, is Bernoulli, and vice versa. $\endgroup$
    – Did
    Mar 4, 2018 at 18:03
1
$\begingroup$

You're looking for both $\operatorname E(X\mid X<Y)$ and $\operatorname E(X\mid X>Y).$ Since the events $X<Y$ and $X>Y$ each have probability $1/2,$ the equally weighted average of these two conditional expected values must be $\lambda,$ so if you find one of them, you can quickly deduce the other.

\begin{align} \operatorname E(X\mid X<Y) & = \left. \iint\limits_{\{\, (x,y) \,:\, 0\,<\,x\,<\,y \,\}} x e^{-x/\lambda} e^{-y/\lambda}\, \frac{d(x,y)}{\lambda^2} \right/ \Pr(X<Y) \\[10pt] & = 2\int_0^\infty \left( \int_x^\infty xe^{-x/\lambda} e^{-y/\lambda} \, \frac{dy} \lambda \right) \, \frac{dx} \lambda \\[10pt] & = 2\int_0^\infty xe^{-x/\lambda} e^{-x/\lambda} \, \frac{dx} \lambda \\[10pt] & = 2\int_0^\infty x e^{-2x/\lambda} \, \frac{dx} \lambda \\[10pt] & = 2\int_0^\infty \left( \frac{2x} \lambda \right) e^{-2x/\lambda} \left( \frac{2\,dx} \lambda \right) \cdot\frac\lambda 4 \\[10pt] & = 2\int_0^\infty u e^{-u} \, du \cdot \frac \lambda 4 \\[10pt] & = \frac \lambda 2. \end{align}

$\endgroup$
2
  • 1
    $\begingroup$ Interestingly, (correct) complete computations were posted one hour earlier on this page, and $E(X\mid X<Y)=\lambda/2$, not $\lambda/4$. $\endgroup$
    – Did
    Mar 3, 2018 at 17:29
  • 1
    $\begingroup$ @Did : I initially entirely forget to divide by $\Pr(X<Y),$ but now I have corrected that. $\endgroup$ Mar 3, 2018 at 17:51
1
$\begingroup$

For convenience let $\lambda=1$.

This can be repaired easily and our notations will be "cleaner".

$\mathsf P(\min(X,Y)>t)=\mathsf P(X>t)\mathsf P(Y>t)=e^{-2t}$ showing that $\min(X,Y)\sim\mathsf{Exp}(2)$.

$\mathsf E(X\mid Z=1)=\mathsf E(X\mid X<Y)=\mathsf E\min(X,Y)=0.5$.

$\mathsf E(X\mid Z=0)=\mathsf E(X\mid X>Y)=\mathsf E\max(X,Y)=\mathsf E[X+Y-\min(X,Y)]=1.5$.

So for $z\in\{0,1\}$ we found that:$$\mathsf E(X\mid Z=z)=1.5-z$$

Since $\mathsf P(Z\in\{0,1\})=1$ this justifies the conclusion that:$$\mathsf E(X\mid\mathbf1_{X<Y})=\mathsf E(X\mid Z)=1.5-Z$$

In the more general setting that will be:$$\mathsf E(X\mid\mathbf1_{X<Y})=\mathsf E(X\mid Z)=(1.5-Z)\lambda$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .