time-to-botec

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

repl.txt (1667B)


      1 
      2 {{alias}}( t, α, β )
      3     Evaluates the moment-generating function (MGF) for a beta distribution with
      4     first shape parameter `α` and second shape parameter `β` at a value `t`.
      5 
      6     If provided `NaN` as any argument, the function returns `NaN`.
      7 
      8     If `α <= 0` or `β <= 0`, the function returns `NaN`.
      9 
     10     Parameters
     11     ----------
     12     t: number
     13         Input value.
     14 
     15     α: number
     16         First shape parameter.
     17 
     18     β: number
     19         Second shape parameter.
     20 
     21     Returns
     22     -------
     23     out: number
     24         Evaluated MGF.
     25 
     26     Examples
     27     --------
     28     > var y = {{alias}}( 0.5, 1.0, 1.0 )
     29     ~1.297
     30     > y = {{alias}}( 0.5, 2.0, 4.0 )
     31     ~1.186
     32     > y = {{alias}}( 3.0, 2.0, 2.0 )
     33     ~5.575
     34     > y = {{alias}}( -0.8, 4.0, 4.0 )
     35     ~0.676
     36 
     37     > y = {{alias}}( NaN, 1.0, 1.0 )
     38     NaN
     39     > y = {{alias}}( 0.0, NaN, 1.0 )
     40     NaN
     41     > y = {{alias}}( 0.0, 1.0, NaN )
     42     NaN
     43 
     44     > y = {{alias}}( 2.0, -1.0, 0.5 )
     45     NaN
     46     > y = {{alias}}( 2.0, 0.0, 0.5 )
     47     NaN
     48 
     49     > y = {{alias}}( 2.0, 0.5, -1.0 )
     50     NaN
     51     > y = {{alias}}( 2.0, 0.5, 0.0 )
     52     NaN
     53 
     54 
     55 {{alias}}.factory( α, β )
     56     Returns a function for evaluating the moment-generating function (MGF) of a
     57     beta distribution with first shape parameter `α` and second shape parameter
     58     `β`.
     59 
     60     Parameters
     61     ----------
     62     α: number
     63         First shape parameter.
     64 
     65     β: number
     66         Second shape parameter.
     67 
     68     Returns
     69     -------
     70     mgf: Function
     71         Moment-generating function (MGF).
     72 
     73     Examples
     74     --------
     75     > var myMGF = {{alias}}.factory( 0.5, 0.5 );
     76     > var y = myMGF( 0.8 )
     77     ~1.552
     78     > y = myMGF( 0.3 )
     79     ~1.168
     80 
     81     See Also
     82     --------
     83