pdf at a single point
Mostrar comentarios más antiguos
Hi all,
A probably very silly question:
since the probability that a normal random variable X equals any particular value is zero, how come, for example, normpdf(0.421) does not return zero?
Cheers!
Respuestas (1)
Wayne King
el 7 de Oct. de 2011
0 votos
Don't confuse the value of the PDF at a point with the probability that the random variable takes on that value. Those are different things. The probability that the random variable takes on any single value is the integral of the PDF with the lower and upper limits of integration the same (the value) and hence that is always zero.
2 comentarios
Wayne King
el 7 de Oct. de 2011
What you want to verify is always zero is (for example):
x = 2; % or any value
normcdf(x,0,1)-normcdf(x,0,1)
Lucas
el 7 de Oct. de 2011
Categorías
Más información sobre Random Number Generation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!