[Math] The probability of one Gaussian larger than another.

probability

For two Gaussian-distributed variables, $ Pr(X=x) = \frac{1}{\sqrt{2\pi}\sigma_0}e^{-\frac{(x-x_0)^2}{2\sigma_0^2}}$ and $ Pr(Y=y) = \frac{1}{\sqrt{2\pi}\sigma_1}e^{-\frac{(x-x_1)^2}{2\sigma_1^2}}$. What is probability of the case X > Y?

Best Answer

Suppose $X$ and $Y$ are jointly normal, i.e. no independence is needed. Define $Z = X - Y$. It is well known that $Z$ is Gaussian, and thus is determined by its mean $\mu$ and its variance $\sigma^2$. $$ \mu = \mathbb{E}(Z) = \mathbb{E}(X) - \mathbb{E}(Y) = \mu_1 - \mu_2 $$ $$ \sigma^2 = \mathbb{Var}(Z) = \mathbb{Var}(X) + \mathbb{Var}(Y) - 2 \mathbb{Cov}(X,Y) = \sigma_1^2 + \sigma_2^2 - 2 \rho \sigma_1 \sigma_2 $$ where $\rho$ is the correlation coefficient. Now: $$ \mathbb{P}(X>Y) = \mathbb{P}(Z>0) = 1- \Phi\left(-\frac{\mu}{ \sigma}\right) = \Phi\left(\frac{\mu}{ \sigma}\right) = \frac{1}{2} \operatorname{erfc}\left(-\frac{\mu}{\sqrt{2}\sigma}\right) $$