# Conditional normal distribution

I hope to calculate $P(X+Y>0 \ |\ Y<0)$, where $X$, $Y$ are independent normal distribution with same mean ($\mu$) and variance ($\sigma$).

I tried to do it with direct integration. That is calculate $P(X+Y>0 \textrm{ and } Y<0)$ first. But failed after I eliminate the first integration sign.

Any other method to calculate this probability?

-
A note on the vocabulary and standard notation: $\sigma$ is called standard deviation. When you square $\sigma$, you get what is called the variance. – alex.jordan Sep 25 '11 at 6:16
Can you show what you tried with integrals? It looks like you might not know LaTeX. To use LaTeX to display the math, type something like \int_a^b\int_c^d f(x,y)\,dy\,dx but surround it with dollar signs. This example is what produces $\int_a^b\int_c^d f(x,y)\,dy\,dx$. – alex.jordan Sep 25 '11 at 6:24
Also, if you need to put something with more than one character in the subscript or superscript, surround it with { }. For example, \int_{bottom}^{top}f(x)\,dx makes $\int_{bottom}^{top}f(x)\,dx$ – alex.jordan Sep 25 '11 at 6:34

I will take $\sigma = 1$ to avoid ambiguity as to whether the variance is $\sigma^2$ as most people write or $\sigma$ as the OP wants it, and assume for convenience that $\mu > 0$.

• The event $\{X + Y > 0\}$ occurs if the point $(X,Y)$ lies above the line $x+y = 0$, and has probability $\Phi(2\mu/\sqrt{2}) = \Phi(\sqrt{2}\mu)$ since $X + Y$ is normal with mean $2\mu$ and variance 2.
• The event $\{X > 0, Y > 0\} = \{X > 0\}\cap\{Y > 0\}$ occurs if the point $(X,Y)$ lies in the first quadrant, and has probability $[\Phi(\mu)]^2$.
• Since $X$ and $Y$ are identically distributed, it follows that $$P(\{X + Y > 0\}\cap\{Y < 0\}) = P(\{X + Y > 0\}\cap\{X < 0\}).$$
• Except for a set of zero probability, the event $\{X + Y > 0\}$ is the disjoint union of the events $\{X > 0, Y > 0\}, \{X + Y > 0\}\cap\{Y < 0\}$ and $\{X + Y > 0\}\cap\{X < 0\}$.

Hence, \begin{align*} P\{X + Y > 0\} &= \Phi(\sqrt{2}\mu)\\ &= P\{X > 0, Y > 0\} + P(\{X + Y > 0\}\cap\{Y < 0\}) + P(\{X + Y > 0\}\cap\{X < 0\})\\ &= [\Phi(\mu)]^2 + 2P(\{X + Y > 0\}\cap\{Y < 0\}) \end{align*} and so $P(\{X + Y > 0\}\cap\{Y < 0\}) = \left.\left.\frac{1}{2}\right(\Phi(\sqrt{2}\mu) - [\Phi(\mu)]^2\right)$, and since $P\{Y < 0\} = 1 -\Phi(\mu)$, we have that $$P\{X + Y > 0 \mid Y < 0\} = \frac{P(\{X + Y > 0\}\cap\{Y < 0\})}{P\{Y < 0\}} = \frac{\Phi(\sqrt{2}\mu) - [\Phi(\mu)]^2}{2(1 -\Phi(\mu))}$$

-

Since $\mathbb{P}(X+Y>0 \vert Y<0) = \frac{\mathbb{P}(X+Y>0 \land Y<0)}{\mathbb{P}(Y<0)}$, and the denominator being a normal CDF, the real problem is to compute $\mathbb{P}(X+Y>0 \land Y<0)$.

Note, that the pair $(U,V) = (X+Y,Y)$ has bivariate normal distribution with means $(2 \mu, \mu)$, variances $(2 \sigma^2, \sigma^2)$ and correlation $\rho = \frac{1}{\sqrt{2} \sigma^2} \mathbb{E}((X+Y-2\mu)(Y-\mu)) = \frac{1}{\sqrt{2} \sigma^2} \mathbb{E}((Y-\mu)^2) = \frac{1}{\sqrt{2}}$.

Thus we seek $\mathbb{P}(U > 0 \land V < 0) = \mathbb{P}(V < 0) - \mathbb{P}(U < 0 \land V < 0)$. The last part is the CDF of the bivariate normal, which has no closed form for generic $\mu$ and $\sigma$. So

$$\mathbb{P}(X+Y>0 \vert Y<0) = 1 - \frac{\rm CDF_{U,V}(0,0)}{ \rm CDF_{V}(0)}$$ Now using $\rm CDF$ of standard normal and standard bi-normal with correlation $\rho=\frac{1}{\sqrt{2}}$: $$\mathbb{P}(X+Y>0 \vert Y<0) = 1 - \frac{\rm CDF_{\mathcal{BN}(\rho)}(-\sqrt{2}\frac{\mu}{\sigma},-\frac{\mu}{\sigma})}{ \Phi(-\frac{\mu}{\sigma}) }$$

The following plot shows $\mathbb{P}(X+Y>0 \vert Y<0)$ as a function of $\frac{\mu}{\sigma}$:

-
You said "standard binormal" and you didn't explicitly mention correlation. The letter $\rho$ does appear. Was that supposed to be the correlation? Why don't you say what number it is? – Michael Hardy Sep 25 '11 at 18:03
@MichaelHardy I do define $\rho$ at the end of the second paragraph, probably should be more explicit. – Sasha Sep 25 '11 at 18:38
@Sasha I get a different closed-form expression (involving only the univariate normal CDF) for the desired conditional probability. It gives a value of $1/4$ at $\mu = 0$, which matches the value given by Didier Piau and you. – Dilip Sarwate Sep 26 '11 at 18:48
@DilipSarwate Very nice (+1), Dilip! Your closed form result also follows from expression of standard binormal CDF in terms of Owen's T-function and the property that $T_a(x)$ for $a=1$ reduces to the product of standard normal cdfs. – Sasha Sep 26 '11 at 19:39

Writing $X$ and $Y$ as $X=\mu+\sigma X_0$ and $Y=\mu+\sigma Y_0$ where $X_0$ and $Y_0$ are i.i.d. standard gaussian random variables, one sees that the conditional probability is $$\mathrm P(X+Y>0\mid Y<0)=\frac{U(-\mu/\sigma)}{G(-\mu/\sigma)},$$ where for every real $x$, $$G(x)=\int\limits_{-\infty}^xg(y)\mathrm dy,\qquad\qquad g(y)=\frac1{\sqrt{2\pi}}\mathrm e^{-y^2/2},$$ and $$U(x)=\int\limits_{-\infty}^xg(y)\int\limits_{2x-y}^{+\infty}g(z)\mathrm dz\,\mathrm dy=G(x)-\int\limits_{-\infty}^xg(y)G(2x-y)\,\mathrm dy.$$ Thus, $G$ is the usual CDF of a standard gaussian random variable. Some specific values are $U(-\infty)=0$, $U(0)=\frac18$ and $U(+\infty)=0$.

-
In my revised answer here, I get $(\Phi(\sqrt{2}\mu) - [\Phi(\mu)]^2)/2$ as a closed-form expression for what you call $U(-\mu)$. I have used $\sigma = \sigma^2 = 1$ to avoid ambiguities as to the meaning of $\sigma$. – Dilip Sarwate Sep 26 '11 at 18:42