Probability of gaussian random variables lying in a certain order

84 Views Asked by At

I have two independent gaussians and a known constant:

$$ \begin{align} X_1 &\sim \mathcal{N}(\mu_1, \sigma_1^2) \\ X_2 &\sim \mathcal{N}(\mu_2, \sigma_2^2) \\ c &\in \mathbb{R} \end{align} $$

How do I calculate the probability $P(X_1 > X_2 > c) = P(X_1 > X_2, X_2 > c)$?


In my specific case it turns out that $\sigma_1 = \sigma_2$, so if needed the problem can be simplified a little


I can get somewhere with

$$ \begin{align} P(X_1 > X_2 > c) &= \int_c^\infty \int_{x_1}^\infty f_\mathcal{N}(x_1|\mu_1, \sigma_1)f_\mathcal{N}(x_2|\mu_2, \sigma_2) \, dx_2 \, dx_1 \\ &= \int_c^\infty f_\mathcal{N}(x_1|\mu_1, \sigma_1) \int_{x_1}^\infty f_\mathcal{N}(x_2|\mu_2, \sigma_2) \, dx_2 \, dx_1 \\ &= \int_c^\infty f_\mathcal{N}(x_1|\mu_1, \sigma_1) Q\left(\frac{x_1 - \mu_2 }{\sigma_2}\right) \, dx_1 \\ &= \int_{c-\mu_1}^\infty f_\mathcal{N}(z'|0, \sigma_1) Q\left(\frac{z' + \mu_1- \mu_2 }{\sigma_2}\right) \, dz' \\ &= \int_\frac{c-\mu_1}{\sigma_1}^\infty f_\mathcal{N}(z) Q\left(\frac{\sigma_1}{\sigma_2}(z + \mu_1- \mu_2 )\right) \, dz \end{align} $$

Is this the best I can do?