repl.txt (1415B)
1 2 {{alias}}( x, k, λ ) 3 Evaluates the probability density function (PDF) for a Weibull distribution 4 with shape parameter `k` and scale parameter `λ` at a value `x`. 5 6 If provided `NaN` as any argument, the function returns `NaN`. 7 8 If provided a nonpositive value for `λ` or `k`, the function returns `NaN`. 9 10 Parameters 11 ---------- 12 x: number 13 Input value. 14 15 k: number 16 Shape parameter. 17 18 λ: number 19 Scale parameter. 20 21 Returns 22 ------- 23 out: number 24 Evaluated PDF. 25 26 Examples 27 -------- 28 > var y = {{alias}}( 2.0, 1.0, 0.5 ) 29 ~0.037 30 > y = {{alias}}( 0.1, 1.0, 1.0 ) 31 ~0.905 32 > y = {{alias}}( -1.0, 4.0, 2.0 ) 33 0.0 34 > y = {{alias}}( NaN, 0.6, 1.0 ) 35 NaN 36 > y = {{alias}}( 0.0, NaN, 1.0 ) 37 NaN 38 > y = {{alias}}( 0.0, 0.0, NaN ) 39 NaN 40 > y = {{alias}}( 2.0, 0.0, -1.0 ) 41 NaN 42 43 44 {{alias}}.factory( k, λ ) 45 Returns a function for evaluating the probability density function (PDF) of 46 a Weibull distribution with shape parameter `k` and scale parameter `λ`. 47 48 Parameters 49 ---------- 50 k: number 51 Shape parameter. 52 53 λ: number 54 Scale parameter. 55 56 Returns 57 ------- 58 pdf: Function 59 Probability density function (PDF). 60 61 Examples 62 -------- 63 > var myPDF = {{alias}}.factory( 7.0, 6.0 ); 64 > var y = myPDF( 7.0 ) 65 ~0.155 66 67 See Also 68 -------- 69