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:
why mvnpdf give probablity larger than 1

Subject: why mvnpdf give probablity larger than 1

From: tennic tennic

Date: 10 Apr, 2009 20:48:02

Message: 1 of 12

Greetings,

I get probablity larger than 1 when using mvnpdf.

what is the problem.
Thanks

Jerry

Subject: why mvnpdf give probablity larger than 1

From: Roger Stafford

Date: 10 Apr, 2009 21:12:01

Message: 2 of 12

"tennic tennic" <tennic@21cn.com> wrote in message <groba1$5se$1@fred.mathworks.com>...
> Greetings,
>
> I get probablity larger than 1 when using mvnpdf.
>
> what is the problem.
> Thanks
>
> Jerry

  Jerry, remember that the 'pd' in mvnpdf stands for "probability density", not probability. Density means probability per unit value of the random variable. That can easily exceed 1. What has to be true is that the integral of this density function taken with respect to this value must be exactly 1.

Roger Stafford

Subject: why mvnpdf give probablity larger than 1

From: John D'Errico

Date: 10 Apr, 2009 21:18:01

Message: 3 of 12

"tennic tennic" <tennic@21cn.com> wrote in message <groba1$5se$1@fred.mathworks.com>...
> Greetings,
>
> I get probablity larger than 1 when using mvnpdf.
>
> what is the problem.


There is no problem, except in your expectation that
mvnpdf actually returns a probability. It does not.

http://en.wikipedia.org/wiki/Probability_density_function

Distributions with small variances will have a pdf that
exceeds 1 in places.

John

Subject: why mvnpdf give probablity larger than 1

From: tennic tennic

Date: 12 Apr, 2009 01:48:01

Message: 4 of 12

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <grod29$267$1@fred.mathworks.com>...
> "tennic tennic" <tennic@21cn.com> wrote in message <groba1$5se$1@fred.mathworks.com>...
> > Greetings,
> >
> > I get probablity larger than 1 when using mvnpdf.
> >
> > what is the problem.
>
>
> There is no problem, except in your expectation that
> mvnpdf actually returns a probability. It does not.
>
> http://en.wikipedia.org/wiki/Probability_density_function
>
> Distributions with small variances will have a pdf that
> exceeds 1 in places.
>
> John


Thanks.
if we know a pdf function(e.g. normal distribution), and want to know the "probability" of a given value, say x=1, what will people usually do? can I transform the pdf to a standard normal distribution and get the approximation P(x=1)~~pdf(X=1)?

Jerry

Subject: why mvnpdf give probablity larger than 1

From: Nasser Abbasi

Date: 12 Apr, 2009 02:36:47

Message: 5 of 12


"tennic tennic" <tennic@21cn.com> wrote in message
news:grrh8h$h2k$1@fred.mathworks.com...

>
>
> Thanks.
> if we know a pdf function(e.g. normal distribution), and want to know the
> "probability" of a given value, say x=1, what will people usually do? can
> I transform the pdf to a standard normal distribution and get the
> approximation P(x=1)~~pdf(X=1)?
>
> Jerry

Probability that x=1 is zero. Remember, this is a continuous pdf.

To find the probability that the output of a random event is within some
range, you integrate the pdf over this range.

--Nasser

Subject: why mvnpdf give probablity larger than 1

From: John D'Errico

Date: 12 Apr, 2009 03:07:01

Message: 6 of 12

"tennic tennic" <tennic@21cn.com> wrote in message <grrh8h$h2k$1@fred.mathworks.com>...

> Thanks.
> if we know a pdf function(e.g. normal distribution), and want to know the "probability" of a given value, say x=1, what will people usually do? can I transform the pdf to a standard normal distribution and get the approximation P(x=1)~~pdf(X=1)?
>
> Jerry

The "probability that a normal (continuous)
random variable is 1? That event has measure
zero.

John

Subject: why mvnpdf give probablity larger than 1

From: Roger Stafford

Date: 12 Apr, 2009 03:26:01

Message: 7 of 12

"tennic tennic" <tennic@21cn.com> wrote in message <grrh8h$h2k$1@fred.mathworks.com>...
> if we know a pdf function(e.g. normal distribution), and want to know the "probability" of a given value, say x=1, what will people usually do?

  For continuous distributions like the normal distribution, the probability that a random variable be exactly equal to any given constant must be zero! It can only be non-zero for intervals of non-zero length. This is very different from the concept of probability density at a given value. The probability density can be non-zero, even greater than one, but the probability that the variable is exactly equal to that value must be zero.

  This situation is of course very different from that of a discrete distribution such as the poisson distribution in which individual points are given positive probability values. In the case of the poisson, the random variable is restricted to the non-negative integers. In that case the intervals between the integers are not allowed for the variables and the sum of all probabilities of individual points can therefore be successfully made to add up to just one.

Roger Stafford

Subject: why mvnpdf give probablity larger than 1

From: Louis

Date: 18 Nov, 2010 15:29:05

Message: 8 of 12

My question goes along with this post... I am using gmdistribution.fit to find a model 'obj' for my data. Then using 'cluster' to find nlogn for a vector 'x'.

To my understanding nlogn can't be negative since -log(p(x|obj)) however due to the fact that 'cluster' evaluates p(x|obj) using mvnpdf(x,mu.obj,mu.Sigma), then p(x|obj) 'can' have a value > 1 as in the above discussion. Hence, my nlogn 'can' be negative :S

So what is wrong? is it wrong to use mvnpdf or nlogn can be negative?

Thank you

Louis

Subject: why mvnpdf give probablity larger than 1

From: Louis

Date: 18 Nov, 2010 16:28:04

Message: 9 of 12

Figured it out. Explanation: http://www.weibull.com/hotwire/issue92/hottopics92.htm

Subject: why mvnpdf give probablity larger than 1

From: Steven_Lord

Date: 18 Nov, 2010 18:16:58

Message: 10 of 12



"Louis " <wlouis@ryerson.ca> wrote in message
news:ic3go1$f8h$1@fred.mathworks.com...
> My question goes along with this post... I am using gmdistribution.fit to
> find a model 'obj' for my data. Then using 'cluster' to find nlogn for a
> vector 'x'.
>
> To my understanding nlogn can't be negative since -log(p(x|obj)) however
> due to the fact that 'cluster' evaluates p(x|obj) using
> mvnpdf(x,mu.obj,mu.Sigma), then p(x|obj) 'can' have a value > 1 as in the
> above discussion. Hence, my nlogn 'can' be negative :S
>
> So what is wrong? is it wrong to use mvnpdf or nlogn can be negative?

A probability density function (PDF) can take on values greater than 1.

http://en.wikipedia.org/wiki/Probability_density_function

A cumulative distribution function (CDF) cannot.

http://en.wikipedia.org/wiki/Cumulative_distribution_function

As the name suggests, MVNPDF computes a PDF not a CDF.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: why mvnpdf give probablity larger than 1

From: Juanjo

Date: 9 Aug, 2011 18:41:29

Message: 11 of 12

Hi all,
I am using mvnpdf to estimate the probability that a certain point (point of interest) belongs or not to a distribution defined by a mean vector and covariance matrix previously calculated.

If I understood previous posts well, I can integrate the pdf along an interval defined around my point of interest and that operation would return me a probability, right? If I am correct, I guess that interval around my point of interest should be "small enough", but I have no idea about what is an accepted interval length for these situations.

Thanks for your help.

"Steven_Lord" <slord@mathworks.com> wrote in message <ic3qir$8hr$1@fred.mathworks.com>...
>
>
> "Louis " <wlouis@ryerson.ca> wrote in message
> news:ic3go1$f8h$1@fred.mathworks.com...
> > My question goes along with this post... I am using gmdistribution.fit to
> > find a model 'obj' for my data. Then using 'cluster' to find nlogn for a
> > vector 'x'.
> >
> > To my understanding nlogn can't be negative since -log(p(x|obj)) however
> > due to the fact that 'cluster' evaluates p(x|obj) using
> > mvnpdf(x,mu.obj,mu.Sigma), then p(x|obj) 'can' have a value > 1 as in the
> > above discussion. Hence, my nlogn 'can' be negative :S
> >
> > So what is wrong? is it wrong to use mvnpdf or nlogn can be negative?
>
> A probability density function (PDF) can take on values greater than 1.
>
> http://en.wikipedia.org/wiki/Probability_density_function
>
> A cumulative distribution function (CDF) cannot.
>
> http://en.wikipedia.org/wiki/Cumulative_distribution_function
>
> As the name suggests, MVNPDF computes a PDF not a CDF.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Subject: why mvnpdf give probablity larger than 1

From: Steven_Lord

Date: 10 Aug, 2011 13:35:20

Message: 12 of 12



"Juanjo " <jjarmos@gmail.com> wrote in message
news:j1rv0p$mmb$1@newscl01ah.mathworks.com...
> Hi all,
> I am using mvnpdf to estimate the probability that a certain point (point
> of interest) belongs or not to a distribution defined by a mean vector and
> covariance matrix previously calculated.
>
> If I understood previous posts well, I can integrate the pdf along an
> interval defined around my point of interest and that operation would
> return me a probability, right? If I am correct, I guess that interval
> around my point of interest should be "small enough", but I have no idea
> about what is an accepted interval length for these situations.

I don't think you want the _P_DF then; I think you want the _C_DF. Check the
Wikipedia entries to which I linked in my previous reply for a description
of the difference.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for 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