# Probability of gaussian being smaller than multiple other gaussians

Assuming I have 3 normally distributed random variables with different variance and mean:

$X\sim N(\mu_1, \sigma_1^2)$, $Y\sim N(\mu_2, \sigma_2^2)$ , $Z\sim N(\mu_3, \sigma_3^2)$

According to this post, I know how to calculate the probability $P(X<Y)$.

Now I'm interested in the probability that X is smaller than the two other distributions and I calculate this as

$$p_x = P((X<Y) \cap(X<Z)) = P(X<Y) \times P(X<Z)$$ by multiplying two $erfc$ functions mentioned in the link. I can do the same by comparing if $Y$ is smaller than $Z$ and $X$. Eventually I get $p_y$ and $p_z$.

My questions:
1. Is that process correct?
2. If yes, I thought that $p_x + p_y + p_z = 1$ but I get a lower probability when I try examples.

• Can you clarify what $p_x, p_y, p_z$ are please? Remember that the normal is a continuous distribution, so integrating over all values of the pdf equals one.
– user64106
Commented Feb 15, 2017 at 12:55
• Also, are $X,Y,Z$ independent?
– user64106
Commented Feb 15, 2017 at 12:55
• A related question considers the probability that $X_0 \sim N(\mu,1)$ is larger than all $X_i\sim N(0,1), i=-1,2,\ldots n$, all the $X$'s being independent random variables. Even in this simpler case, there is no closed form solution known for $n > 1$. Commented Feb 15, 2017 at 14:33

Let $C = \{X_1 < \min\{X_2,X_3\}\} = \{(X_1 < X_2)\cap (X_1 < X_3)\}$. Even if the $X_i$ are independent random variables (a condition that the OP has not included), the events $(X_1 < X_2)$ and $(X_1 < X_3)$ are not independent events, and so $P(C) \neq P((X_1 < X_2)P(X_1 < X_3)$. However, continuing to assume independence, \begin{align}P(C\mid X_1 = a) &= P\{X_1 < \min\{X_2,X_3\}\mid X_1=a\}\\ &= P\{(X_1 < X_2)\cap (X_1 < X_3)\mid X_1=a\}\\ &= P\{(a < X_2)\cap (a < X_3)\}\\ &= P\{a < X_2\}P\{a < X_3\}\\ &= \left[1-\Phi\left(\frac{a-\mu_2}{\sigma_2}\right)\right]\left[1-\Phi\left(\frac{a-\mu_3}{\sigma_3}\right)\right]\end{align} and so we can write \begin{align}P(C) &= \int_{-\infty}^\infty P(C\mid X_1 = a)f_{X_1}(a) \,\mathrm da\\ &= \int_{-\infty}^\infty\left[1-\Phi\left(\frac{a-\mu_2}{\sigma_2}\right)\right]\left[1-\Phi\left(\frac{a-\mu_3}{\sigma_3}\right)\right]\frac{e^{-(a-\mu_1)^2/2\sigma_1^2}}{\sigma_1\sqrt{2\pi}}\,\mathrm da.\end{align} To the best of my knowledge, there is no closed-form expression for the value of this integral, and so numerical integration, or simulation, must be used to determine the numerical value of $P(C)$.

In general, your answer is not correct because $P(X<Y)$ and $P(X<Z)$ are not independent and therefore you can't multiply them to get the probability of the intersection.

I'll show a counterexample.

Let $X$, $Y$ and $Z$ be independent random variables with the same distribution. Then all possible permutations are equally probable:

$$P(X<Y<Z)=P(X<Z<Y)=P(Y<X<Z)=P(Y<Z<X)=$$ $$=P(Z<X<Y)=P(Z<Y<X)=\frac{1}{6}$$

You can see that:

$$P(X<Y)=P(X<Z)=\frac{1}{2}$$

But:

$$P(X<Y\text{ and }X<Z)=P(X<Y<Z)+P(X<Z<Y) =\frac{1}{3} \ne$$ $$\ne P(X<Y) · P(X<Z)=\frac{1}{4}$$