logPmf

open override fun logPmf(k: Int): Double(source)

Returns the natural logarithm of the probability mass at k for this Poisson distribution.

Computed directly in log-space as k * ln(lambda) - lambda - ln(k!), avoiding overflow that would occur when computing k! or lambda^k directly for large values.

Return

the natural log of the probability mass at k. Returns Double.NEGATIVE_INFINITY when the mass is zero.

Parameters

k

the number of events at which to evaluate the log-probability.