Réserver une Démo
Pré. Proc.

bdtri

Inverse binomial distribution.

SYNOPSIS:

int k, n;
double p, y, bdtri();
p = bdtr(k, n, y);

DESCRIPTION:

Finds the event probability p such that the sum of the terms 0 through k of the Binomial probability density is equal to the given cumulative probability y.
This is accomplished using the inverse beta integral function and the relation:

1 - p = incbi(n-k, k+1, y).

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      2.3e-14     6.4e-16
    IEEE     0,10000     100000      6.6e-12     1.2e-13
  For p between 10^-6 and 0.001:
    IEEE     0,100       100000      2.0e-12     1.3e-14
    IEEE     0,10000     100000      1.5e-12     3.2e-14

See the incbi Help topic.

ERROR MESSAGES:

  message         condition        value returned
  domain          k < 0, n <= k         0.0
                  x < 0, x > 1