This function evaluates the inverse of the discrete uniform cumulative distribution function.
Function Return Value
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)
Required Arguments
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)
FORTRAN 90 Interface
Generic: UNDIN (P, N)
Specific: The specific interface names are S_UNDIN and D_UNDIN.
FORTRAN 77 Interface
Single: UNDIN (P, N)
Double: The double precision name is DUNDIN.
Description
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
Example
In this example, we evaluate the inverse probability function at P = 0.6, N = 5.