Suppose we have $n$ normal variable $X\_1,X\_2,\dots,X\_n$, with corresponding mean $\mu\_1,\dots,\mu\_n$ and sd $\sigma\_1,\dots,\sigma\_n$. What is the probability of $X\_1 < X\_2 < \dots < X\_n$, i.e. $P(X\_1 < X\_2 < \dots < X\_n)$.


Numerical method is also okay. Actually I have thought about how to do the multi-variable integration but I cannot get it done. When $n=2$, it is easy to see that $X\_1-X\_2$ is also a normal variable so $P(X\_1-X\_2<0)$ is quite easy to calculate. However, I think when $n=3$, because of $P(X\_1-X\_2)$ and $P(X\_2-X\_3)$ are not independent, the result is not easy to calculate. Currently I am thinking about whether we can use some method to approximately calculate the value the that probability. I need to come up with an algorithm to compute that.


Thank you!



How to calculate the probability of N normal variable being in increasing order?
We can use multivariate normal distribution to solve this problem. Denote the difference between consecutive elements with a (n-1)-dimensional random vector $Y=(X\_1-X\_2,X\_2-X\_3,\dots, X\_{n-1}-X\_n)$, what we need to find is $Y<(0,0,...,0)$.


Random vector $Y$ has a multivariate normal distribution.


The mean vector $\mu = (E(X\_1-X\_2), \dots, E(X\_{n-1}-X\_n)) = (\mu\_1 - \mu\_2, \dots, \mu\_{n-1} - \mu\_n)$. 


The covariance matrix $\Sigma = [Cov[X\_i-X\_{i+1}, X\_j-X\_{j+1}]], i=1,\dots, n-1, j=1,\dots, n-1$.


For each entry of the matrix, 


$Cov\_{i,i} = Var(X\_i-X\_{i+1}) = \sigma\_i^2 + \sigma\_{i+1}^2$


$Cov\_{i,i+1} = Cov\_{i+1,i} = E((X\_i-X\_{i+1})(X\_{i+1}-X\_{i+2})) - E(X\_i-X\_{i+1})E(X\_{i+1}-X\_{i+2})$


$ = E(X\_iX\_{i+1} + X\_{i+1}X\_{i+2}-X\_{i+1}^2-X\_iX\_{i+2})-(\mu\_i-\mu\_{i+1})(\mu\_{i+1}-\mu\_{i+2})$


Since $X\_i, X\_{i+1}, X\_{i+2}$ are independent, we have the above expression


$= E(X\_i)E(X\_{i+1})+E(X\_{i+1})E(X\_{i+2})-E(X\_{i+1}^2)-E(X\_i)E(X\_{i+2}) - (\mu\_i-\mu\_{i+1})(\mu\_{i+1}-\mu\_{i+2})$


Apart from $E(X\_{i+1}^2)$, other terms are easy to calculate now. For $E(X\_{i+1}^2)$, it can be calculate using chi-square distribution of order one. The result turns out to be $\mu\_{i+1}^2+\sigma\_{i+1}^2$. Plug in the above equation, we have $Cov\_{i,i+1}=-\sigma\_{i+1}^2$.


Other entries in the covariance matrix is zero.


Finally, use numerical method to calculate the probability. One implementation of the cdf of multivariate normal distribution can be found in <http://www.math.wsu.edu/faculty/genz/software/software.html>, the MVNDST function.


