1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
{{alias}}( x, λ )
Evaluates the natural logarithm of the probability mass function (PMF) for a
Poisson distribution with mean parameter `λ` at a value `x`.
If provided `NaN` as any argument, the function returns `NaN`.
If provided a negative value for `λ`, the function returns `NaN`.
Parameters
----------
x: number
Input value.
λ: number
Mean parameter.
Returns
-------
out: number
Evaluated logPMF.
Examples
--------
> var y = {{alias}}( 4.0, 3.0 )
~-1.784
> y = {{alias}}( 1.0, 3.0 )
~-1.901
> y = {{alias}}( -1.0, 2.0 )
-Infinity
> y = {{alias}}( 0.0, NaN )
NaN
> y = {{alias}}( NaN, 0.5 )
NaN
// Negative mean parameter:
> y = {{alias}}( 2.0, -0.5 )
NaN
// Degenerate distribution at `λ = 0`:
> y = {{alias}}( 2.0, 0.0 )
-Infinity
> y = {{alias}}( 0.0, 0.0 )
0.0
{{alias}}.factory( λ )
Returns a function for evaluating the natural logarithm of the probability
mass function (PMF) of a Poisson distribution with mean parameter `λ`.
Parameters
----------
λ: number
Mean parameter.
Returns
-------
logpmf: Function
Logarithm of probability mass function (PMF).
Examples
--------
> var mylogpmf = {{alias}}.factory( 1.0 );
> var y = mylogpmf( 3.0 )
~-2.792
> y = mylogpmf( 1.0 )
~-1.0
See Also
--------
|