GEOPR
This function evaluates the discrete geometric probability density function.
Function Return Value
GEOPR — Function value, the probability that a random variable from a geometric distribution having parameter PIN will be equal to IX. (Output)
Required Arguments
IX — Argument for which the discrete geometric probability density function is to be evaluated. IX must be greater than or equal to 0. (Input)
PIN — Probability parameter of the geometric probability function (the probability of success for each independent trial). PIN must be in the open interval (0, 1). (Input)
FORTRAN 90 Interface
Generic: GEOPR (IX, PIN)
Specific: The specific interface names are S_GEOPR and D_GEOPR.
FORTRAN 77 Interface
Single: GEOPR (IX, PIN)
Double: The double precision name is DGEOPR.
Description
The function GEOPR evaluates the discrete geometric probability density function, defined
 
Example
In this example, we evaluate the probability density function at IX = 3, PIN = 0.25.
 
USE UMACH_INT
USE GEOPR_INT
IMPLICIT NONE
INTEGER NOUT, IX
REAL PIN, PR
CALL UMACH(2, NOUT)
IX = 3
PIN = 0.25e0
PR = GEOPR(IX, PIN)
WRITE (NOUT, 99999) IX, PIN, PR
99999 FORMAT (' GEOPR(', I2, ', ', F4.2, ') = ', F6.4)
END
Output
 
GEOPR( 3, 0.25) = 0.1055