time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (1092B)


      1 
      2 {{alias}}( t, k )
      3     Evaluates the moment-generating function (MGF) for a chi-squared
      4     distribution with degrees of freedom `k` at a value `t`.
      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     t: number
     13         Input value.
     14 
     15     k: number
     16         Degrees of freedom.
     17 
     18     Returns
     19     -------
     20     out: number
     21         Evaluated MGF.
     22 
     23     Examples
     24     --------
     25     > var y = {{alias}}( 0.4, 2 )
     26     ~5.0
     27     > y = {{alias}}( -1.0, 5.0 )
     28     ~0.0642
     29     > y = {{alias}}( 0.0, 10.0 )
     30     1.0
     31 
     32 
     33 {{alias}}.factory( k )
     34     Returns a function for evaluating the moment-generating function (MGF) of a
     35     chi-squared distribution with degrees of freedom `k`.
     36 
     37     Parameters
     38     ----------
     39     k: number
     40         Degrees of freedom.
     41 
     42     Returns
     43     -------
     44     mgf: Function
     45         Moment-generating function (MGF).
     46 
     47     Examples
     48     --------
     49     > var mymgf = {{alias}}.factory( 1.0 );
     50     > var y = mymgf( 0.2 )
     51     ~1.291
     52     > y = mymgf( 0.4 )
     53     ~2.236
     54 
     55     See Also
     56     --------
     57