repl.txt (1436B)
1 2 {{alias}}( x, k ) 3 Evaluates the cumulative distribution function (CDF) for a chi-squared 4 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 CDF. 22 23 Examples 24 -------- 25 > var y = {{alias}}( 2.0, 3.0 ) 26 ~0.428 27 > y = {{alias}}( 1.0, 0.5 ) 28 ~0.846 29 > y = {{alias}}( -1.0, 4.0 ) 30 0.0 31 > y = {{alias}}( NaN, 1.0 ) 32 NaN 33 > y = {{alias}}( 0.0, NaN ) 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 ) 42 1.0 43 > y = {{alias}}( -2.0, 0.0 ) 44 0.0 45 > y = {{alias}}( 0.0, 0.0 ) 46 0.0 47 48 {{alias}}.factory( k ) 49 Returns a function for evaluating the cumulative distribution function (CDF) 50 of a chi-squared distribution with degrees of freedom `k`. 51 52 Parameters 53 ---------- 54 k: number 55 Degrees of freedom. 56 57 Returns 58 ------- 59 cdf: Function 60 Cumulative distribution function (CDF). 61 62 Examples 63 -------- 64 > var mycdf = {{alias}}.factory( 1.0 ); 65 > var y = mycdf( 2.0 ) 66 ~0.843 67 > y = mycdf( 1.2 ) 68 ~0.727 69 70 See Also 71 -------- 72