repl.txt (1349B)
1 2 {{alias}}( x, k ) 3 Evaluates the probability density function (PDF) for a chi distribution with 4 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 PDF. 22 23 Examples 24 -------- 25 > var y = {{alias}}( 0.3, 4.0 ) 26 ~0.013 27 > y = {{alias}}( 0.7, 0.7 ) 28 ~0.537 29 > y = {{alias}}( -1.0, 0.5 ) 30 0.0 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 0.0 43 > y = {{alias}}( 0.0, 0.0, 2.0 ) 44 Infinity 45 46 47 {{alias}}.factory( k ) 48 Returns a function for evaluating the probability density function (PDF) of 49 a chi distribution with degrees of freedom `k`. 50 51 Parameters 52 ---------- 53 k: number 54 Degrees of freedom. 55 56 Returns 57 ------- 58 pdf: Function 59 Probability density function (PDF). 60 61 Examples 62 -------- 63 > var myPDF = {{alias}}.factory( 6.0 ); 64 > var y = myPDF( 3.0 ) 65 ~0.337 66 67 See Also 68 -------- 69