repl.txt (1439B)
1 2 {{alias}}( x, k ) 3 Evaluates the natural logarithm of the probability density function (PDF) 4 for a chi distribution with degrees of freedom `k` at a value `x`. 5 6 If provided `NaN` as any argument, the function returns `NaN`. 7 8 If provided `k < 0`, the function returns `NaN`. 9 10 Parameters 11 ---------- 12 x: number 13 Input value. 14 15 k: number 16 Degrees of freedom. 17 18 Returns 19 ------- 20 out: number 21 Evaluated logPDF. 22 23 Examples 24 -------- 25 > var y = {{alias}}( 0.3, 4.0 ) 26 ~-4.35 27 > y = {{alias}}( 0.7, 0.7 ) 28 ~-0.622 29 > y = {{alias}}( -1.0, 0.5 ) 30 -Infinity 31 > y = {{alias}}( 0.0, NaN ) 32 NaN 33 > y = {{alias}}( NaN, 2.0 ) 34 NaN 35 36 // Negative degrees of freedom: 37 > y = {{alias}}( 2.0, -1.0 ) 38 NaN 39 40 // Degenerate distribution when `k = 0`: 41 > y = {{alias}}( 2.0, 0.0, 2.0 ) 42 -Infinity 43 > y = {{alias}}( 0.0, 0.0, 2.0 ) 44 Infinity 45 46 47 {{alias}}.factory( k ) 48 Returns a function for evaluating the natural logarithm of the probability 49 density function (PDF) of a chi distribution with degrees of freedom `k`. 50 51 Parameters 52 ---------- 53 k: number 54 Degrees of freedom. 55 56 Returns 57 ------- 58 logpdf: Function 59 Logarithm of probability density function (PDF). 60 61 Examples 62 -------- 63 > var mylogPDF = {{alias}}.factory( 6.0 ); 64 > var y = mylogPDF( 3.0 ) 65 ~-1.086 66 67 See Also 68 -------- 69