C Library Functions  - geocdf (3)

NAME

geocdf(3f) - [M_datapac:CUMULATIVE_DISTRIBUTION] compute the geometric cumulative distribution function

CONTENTS

Synopsis
Description
Input Arguments
Output Arguments
Examples
Author
Maintainer
License
References

SYNOPSIS

SUBROUTINE GEOCDF(X,P,Cdf)

       REAL(kind=wp),intent(in)  :: X
       REAL(kind=wp),intent(in)  :: P
       REAL(kind=wp),intent(out) :: Cdf

DESCRIPTION

GEOCDF(3f) computes the cumulative distribution function value at the REAL value X for the geometric distribution with precision precision ’Bernoulli probability’ parameter = P.

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

This distribution is defined for all non-negative integer X where X = 0, 1, 2, ... . This distribution has the probability function

       f(X) = P * (1-P)**X

The geometric distribution is the distribution of the number of failures before obtaining 1 success in an indefinite sequence of Bernoulli (0,1) trials where the probability of success in a precision trial = P.

Note that even though the input to this cumulative distribution function subroutine for this discrete distribution should (under normal circumstances) be a discrete integer value, the input variable X is REAL. X has been specified as REAL so as to conform with the datapac convention that all input ****data**** (as opposed to sample size, for example) variables to all datapac subroutines are.

This convention is based on the belief that

1. A mixture of modes (floating point versus integer) is inconsistent and an unnecessary complication in a data analysis; and
2. Floating point machine arithmetic (as opposed to integer arithmetic) is the more natural mode for doing data analysis.

INPUT ARGUMENTS

X The value at which the cumulative distribution function is to be evaluated. X should be non-negative and integral-valued.
P The value of the ’Bernoulli probability’ parameter for the
geometric distribution.
  P should be between 0.0 (exclusively) and 1.0 (exclusively).

OUTPUT ARGUMENTS

CDF The cumulative distribution function value for the geometric distribution

EXAMPLES

Sample program:

   program demo_geocdf
   use M_datapac, only : geocdf
   implicit none
   ! call geocdf(x,y)
   end program demo_geocdf

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 Feller, An Introduction to Probability Theory and its Applications, Volume 1, Edition 2, 1957, pages 155-157, 210.
o National Bureau of Standards Applied Mathematics Series 55, 1964, page 929.


Nemo Release 3.1 geocdf (3) July 22, 2023
Generated by manServer 1.08 from 728f5502-77e2-4cf0-bf50-c67e3e27770b using man macros.