Skip to content

density estimation: compute sum(value * probability) for given distribution

2 messages · Liaw, Andy, bogdan romocea

#
First thing you probably should realize is that density is _not_
probability.  A probability density function _integrates_ to one, not _sum_
to one.  If X is an absolutely continuous RV with density f, then Pr(X=x)=0
for all x, and Pr(a < X < b) = \int_a^b f(x) dx.

sum x*Pr(X=x) (over all possible values of x) for a discrete distribution is
just the expectation, or mean, of the distribution.  The expectation for a
continuous distribution is \int x f(x) dx, where the integral is over the
support of f.  This is all elementary math stat that you can find in any
textbook.

Could you tell us exactly what you are trying to compute, or why you're
computing it?

HTH,
Andy
#
Andy,

Thanks a lot for the clarifications. I was running a simulation a
number of times and trying to come up with a number to summarize the
results. And, I failed to realize from the beginning that what I was
trying to compute was just the mean.....

Regards,
b.
--- "Liaw, Andy" <andy_liaw at merck.com> wrote:

            
------------------------------------------------------------------------------
------------------------------------------------------------------------------