binocdf

 

Description

Binomial distribution cdf

Syntax

double binocdf( const int iK, int n, double p, int iTail = TAILED_TEST_DISC_LOWER, int * nFail = NULL )

Parameters

iK
[input] integer k, number of successes, which defines the required probabilities.
n
[input] parameter n, number of trials of a Bernoulli process, of the Binomial distribution.
p
[input] parameter p, probability of success for each trial, of the Binomial distribution.
iTail
[input] int,
TAILED_TEST_DISC_LOWER. lower tail. .
TAILED_TEST_DISC_UPPER. upper tail. .
TAILED_TEST_DISC_POINT. point probability. .
nFail
[output] on successful exit, it returns the NAG error code NE_NOERROR; if an error or warning
has been detected, then it returns the specific error or warning code.

Return

Returns Binomial distribution cdf

Examples

Ex1

void binocdf_ex1()
{
        int iK[]= {99, 60, 75};
        int n=100;
        double p=0.75;
        for(int ii = 0; ii<3; ii++)
                printf("%d:    %f\n", iK[ii], binocdf(iK[ii],n,p));
}

Remark

See Also

header to Include

origin.h

Reference