Survival function¶

bdtrc
(k, n, p)¶ Returns the sum of the terms k + 1 through n of the Binomial probability density:
Parameters:
Description¶
\[\sum_{j=k+1}^n {n \choose j} p^j (1p)^{nj}\]
The terms are not summed directly; instead the incomplete beta integral is employed, according to the formula:
y = bdtrc( k, n, p ) = incbet( k+1, nk, p )
The arguments must be positive, with p ranging from 0 to 1.
Accuracy¶
Tested at random points (a, b, p).
a, b  relative error  

arithmetic  domain  # trials  peak  rms 
For p between 0.001 and 1  
IEEE  0, 100  100000  6.7e15  8.2e16 
For p between 0 and .001  
IEEE  0, 100  100000  1.5e13  2.7e15 
Error messages¶
message  condition  value returned 

bdtrc domain  x < 0, x > 1, n < k  0.0 