GEODF

This function evaluates the discrete geometric cumulative probability distribution function.

Function Return Value

GEODF — Function value, the probability that a geometric random variable takes a value less than or equal to IX. (Output)

Required Arguments

IX — Argument for which the geometric cumulative distribution function is to be evaluated. (Input)

PIN — Probability parameter for each independent trial (the probability of success for each independent trial). PIN must be in the open interval (0, 1). (Input)

FORTRAN 90 Interface

Generic: GEODF (IX, PIN)

Specific: The specific interface names are S_GEODF and D_GEODF.

FORTRAN 77 Interface

Single: GEODF (IX, PIN)

Double: The double precision name is DGEODF.

Description

The function GEODF evaluates the discrete geometric cumulative probability distribution function with parameter p = PIN, defined

 

The return value is the probability that up to x trials would be observed before observing a success.

Example

In this example, we evaluate the probability function at IX = 3, PIN = 0.25.

 

USE UMACH_INT

USE GEODF_INT

IMPLICIT NONE

INTEGER NOUT, IX

REAL PIN, PR

CALL UMACH(2, NOUT)

 

IX = 3

PIN = 0.25e0

PR = GEODF(IX, PIN)

WRITE (NOUT, 99999) IX, PIN, PR

99999 FORMAT (' GEODF(', I2, ', ', F4.2, ') = ', F10.6)

END

Output

 

GEODF( 3, 0.25) = 0.683594