Why does scipy.norm.pdf sometimes give PDF > 1? How to correct it?

后端 未结 2 1727
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 12:28

Given mean and variance of a Gaussian (normal) random variable, I would like to compute its probability density function (PDF).

I referred this post: Calcu

相关标签:
2条回答
  • 2020-11-28 12:47

    It's not a bug. It's not an incorrect result either. Probability density function's value at some specific point does not give you probability; it is a measure of how dense the distribution is around that value. For continuous random variables, the probability at a given point is equal to zero. Instead of p(X = x), we calculate probabilities between 2 points p(x1 < X < x2) and it is equal to the area below that probability density function. Probability density function's value can very well be above 1. It can even approach to infinity.

    0 讨论(0)
  • 2020-11-28 13:06

    it's a density function, not a mass function

    if variance is less than 1/(2*pi), the gaussian will exceed 1.0

    exceeding 1 is only a limitation for mass functions, not density functions

    0 讨论(0)
提交回复
热议问题