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
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.
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