# Compute $E(X-Y | X > Y)$ for independent normal random variables $X$ and $Y$

$X$ and $Y$ are two independent normally distributed random variables with means $\mu_X$, $\mu_Y$ and variances $\sigma_X$, $\sigma_Y$. I'm taking pairwise samples and am trying to calculate the expected values of $X$ and $Y$ for all sample pairs with $X>Y$.

I know the difference $X-Y$ for all $X>Y$ is a truncated normal distribution, so I can calculate the expected difference $E(X-Y\,|\,X-Y>0)$, but I have no clue how to get to the individual values.

• Sorry, but $E(X\mid X>y)=E(X;X>Y)/P(X>Y)$ and, by independence, $E(X;X>Y)=E(XF_Y(X))$, so, where is the problem? – Did May 24 '17 at 18:16
• @Did: My problem is that is has been a few years since my last stochastic course. I assume $F_Y$ is the CDF of Y? I can't quite follow your derivation, but numbers show that $E(X | X > Y)$ is not $E(XF_Y(X))$. Could you elaborate a bit please? – Horstling May 26 '17 at 17:58
• Sorry but as a preliminary, let me suggest that you learn to read carefully: $E(X\mid X>Y)$ and $E(X;X>Y)$ are not the same thing, whatever it is that "numbers show". – Did May 26 '17 at 18:37
• @Did Oh my, of course you are right, finally I got it. Thanks a lot. – Horstling May 26 '17 at 18:55