GEOIN
This function evaluates the inverse of the geometric cumulative probability distribution function.
Function Return Value
GEOIN — Integer function value. The probability that a geometric random variable takes a value less than or equal to the returned value is the input probability, P. (Output)
Required Arguments
P — Probability for which the inverse of the discrete geometric cumulative distribution function is to be evaluated. P must be in the open interval (0, 1). (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: GEOIN (P, PIN)
Specific: The specific interface names are S_GEOIN and D_GEOIN.
FORTRAN 77 Interface
Single: GEOIN (P, PIN)
Double: The double precision name is DGEOIN.
Description
The function GEOIN evaluates the inverse distribution function of a geometric random variable with parameter PIN. The inverse of the CDF is defined as the smallest integer such that the geometric CDF is not less than a given value P, 0 < P < 1.
Example
In this example, we evaluate the inverse probability function at PIN = 0.25, P = 0.6835.
 
USE UMACH_INT
USE GEOIN_INT
IMPLICIT NONE
INTEGER NOUT, IX
REAL P, PIN
CALL UMACH(2, NOUT)
PIN = 0.25
P = 0.6835
IX = GEOIN(P, PIN)
WRITE (NOUT, 99999) P, PIN, IX
99999 FORMAT (' GEOIN(', F4.2, ', ', F6.4 ') = ', I2)
END
Output
 
GEOIN(0.6835, 0.25) = 3