UNPKG

@stdlib/stats

Version:

Standard library statistical functions.

63 lines (48 loc) 1.29 kB
{{alias}}( x, v ) Evaluates the natural logarithm of the probability density function (PDF) for a Student's t distribution with degrees of freedom `v` at a value `x`. If provided `NaN` as any argument, the function returns `NaN`. If provided a non-positive value for `v`, the function returns `NaN`. Parameters ---------- x: number Input value. v: number Degrees of freedom. Returns ------- out: number Evaluated logPDF. Examples -------- > var y = {{alias}}( 0.3, 4.0 ) ~-1.036 > y = {{alias}}( 2.0, 0.7 ) ~-2.841 > y = {{alias}}( -1.0, 0.5 ) ~-2.134 > y = {{alias}}( 0.0, NaN ) NaN > y = {{alias}}( NaN, 2.0 ) NaN > y = {{alias}}( 2.0, -1.0 ) NaN {{alias}}.factory( v ) Returns a function for evaluating the natural logarithm of the probability density function (PDF) of a Student's t distribution with degrees of freedom `v`. Parameters ---------- v: number Degrees of freedom. Returns ------- logpdf: Function Logarithm of probability density function (PDF). Examples -------- > var mylogPDF = {{alias}}.factory( 3.0 ); > var y = mylogPDF( 1.0 ) ~-1.576 See Also --------