This function evaluates the inverse of the discrete uniform cumulative distribution function.
UNDIN — Integer function value. The probability that a uniform random variable takes a value less than or equal to the returned value is the input probability, P. (Output)
P — Probability for which the inverse of the discrete uniform cumulative distribution function is to be evaluated. P must be nonnegative and less than or equal to 1.0. (Input)
N — Scale parameter. N must be greater than 0. (Input)
Generic: UNDIN (P, N)
Specific: The specific interface names are S_UNDIN and D_UNDIN.
Single: UNDIN (P, N)
Double: The double precision name is DUNDIN.
The notation below uses the floor and ceiling function notation, and.
The function UNDIN evaluates the inverse distribution function of a discrete uniform random variable with scale parameter N, defined
.
In this example, we evaluate the inverse probability function at P = 0.6, N = 5.
USE
UMACH_INT
USE
UNDIN_INT
IMPLICIT NONE
INTEGER NOUT, N, IX
REAL P
CALL UMACH(2, NOUT)
P = 0.60
N = 5
IX = UNDIN(P, N)
WRITE (NOUT, 99999) P, N, IX
99999 FORMAT (' UNDIN(', F4.2, ', ', I2 ') = ', I2)
END
UNDIN(0.60, 5) = 3
PHONE: 713.784.3131 FAX:713.781.9260 |