Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
mvncdf

Subject: mvncdf

From: naseeb

Date: 23 Mar, 2010 23:19:19

Message: 1 of 4

Hi,

For the function mvncdf, if used for bivariate normal case; how can I get cdf wrt a limit. For example, Pr = (X<z and Y>z)
where z is the limit that I want to put in the mvncdf function. Any idea??


Thanks.

Subject: mvncdf

From: Sadik

Date: 24 Mar, 2010 00:37:04

Message: 2 of 4

Hi Naseeb,

I am writing it for P(X<=z,Y<=z) so that you can figure it out for any other configuration.

But before proceeding, you should realize that in fact we need to write it as P(X1<=z,X2<=z) because in general, we are going to have a d-dimensional vector X whose elements are jointly normally distributed. [In this case, bivariate is equivalent to saying d = 2.]

Therefore, also keeping an eye on the documentation

http://www.mathworks.com/access/helpdesk/help/toolbox/stats/mvncdf.html

we have [assuming zero mean and identity covariance matrix]

P(X1<=z,X2<=z) = mvncdf([z,z]);

Best.

Subject: mvncdf

From: naseeb

Date: 29 Mar, 2010 18:50:23

Message: 3 of 4

Hi Sadik,

Thanks for your comment. In the document of mvncdf, format given is-
y = mvncdf(X,mu,SIGMA)

I am not understanding, in this format how to put the limit point for X and Y.

Please advise.

Thanks
Naseeb

"Sadik " <sadik.hava@gmail.com> wrote in message <hobmrg$8d5$1@fred.mathworks.com>...
> Hi Naseeb,
>
> I am writing it for P(X<=z,Y<=z) so that you can figure it out for any other configuration.
>
> But before proceeding, you should realize that in fact we need to write it as P(X1<=z,X2<=z) because in general, we are going to have a d-dimensional vector X whose elements are jointly normally distributed. [In this case, bivariate is equivalent to saying d = 2.]
>
> Therefore, also keeping an eye on the documentation
>
> http://www.mathworks.com/access/helpdesk/help/toolbox/stats/mvncdf.html
>
> we have [assuming zero mean and identity covariance matrix]
>
> P(X1<=z,X2<=z) = mvncdf([z,z]);
>
> Best.

Subject: mvncdf

From: Sadik

Date: 29 Mar, 2010 19:10:25

Message: 4 of 4

In the documentation,

y = mvncdf(X,mu,SIGMA);

Lowercase y here has nothing to do with our X or Y, OK? y here is just a number between 0 and 1 and represents a probability. So, let us replace it with p. Then we have

p = mvncdf(X,mu,SIGMA);

Now we need to make another replacement. In this notation, X denotes a vector. So let us look at the 2-dim case and replace X with a 2-dim vector:

p = mvncdf([x1,x2],mu,SIGMA);

Now, x1 and x2 are the "limits". Finally, to fit your situation, let's make our final replacement, which is

x1 = x_lim;
x2 = y_lim;

from which we get:

p = mvncdf([x_lim,y_lim],mu,SIGMA);

Best.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us