This function evaluates the discrete uniform probability density function.
UNDPR — Function value, the probability that a random variable from a uniform distribution having scale parameter N will be equal to IX. (Output)
IX — Argument for which the discrete uniform probability density function is to be evaluated. (Input)
N — Scale parameter. N must be greater than 0. (Input)
Generic: UNDPR (IX, N)
Specific: The specific interface names are S_UNDPR and D_UNDPR.
Single: UNDPR (IX, N)
Double: The double precision name is DUNDPR.
The discrete uniform PDF is defined for positive integers in the range. It has the value, and. Allowing values of resulting in is a convenience.
In this example, we evaluate the discrete uniform probability density function at IX = 3, N = 5.
USE
UMACH_INT
USE
UNDPR_INT
IMPLICIT NONE
INTEGER NOUT, IX, N
REAL PR
CALL UMACH(2, NOUT)
IX = 3
N = 5
PR = UNDPR(IX, N)
WRITE (NOUT, 99999) IX, N, PR
99999 FORMAT (' UNDPR(', I2, ', ', I2, ') = ', F6.4)
END
UNDPR( 3, 5) = 0.2000
PHONE: 713.784.3131 FAX:713.781.9260 |