time-to-botec

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

repl.txt (678B)


      1 
      2 {{alias}}( r, p )
      3     Returns the variance of a negative binomial distribution.
      4 
      5     If provided `NaN` as any argument, the function returns `NaN`.
      6 
      7     If provided a `r` which is not a positive number, the function returns
      8     `NaN`.
      9 
     10     If provided a success probability `p` outside of `[0,1]`, the function
     11     returns `NaN`.
     12 
     13     Parameters
     14     ----------
     15     r: integer
     16         Number of failures until experiment is stopped.
     17 
     18     p: number
     19         Success probability.
     20 
     21     Returns
     22     -------
     23     out: number
     24         Variance.
     25 
     26     Examples
     27     --------
     28     > var v = {{alias}}( 100, 0.2 )
     29     2000.0
     30     > v = {{alias}}( 20, 0.5 )
     31     40.0
     32 
     33     See Also
     34     --------
     35