前页 | 后页 |
nbdtrc
Complemented negative binomial distribution.SYNOPSIS:
int k, n;
double p, y, nbdtrc();
y = nbdtrc(k, n, p);
DESCRIPTION:
Returns the sum of the terms k+1 to infinity of the negative binomial distribution:
inf
-- (n+j-1) n j
> ( ) p (1-p)
-- ( j )
j=k+1
The terms are not computed individually; instead the incomplete beta integral is employed, according to the formula:
y = nbdtrc(k, n, p) = incbet(k+1, n, 1-p).
The arguments must be positive, with p ranging from 0 to 1.
ACCURACY:
Tested at random points (a,b,p), with p between 0 and 1.
a,b Relative error:
arithmetic domain # trials peak rms
IEEE 0,100 100000 1.7e-13 8.8e-15
See the incbet Help topic.