UNPKG

@stdlib/stats

Version:

Standard library statistical functions.

56 lines (42 loc) 1.1 kB
{{alias}}( x, μ ) Evaluates the natural logarithm of the probability mass function (PMF) for a degenerate distribution with mean `μ`. If provided `NaN` for any argument, the function returns `NaN`. Parameters ---------- x: number Input value. μ: number Constant value of distribution. Returns ------- out: number Evaluated logPMF. Examples -------- > var y = {{alias}}( 2.0, 3.0 ) -Infinity > y = {{alias}}( 3.0, 3.0 ) 0.0 > y = {{alias}}( NaN, 0.0 ) NaN > y = {{alias}}( 0.0, NaN ) NaN {{alias}}.factory( μ ) Returns a function for evaluating the natural logarithm of the probability mass function (PMF) of a degenerate distribution with mean `μ`. Parameters ---------- μ: number Constant value of distribution. Returns ------- logpmf: Function Logarithm of probability mass function (PMF). Examples -------- > var mylogPMF = {{alias}}.factory( 10.0 ); > var y = mylogPMF( 10.0 ) 0.0 See Also --------