36 lines
678 B
Plaintext
36 lines
678 B
Plaintext
|
|
{{alias}}( r, p )
|
|
Returns the variance of a negative binomial distribution.
|
|
|
|
If provided `NaN` as any argument, the function returns `NaN`.
|
|
|
|
If provided a `r` which is not a positive number, the function returns
|
|
`NaN`.
|
|
|
|
If provided a success probability `p` outside of `[0,1]`, the function
|
|
returns `NaN`.
|
|
|
|
Parameters
|
|
----------
|
|
r: integer
|
|
Number of failures until experiment is stopped.
|
|
|
|
p: number
|
|
Success probability.
|
|
|
|
Returns
|
|
-------
|
|
out: number
|
|
Variance.
|
|
|
|
Examples
|
|
--------
|
|
> var v = {{alias}}( 100, 0.2 )
|
|
2000.0
|
|
> v = {{alias}}( 20, 0.5 )
|
|
40.0
|
|
|
|
See Also
|
|
--------
|
|
|