Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

why mvnpdf give probablity larger than 1

528 views
Skip to first unread message

tennic tennic

unread,
Apr 10, 2009, 4:48:02 PM4/10/09
to
Greetings,

I get probablity larger than 1 when using mvnpdf.

what is the problem.
Thanks

Jerry

Roger Stafford

unread,
Apr 10, 2009, 5:12:01 PM4/10/09
to
"tennic tennic" <ten...@21cn.com> wrote in message <groba1$5se$1...@fred.mathworks.com>...

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

John D'Errico

unread,
Apr 10, 2009, 5:18:01 PM4/10/09
to
"tennic tennic" <ten...@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

tennic tennic

unread,
Apr 11, 2009, 9:48:01 PM4/11/09
to
"John D'Errico" <wood...@rochester.rr.com> wrote in message <grod29$267$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

Nasser Abbasi

unread,
Apr 11, 2009, 10:36:47 PM4/11/09
to

"tennic tennic" <ten...@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


John D'Errico

unread,
Apr 11, 2009, 11:07:01 PM4/11/09
to
"tennic tennic" <ten...@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

Roger Stafford

unread,
Apr 11, 2009, 11:26:01 PM4/11/09
to
"tennic tennic" <ten...@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

Louis

unread,
Nov 18, 2010, 10:29:05 AM11/18/10
to
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

Louis

unread,
Nov 18, 2010, 11:28:04 AM11/18/10
to

Steven_Lord

unread,
Nov 18, 2010, 1:16:58 PM11/18/10
to

"Louis " <wlo...@ryerson.ca> wrote in message
news:ic3go1$f8h$1...@fred.mathworks.com...

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
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Juanjo

unread,
Aug 9, 2011, 2:41:29 PM8/9/11
to
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" <sl...@mathworks.com> wrote in message <ic3qir$8hr$1...@fred.mathworks.com>...

Steven_Lord

unread,
Aug 10, 2011, 9:35:20 AM8/10/11
to

"Juanjo " <jja...@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.

0 new messages