UNPKG

@stdlib/stats

Version:

Standard library statistical functions.

75 lines (58 loc) 1.55 kB
{{alias}}( x, μ, β ) Evaluates the logarithm of the probability density function (PDF) for a Gumbel distribution with location parameter `μ` and scale parameter `β` at a value `x`. If provided `NaN` as any argument, the function returns `NaN`. If provided `β <= 0`, the function returns `NaN`. Parameters ---------- x: number Input value. μ: number Location parameter. β: number Scale parameter. Returns ------- out: number Evaluated logPDF. Examples -------- > var y = {{alias}}( 0.0, 0.0, 2.0 ) ~-1.693 > y = {{alias}}( 0.0, 0.0, 1.0 ) ~-1 > y = {{alias}}( 1.0, 3.0, 2.0 ) ~-2.411 > y = {{alias}}( NaN, 0.0, 1.0 ) NaN > y = {{alias}}( 0.0, NaN, 1.0 ) NaN > y = {{alias}}( 0.0, 0.0, NaN ) NaN // Negative scale parameter: > y = {{alias}}( 2.0, 0.0, -1.0 ) NaN {{alias}}.factory( μ, β ) Returns a function for evaluating the logarithm of the probability density function (PDF) of a Gumbel distribution with location parameter `μ` and scale parameter `β`. Parameters ---------- μ: number Location parameter. β: number Scale parameter. Returns ------- logpdf: Function Logarithm of probability density function (PDF). Examples -------- > var mylogpdf = {{alias}}.factory( 10.0, 2.0 ); > var y = mylogpdf( 10.0 ) ~-1.693 > y = mylogpdf( 12.0 ) ~-2.061 See Also --------