time-to-botec

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

repl.txt (1723B)


      1 
      2 {{alias}}( p, a, b[, upper] )
      3     Computes the inverse of the lower incomplete beta function.
      4 
      5     In contrast to a more commonly used definition, the first argument is the
      6     probability `p` and the second and third arguments are `a` and `b`,
      7     respectively.
      8 
      9     By default, the function inverts the lower regularized incomplete beta
     10     function. To invert the upper function, set the `upper` argument to `true`.
     11 
     12     If provided `NaN` as any argument, the function returns `NaN`.
     13 
     14     If provided `p < 0` or `p > 1`, the function returns `NaN`.
     15 
     16     If provided `a <= 0` or `b <= 0`, the function returns `NaN`.
     17 
     18     Parameters
     19     ----------
     20     p: number
     21         Probability.
     22 
     23     a: number
     24         Second function parameter.
     25 
     26     b: number
     27         Third function parameter.
     28 
     29     upper: boolean (optional)
     30         Boolean indicating if the function should invert the upper tail of the
     31         incomplete beta function. Default: `false`.
     32 
     33     Returns
     34     -------
     35     y: number
     36         Function value.
     37 
     38     Examples
     39     --------
     40     > var y = {{alias}}( 0.2, 3.0, 3.0 )
     41     ~0.327
     42     > y = {{alias}}( 0.4, 3.0, 3.0 )
     43     ~0.446
     44     > y = {{alias}}( 0.4, 3.0, 3.0, true )
     45     ~0.554
     46     > y = {{alias}}( 0.4, 1.0, 6.0 )
     47     ~0.082
     48     > y = {{alias}}( 0.8, 1.0, 6.0 )
     49     ~0.235
     50     > y = {{alias}}( NaN, 1.0, 1.0 )
     51     NaN
     52     > y = {{alias}}( 0.5, NaN, 1.0 )
     53     NaN
     54     > y = {{alias}}( 0.5, 1.0, NaN )
     55     NaN
     56     > y = {{alias}}( 1.2, 1.0, 1.0 )
     57     NaN
     58     > y = {{alias}}( -0.5, 1.0, 1.0 )
     59     NaN
     60     > y = {{alias}}( 0.5, -2.0, 2.0 )
     61     NaN
     62     > y = {{alias}}( 0.5, 0.0, 2.0 )
     63     NaN
     64     > y = {{alias}}( 0.5, 2.0, -2.0 )
     65     NaN
     66     > y = {{alias}}( 0.5, 2.0, 0.0 )
     67     NaN
     68 
     69     See Also
     70     --------
     71