问题
G'day,
I am trying to compute the lower tail probability for the bivariate Normal distribution given by the following formula for 2 random variables (X1, X2):
Where X1 = -1.23, X2 = -2.75 and rho = 0.65. I am very curious how to solve this problem? The first term it's just calculations but how would you attack the integrals? Can someone provide me with some code or hints or if it's possible a solution? X's are log normal distributed random variables.
Furthermore; how would extend it to multiple dimensions. If we say we have a variable X_3 = -1.78. How would you attack that?
回答1:
You can use mvncdf
function as here in documentation. For your case you can write:
p = mvncdf([X1, X2], [0, 0], [1 rho; rho 1]);
The sigma base on rho
is [1 rho; rho 1]
and as you said mean is [0, 0]
. If you want to generalize this one, just you need to increase the dimension of X to [X1, X2, X3]
, mean to [0, 0, 0]
, and define your new sigma (a 3x3 matrix).
来源:https://stackoverflow.com/questions/61345819/how-to-compute-lower-tail-probability-for-the-bivariate-normal-distribution