So for 2 rho coefficients we have:
p = mvncdf([X1, X2], [0, 0], [1 rho; rho 1])
But for 3 rho coefficients I am not sure how to define the sigma: I have X1, X2, and X3, with mean zero [0, 0, 0] and rho coefficients
rho_112, rho_113 and rho_123
how do I define it in the function:
p = mvncdf([X1, X2, X3], [0, 0, 0], [1 rho; rho 1])
Also very curious why we sometimes need a minus before the rho
Rho in this case is: How to compute lower tail probability for the Bivariate Normal Distribution
You should be aware that the density function for a multivariate normal distribution is:
Hence, when , it would be:
On other hand, as is the correlation coefficient between and , we can write the covarience matrix like the following:
As for all , we can write the covariance matrix like the following:
Therefore, for a three dimensional distribution, you can have:
p = mvncdf([X1, X2, X3], [0, 0, 0], [1 rho12 roh13; rho21 1 rho23; rho31 rho32 1])
Notice that is not useful here. It is a correlation between three variables, but the covariance matrix just needs mutual covariances.