C Library Functions  - bincdf (3)

NAME

bincdf(3f) - [M_datapac:CUMULATIVE_DISTRIBUTION] compute the binomial cumulative distribution function

CONTENTS

Synopsis
Description
Input Arguments
Output Arguments
Examples
Author
Maintainer
License
References

SYNOPSIS

SUBROUTINE BINCDF(X,P,N,Cdf)

       REAL(kind=wp) :: X
       REAL(kind=wp) :: P
       INTEGER       :: N
       REAL(kind=wp) :: Cdf

DESCRIPTION

BINCDF(3f) computes the cumulative distribution function value at the double precision value X for the binomial distribution with double precision ’Bernoulli probability’ parameter = P, and integer ’number of Bernoulli trials’ parameter = N.

The binomial distribution used herein has mean = N*P and standard deviation = sqrt(N*P*(1-P)).

This distribution is defined for all discrete integer X between 0 (inclusively) and N (inclusively).

This distribution has the probability function

       f(X) = c(N,X) * P**X * (1-P)**(N-X)

where c(N,X) is the combinatorial function equaling the number of combinations of N items taken X at a time.

The binomial distribution is the distribution of the number of successes in N Bernoulli (0,1) trials where the probability of success in a precision trial = P.

INPUT ARGUMENTS

X The value at which the cumulative distribution function is to be evaluated. X should be integral-valued, and between 0.0 (inclusively) and N (inclusively).
P The value of the ’Bernoulli probability’ parameter for the binomial distribution. P should be between 0.0 (exclusively) and 1.0 (exclusively).
N The integer value of the ’number of Bernoulli trials’ parameter. N should be a positive integer.

OUTPUT ARGUMENTS

CDF The cumulative distribution function value for the binomial distribution.

EXAMPLES

Sample program:

   program demo_bincdf
   use M_datapac, only : bincdf
   implicit none
   !call BINCDF(X,P,N,Cdf)
   end program demo_bincdf

Results:

AUTHOR

The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.

MAINTAINER

John Urban, 2022.05.31

LICENSE

CC0-1.0

REFERENCES

o Hastings and Peacock, Statistical Distributions--A Handbook for Students and Practitioners, 1975, page 38.
o National Bureau of Standards Applied Mathematics Series 55, 1964, page 945, Formulae 26.5.24 and 26.5.28, and page 929.
o Johnson and Kotz, Discrete Distributions, 1969, pages 50-86, especially pages 63-64.
o Feller, An Introduction to Probability Theory and its Applications, Volume 1, Edition 2, 1957, pages 135-142.
o Kendall and Stuart, The Advanced Theory of Statistics, Volume 1, Edition 2, 1963, pages 120-125.
o Mood and Grable, Introduction to the Theory of Statistics, Edition 2, 1963, pages 64-69.
o Owen, Handbook of Statistical Tables, 1962, pages 264-272.


Nemo Release 3.1 bincdf (3) July 22, 2023
Generated by manServer 1.08 from 21fcda6f-c9f5-4a37-b217-befa9af2e55f using man macros.