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:
Probability in a bi-variate normal gaussian distribution

Subject: Probability in a bi-variate normal gaussian distribution

From: marco

Date: 29 Oct, 2013 15:25:07

Message: 1 of 8

Dear all,

i have a problem regarding the computation of a probability under a bidimensional gaussian distribution. I figured out that exploiting the mvncdf() function i'm able to compute the probability under rectangular area or under a semi-plane whose constraint be parallel to X or Y axis (P < x1 , P < y1).

Now my problem is, how can i compute the probability under a semi-plane whose constraint is not parallel to X or Y axis. This could be very important to my work because my final goal is to compute the probability over a whatever polygonal area (not rectangular or square).

I really appreciate if someone can help me.

many thanks

Regards

Subject: Probability in a bi-variate normal gaussian distribution

From: Torsten

Date: 30 Oct, 2013 08:13:06

Message: 2 of 8

"marco" wrote in message <l4ok0j$m45$1@newscl01ah.mathworks.com>...
> Dear all,
>
> i have a problem regarding the computation of a probability under a bidimensional gaussian distribution. I figured out that exploiting the mvncdf() function i'm able to compute the probability under rectangular area or under a semi-plane whose constraint be parallel to X or Y axis (P < x1 , P < y1).
>
> Now my problem is, how can i compute the probability under a semi-plane whose constraint is not parallel to X or Y axis. This could be very important to my work because my final goal is to compute the probability over a whatever polygonal area (not rectangular or square).
>
> I really appreciate if someone can help me.
>
> many thanks
>
> Regards

Integrating the bivariate normal distribution over arbitrarily defined regions in 2d seems to me is such a fundamental problem in statistics that a google search should help.

Best wishes
Torsten.

Subject: Probability in a bi-variate normal gaussian distribution

From: marco

Date: 30 Oct, 2013 09:09:07

Message: 3 of 8

Dear Torsten,

thank you very much. I'm sorry if my question can look trivial but these are my first steps in the statistical world.

Regards

Marco

Subject: Probability in a bi-variate normal gaussian distribution

From: Torsten

Date: 30 Oct, 2013 09:36:10

Message: 4 of 8

"marco" wrote in message <l4qibj$a78$1@newscl01ah.mathworks.com>...
> Dear Torsten,
>
> thank you very much. I'm sorry if my question can look trivial but these are my first steps in the statistical world.
>
> Regards
>
> Marco

It's not trivial, but it's well-studied.
In my opinion, the chance to get well-tested matlab code for your problem by a google search is quite high.

Best wishes
Torsten.

Subject: Probability in a bi-variate normal gaussian distribution

From: marco

Date: 31 Oct, 2013 13:30:31

Message: 5 of 8

"Torsten" wrote in message <l4qjua$20j$1@newscl01ah.mathworks.com>...
> "marco" wrote in message <l4qibj$a78$1@newscl01ah.mathworks.com>...
> > Dear Torsten,
> >
> > thank you very much. I'm sorry if my question can look trivial but these are my first steps in the statistical world.
> >
> > Regards
> >
> > Marco
>
> It's not trivial, but it's well-studied.
> In my opinion, the chance to get well-tested matlab code for your problem by a google search is quite high.
>
> Best wishes
> Torsten.

Torsten, I looked for this by google but I did not find any matlab code able to solve my problem. Probably my searches are unsuccessfully because i'm searching in the wrong way. Could you suggest me some starting point ? I'd really appreciate it.

Thanks in advance

Subject: Probability in a bi-variate normal gaussian distribution

From: Torsten

Date: 31 Oct, 2013 15:47:06

Message: 6 of 8

"marco" wrote in message <l4tm1n$ias$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <l4qjua$20j$1@newscl01ah.mathworks.com>...
> > "marco" wrote in message <l4qibj$a78$1@newscl01ah.mathworks.com>...
> > > Dear Torsten,
> > >
> > > thank you very much. I'm sorry if my question can look trivial but these are my first steps in the statistical world.
> > >
> > > Regards
> > >
> > > Marco
> >
> > It's not trivial, but it's well-studied.
> > In my opinion, the chance to get well-tested matlab code for your problem by a google search is quite high.
> >
> > Best wishes
> > Torsten.
>
> Torsten, I looked for this by google but I did not find any matlab code able to solve my problem. Probably my searches are unsuccessfully because i'm searching in the wrong way. Could you suggest me some starting point ? I'd really appreciate it.
>
> Thanks in advance

Here is FORTRAN code which can easily be converted to MATLAB code:
http://www.dtic.mil/dtic/tr/fulltext/u2/a102466.pdf

Best wishes
Torsten.

Subject: Probability in a bi-variate normal gaussian distribution

From: Torsten

Date: 4 Nov, 2013 13:24:06

Message: 7 of 8

"Torsten" wrote in message <l4tu1q$ihq$1@newscl01ah.mathworks.com>...
> "marco" wrote in message <l4tm1n$ias$1@newscl01ah.mathworks.com>...
> > "Torsten" wrote in message <l4qjua$20j$1@newscl01ah.mathworks.com>...
> > > "marco" wrote in message <l4qibj$a78$1@newscl01ah.mathworks.com>...
> > > > Dear Torsten,
> > > >
> > > > thank you very much. I'm sorry if my question can look trivial but these are my first steps in the statistical world.
> > > >
> > > > Regards
> > > >
> > > > Marco
> > >
> > > It's not trivial, but it's well-studied.
> > > In my opinion, the chance to get well-tested matlab code for your problem by a google search is quite high.
> > >
> > > Best wishes
> > > Torsten.
> >
> > Torsten, I looked for this by google but I did not find any matlab code able to solve my problem. Probably my searches are unsuccessfully because i'm searching in the wrong way. Could you suggest me some starting point ? I'd really appreciate it.
> >
> > Thanks in advance
>
> Here is FORTRAN code which can easily be converted to MATLAB code:
> http://www.dtic.mil/dtic/tr/fulltext/u2/a102466.pdf
>
> Best wishes
> Torsten.

... and if your impression is that this method is too time-consuming to program, just triangulate your (bounded) polygon and calculate S=sum_i area(T_i)*f(x_i)
where T_i is the i-th triangle and f(x_i) is the probability density function evaluated at the barycenter of T_i.

Best wishes
Torsten.

Subject: Probability in a bi-variate normal gaussian distribution

From: marco

Date: 4 Nov, 2013 14:04:07

Message: 8 of 8

"Torsten" wrote in message <l5875m$pdb$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <l4tu1q$ihq$1@newscl01ah.mathworks.com>...
> > "marco" wrote in message <l4tm1n$ias$1@newscl01ah.mathworks.com>...
> > > "Torsten" wrote in message <l4qjua$20j$1@newscl01ah.mathworks.com>...
> > > > "marco" wrote in message <l4qibj$a78$1@newscl01ah.mathworks.com>...
> > > > > Dear Torsten,
> > > > >
> > > > > thank you very much. I'm sorry if my question can look trivial but these are my first steps in the statistical world.
> > > > >
> > > > > Regards
> > > > >
> > > > > Marco
> > > >
> > > > It's not trivial, but it's well-studied.
> > > > In my opinion, the chance to get well-tested matlab code for your problem by a google search is quite high.
> > > >
> > > > Best wishes
> > > > Torsten.
> > >
> > > Torsten, I looked for this by google but I did not find any matlab code able to solve my problem. Probably my searches are unsuccessfully because i'm searching in the wrong way. Could you suggest me some starting point ? I'd really appreciate it.
> > >
> > > Thanks in advance
> >
> > Here is FORTRAN code which can easily be converted to MATLAB code:
> > http://www.dtic.mil/dtic/tr/fulltext/u2/a102466.pdf
> >
> > Best wishes
> > Torsten.
>
> ... and if your impression is that this method is too time-consuming to program, just triangulate your (bounded) polygon and calculate S=sum_i area(T_i)*f(x_i)
> where T_i is the i-th triangle and f(x_i) is the probability density function evaluated at the barycenter of T_i.
>
> Best wishes
> Torsten.


Torsten many thanks for your support. I'll try it.

Best

Marco

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