This function evaluates the Poisson cumulative distribution function.
POIDF — Function value, the probability that a Poisson random variable takes a value less than or equal to K. (Output)
K — Argument for which the Poisson cumulative distribution function is to be evaluated. (Input)
THETA — Mean of
the Poisson distribution. (Input)
THETA must be
positive.
Generic: POIDF (K, THETA)
Specific: The specific interface names are S_POIDF and D_POIDF.
Single: POIDF (K, THETA)
Double: The double precision name is DPOIDF.
The function POIDF evaluates the cumulative distribution function of a Poisson random variable with parameter THETA. THETA, which is the mean of the Poisson random variable, must be positive. The probability function (with θ = THETA) is
f(x) = e−θθx/x!, for x = 0, 1, 2,…
The individual terms are calculated from the tails of the distribution to the mode of the distribution and summed. POIDF uses the recursive relationship
f(x + 1) = f(x)θ/(x + 1), for x = 0, 1, 2, …k − 1,
with f(0) = e−θ.
Informational error
Type Code
1 1 The input argument, K, is less than zero.
Suppose X is a Poisson random variable with θ = 10. In this example, we evaluate the distribution function at 7.
USE UMACH_INT
USE POIDF_INT
IMPLICIT NONE
INTEGER K, NOUT
REAL DF, THETA
!
CALL UMACH (2, NOUT)
K = 7
THETA = 10.0
DF = POIDF(K,THETA)
WRITE (NOUT,99999) DF
99999 FORMAT (' The probability that X is less than or equal to ', &
'7 is ', F6.4)
END
The probability that X is less than or equal to 7 is 0.2202
PHONE: 713.784.3131 FAX:713.781.9260 |