Subtracting a half-normal distribution from a normal distribution

350 Views Asked by At

Suppose I have two independent random variables $X_1$ and $X_2$, where the former is a Gaussian distribution and the latter is a half-Gaussian distribution, both with 0 means.

$X_1 \sim \mathcal{N}(0, \sigma_1)$

$X_2 \sim \left \vert \mathcal{N}(0, \sigma_2) \right \vert $

I'm trying to find the probability that a sample from $X_2$ is greater than a sample from $X_1$. In other words, I would like to formulate $P(X_1 - X_2 > 0)$ given parameters $\sigma_1$ and $\sigma_2$ and understand a relationship between the two variances and $P$.

I know that the $P$ is at least $0.5$ since $P(X_1 < 0) = 0.5$, but I need help figuring out the rest. My background is not in statistics, so any pointers in the right direction would be helpful. Please let me know if I should supply any additional details. Thanks!

1

There are 1 best solutions below

3
On BEST ANSWER

With probability $\frac12$, we have $X_1\le0\le X_2$. For the other case:

\begin{eqnarray*} P(X_1\ge X_2\mid X_1\gt0) &=& \frac2{\sqrt{2\pi\sigma_1^2}}\frac2{\sqrt{2\pi\sigma_2^2}}\int_0^\infty\mathrm dx_1\exp\left(-\frac{x_1^2}{2\sigma_1^2}\right)\int_0^{x_1}\mathrm dx_2\exp\left(-\frac{x_2^2}{2\sigma_2^2}\right) \\ &=& \frac2{\sqrt{2\pi\sigma_1^2}}\int_0^\infty\mathrm dx_1\exp\left(-\frac{x_1^2}{2\sigma_1^2}\right)\operatorname{erf}\left(\frac{x_1}{\sqrt2\sigma_2}\right) \\ &=& \frac2\pi\arctan\left(\frac{\sigma_1}{\sigma_2}\right)\;. \end{eqnarray*}

(I let Wolfram|Alpha do the integration, but I suspect you can do it by differentiating under the integral sign with respect to $\sigma_2$ to turn the error function into a Gaussian.)

Putting the two cases together, we have

$$ P(X_1\ge X_2)=\frac{\arctan\left(\frac{\sigma_1}{\sigma_2}\right)}\pi\;. $$

In particular, for $\sigma_1=\sigma_2$ this yields $P(X_1\ge X_2)=\frac14$, as expected.