time-to-botec

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

repl.txt (1627B)


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