repl.txt (1573B)
1 2 {{alias}}( t, μ, b ) 3 Evaluates the moment-generating function (MGF) for a Laplace 4 distribution with scale parameter `b` and location parameter `μ` at a 5 value `t`. 6 7 If provided `NaN` as any argument, the function returns `NaN`. 8 9 If provided `b <= 0`, the function returns `NaN`. 10 11 Parameters 12 ---------- 13 t: number 14 Input value. 15 16 μ: number 17 Location parameter. 18 19 b: number 20 Scale parameter. 21 22 Returns 23 ------- 24 out: number 25 Evaluated MGF. 26 27 Examples 28 -------- 29 > var y = {{alias}}( 0.5, 0.0, 1.0 ) 30 ~1.333 31 > y = {{alias}}( 0.0, 0.0, 1.0 ) 32 1.0 33 > y = {{alias}}( -1.0, 4.0, 0.2 ) 34 ~0.019 35 > y = {{alias}}( NaN, 0.0, 1.0 ) 36 NaN 37 > y = {{alias}}( 0.0, NaN, 1.0 ) 38 NaN 39 > y = {{alias}}( 0.0, 0.0, NaN ) 40 NaN 41 > y = {{alias}}( 1.0, 0.0, 2.0 ) 42 NaN 43 > y = {{alias}}( -0.5, 0.0, 4.0 ) 44 NaN 45 > y = {{alias}}( 2.0, 0.0, 0.0 ) 46 NaN 47 > y = {{alias}}( 2.0, 0.0, -1.0 ) 48 NaN 49 50 51 {{alias}}.factory( μ, b ) 52 Returns a function for evaluating the moment-generating function (MGF) 53 of a Laplace distribution with scale parameter `b` and location parameter 54 `μ`. 55 56 Parameters 57 ---------- 58 μ: number 59 Location parameter. 60 61 b: number 62 Scale parameter. 63 64 Returns 65 ------- 66 mgf: Function 67 Moment-generating function (MGF). 68 69 Examples 70 -------- 71 > var mymgf = {{alias}}.factory( 4.0, 2.0 ); 72 > var y = mymgf( 0.2 ) 73 ~2.649 74 > y = mymgf( 0.4 ) 75 ~13.758 76 77 See Also 78 -------- 79