time-to-botec/squiggle/node_modules/@stdlib/stats/base/dists/negative-binomial/variance/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

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
--------