I am struggling with this simple problem.

I have two Gaussian independent random variables $X \sim \mathcal{N}(0,\sigma_x^2,), Y \sim \mathcal{N}(0,\sigma_y^2,)$. I have to find the density of $X$ given that $X + Y > 0$.

I know that $X, X+Y$ shall be jointly normal distributed and I also know the forms of conditional distribution of $X | X+Y=z$


but somehow I am confused because the condition that I have is that $X+Y > 0$ and not of the form $X+Y = z$.

I feel that some integration shall have to be performed but I am not sure how. Any pointers shall be very helpful. It will also help if I can get the conditional mean, variance if not the entire density function.



2 Answers 2


$Z=X+Y$ is normally distributed with mean $0$ and variance $\sigma_x^2+\sigma_y^2$

Conditioned on $Z=z$, you would have $X$ being normally distributed with mean $z\frac{ \sigma_x^2}{\sigma_x^2+\sigma_y^2}$ and variance ${ \frac{\sigma_x^2 \sigma_y^2}{\sigma_x^2 + \sigma_y^2}}$

Conditioned on $Z>0$, $Z$ would have a half-normal distribution with mean $\sqrt{(\sigma_x^2+\sigma_y^2)\frac2\pi}$ and variance $(\sigma_x^2+\sigma_y^2)\left(1-\frac2\pi\right)$, so $X$ would have a mean of $\frac{ \sigma_x^2}{\sqrt{\sigma_x^2+\sigma_y^2}}\sqrt{\frac2\pi}$ and a variance of $\sigma_x^2 { \frac{\sigma_x^2 \left(1-\frac2\pi\right)+\sigma_y^2}{\sigma_x^2 + \sigma_y^2}}$.

But the conditional distribution of $X$ given $X+Y \gt 0$ would not have a standard distribution: it would be right-skewed though could take negative values. For example with $\sigma_x^2=400$ and $\sigma_y^2=100$ it might look something like this, with the mean highlighted:

enter image description here

  • $\begingroup$ Thank you so much! This helps a lot. $\endgroup$
    – user94300
    Apr 24, 2017 at 8:18
  • $\begingroup$ Can you elaborate on how we get the final $\mu_{X|Z>0}$ and $\sigma_{X|Z>0}$ once we know the conditional distribution of $Z$ is half normal. $\endgroup$
    – user94300
    Apr 25, 2017 at 3:53
  • $\begingroup$ @user94300: Using my statements about $X\mid Z=z$ and $Z\mid Z>0$, by the law of total expectation so $\sqrt{(\sigma_x^2+\sigma_y^2)\frac2\pi}\frac{ \sigma_x^2}{\sigma_x^2+\sigma_y^2}$ and the law of total variance so ${ \frac{\sigma_x^2 \sigma_y^2}{\sigma_x^2 + \sigma_y^2}} + (\sigma_x^2+\sigma_y^2)\left(1-\frac2\pi\right)\left(\frac{ \sigma_x^2}{\sigma_x^2+\sigma_y^2} \right)^2$ $\endgroup$
    – Henry
    Apr 25, 2017 at 7:51
  • $\begingroup$ Oh.. thank you very much! $\endgroup$
    – user94300
    Apr 25, 2017 at 11:03
  • $\begingroup$ Sorry, just one more question. If the mean of Z was not zero, then would the conditional distribution of Z|Z>0 become folded normal distribution? en.wikipedia.org/wiki/Folded_normal_distribution $\endgroup$
    – user94300
    Apr 27, 2017 at 5:24

Since you are now conditional on an event with non-zero probability $\displaystyle \frac {1} {2}$, you should start with the conditional CDF:

$$ \begin{align} F_{X|X + Y > 0}(x) &= \Pr\{X \leq x|X + Y > 0\} \\ &= \frac {\Pr\{X \leq x, X + Y > 0\}} {\Pr\{X + Y > 0\}} \\ &= 2\int_{-\infty}^x \Pr\{Y > -u\}f_X(u)du\\ &= 2\int_{-\infty}^x F_Y(u)f_X(u)du \end{align}$$

By differentiating with respect to $x$, we obtain the conditional density: $$ f_{X|X + Y > 0}(x) = \frac {\partial} {\partial x}F_{X|X + Y > 0}(x) = 2F_Y(x)f_X(x) = \frac {2} {\sigma_X}\Phi\left(\frac {x} {\sigma_Y}\right) \phi\left(\frac {x} {\sigma_X}\right)$$

where $\Phi, \phi$ are the CDF and pdf of standard normal respectively. So this essentially is just a skew normal distribution.


Comparing the parametrization with wiki's one, we have $$ \omega = \sigma_X, \xi = 0, \alpha = \frac {\sigma_X} {\sigma_Y}$$

so the conditional mean is given by

$$ \xi + \omega\frac {\alpha} {\sqrt{1 + \alpha^2}} \sqrt{\frac {2} {\pi}} = \sqrt{\frac {2} {\pi}} \frac {\sigma_X^2} {\sqrt{\sigma_Y^2 + \sigma_X^2}}$$

Now put $\sigma_X^2 = 400, \sigma_Y^2 = 100$, we have

$$ E[X|X + Y >0] = \sqrt{\frac {2} {\pi}} \frac {400} {\sqrt{100 + 400}} = 40\sqrt{\frac {2} {5\pi}} \approx 14.273 $$

so it should agree with the numerical result from Henry.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.